Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help Writing a script

Status
Not open for further replies.

uadmin

Technical User
Jun 13, 2001
122
GB
I am looking to write a script will tell me what disk usage is being used and processes.
This script will be required to run several times a day, could you please help.

Regards
Simon Simon Peter Wickham
Email: s.wickham@zoom.co.uk
 
Hi,
You can use bdf for disk usage and ps for a list of processes in your script.
But what exactly do you want your script to do for you?

mewa
 
Thank you for getting back to me the purpose of the script is to moniter system usage and then write them either as a text file or as a csv so i am able to improve system performance .
I have ran the command top -s1 which is fine but due to i am working on the system constat it would be easier to run the script every say 2 hours.
hope this can help you to help me
Regards
Simon Simon Peter Wickham
Email: s.wickham@zoom.co.uk
 
You could set it up a couple of ways:

Probably the easiest is to write a script to run the command you want and append the output (use >> instead of just >) to a file. Then Schedule the script through cron to run at 8:00, 10:00, 12:00, 14:00, etc.
 
Thank you for the advice...
Regards
Simon Simon Peter Wickham
Email: s.wickham@zoom.co.uk
 
Hi
thread51-108769 this discussion thread you can use awk and write script.

Patel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top