Transfer from http://www.cnblogs.com/jiqiubo/archive/2012/02/25/2367791.html
Example one: Using the command line Sar-u T n
For example, sampling every 60 seconds, sampling 5 times in a row, observing CPU usage, # Sar-u Screen display:
SCO_SV scosysv 3.2v5.0.5 i80386 10/01/2001 14:43:50%usr%sys%wio%idle (-u) 14:44:50 0 1 4 94 14:45:50 0 2 4 93 14:46:50 0 2 2 96 14:47:50 0 2 5 93 14:48:50 0 2 2 96 Average 0 2 4 94
The contents of the display include:
%usr:cpu the percentage of time in user mode. %sys:cpu the percentage of time in system mode. %wio:cpu the percentage of time to wait for the input output to finish. %IDLE:CPU idle time percentage.
In all the displays, we should mainly note that the values of%wio and%idle,%wio are too high, indicating that the hard disk has an I/O bottleneck A high%idle value indicates that the CPU is idle and if the%idle value is high but the system responds slowly, it is possible that the CPU is waiting to allocate memory. You should increase your memory capacity at this time. If the%idle value continues below 10, the system's CPU processing power is relatively low, and the table The most necessary resource to solve in the Ming system is the CPU. |
"Reprint" CPU usage analysis under Linux