For analysis, I need to gather CPU usage from say 1:00 PM to 2:00 PM every 10 seconds on a given day. I heard this can be done with awk, but my UNIX is kind of rusty.
Try running this command at 1:00 PM.
mpstat 10 60 >> /path/to/logfile &
sar -u 10 60
Hello,
In a Linux box you can get {1,5,15} mins CPU load averages from /proc/loadavg special "file" with the help of "awk", for example:
You can add this simple one-liner to a cronjob and redirect the output to a log file...
--
Santi Saez
Thanks everyone!