Tuesday 6 December 2016

sar command?

sar command will report the CPU activity of the server. Also, the option ‘-u’ can be used to get the CPU utilization report. If you want to get the CPU activity report in every 2 seconds for 3 times, you can use the following command.
# sar -u 2 3
Linux 2.6.18-274.18.1.el5 (myserver) 09/06/2012
03:15:45 PM CPU %user %nice %system %iowait %steal %idle
03:15:47 PM all 7.75 0.00 0.81 0.44 0.00 91.01
03:15:49 PM all 12.23 0.00 3.81 5.49 0.00 78.48
03:15:51 PM all 1.19 0.00 0.56 0.31 0.00 97.94
Average: all 7.06 0.00 1.73 2.08 0.00 89.13
%user denotes percentage of CPU utilization that occurred while executing at the user level (application) and %system denotes percentage of CPU utilization that occurred while executing at the system level (kernel). %idle is the percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request.

No comments:

Post a Comment