04-10-2011 11:57 PM
how to make script to check list cpu usage, memory usage, hard disk usage in all my hp server once in every day ? i can do by crontab , but how to make the script ?
04-11-2011 12:12 AM
You could ask top(1) to send out one pass.
For memory (actually swap) usage, you could use "swapinfo -tam".
For disk usage you can use "bdf -l".
Is this detailed enough for you?
04-11-2011 02:03 AM
You can have each of these commands append their output to that one file.
top -f $OUTFILE -n 50
swapinfo -tam >> $OUTFILE
bdf -l >> $OUTFILE