[root@abc ~]# man sar
-u [ ALL ]
Report CPU utilization. The ALL keyword indicates that all the CPU fields should be displayed. The report may show the following fields:
%user
Percentage of CPU utilization that occurred while executing at the user level (application). Note that this field includes time spent running virtual processors.
%usr
Percentage of CPU utilization that occurred while executing at the user level (application). Note that this field does NOT include time spent running virtual proces-
sors.
%nice
Percentage of CPU utilization that occurred while executing at the user level with nice priority.
%system
Percentage of CPU utilization that occurred while executing at the system level (kernel). Note that this field includes time spent servicing hardware and software interrupts.
%sys
Percentage of CPU utilization that occurred while executing at the system level (kernel). Note that this field does NOT include time spent servicing hardware or soft-ware interrupts.
%iowait
Percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request.
%steal
Percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was servicing another virtual processor.
%irq
Percentage of time spent by the CPU or CPUs to service hardware interrupts.
%soft
Percentage of time spent by the CPU or CPUs to service software interrupts.
%guest
Percentage of time spent by the CPU or CPUs to run a virtual processor.
%idle
Percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request.
Note: On SMP machines a processor that does not have any activity at all (0.00 for every field) is a disabled (offline) processor.
[root@abc ~]# sar -u ALL 1 10
Linux 2.6.32-642.el6.x86_64 (abc) 06/06/2018 _x86_64_ (4 CPU)
01:56:08 PM CPU %usr %nice %sys %iowait %steal %irq %soft %guest %idle
01:56:09 PM all 0.00 0.00 0.25 0.00 0.00 0.00 0.00 0.00 99.75
01:56:10 PM all 0.25 0.00 0.25 0.00 0.00 0.00 0.00 0.00 99.50
01:56:11 PM all 0.00 0.00 0.25 0.00 0.00 0.00 0.00 0.00 99.75
01:56:12 PM all 0.00 0.00 0.25 0.00 0.00 0.00 0.00 0.00 99.75
01:56:13 PM all 0.25 0.00 0.50 0.00 0.00 0.00 0.00 0.00 99.25
01:56:14 PM all 0.00 0.00 0.25 0.00 0.00 0.00 0.00 0.00 99.75
01:56:15 PM all 0.00 0.00 0.25 0.25 0.00 0.00 0.00 0.00 99.50
01:56:16 PM all 0.00 0.00 0.25 0.00 0.00 0.00 0.00 0.00 99.75
01:56:17 PM all 0.00 0.00 0.50 0.00 0.00 0.00 0.00 0.00 99.50
01:56:18 PM all 0.00 0.00 0.25 0.00 0.00 0.00 0.00 0.00 99.75
Average: all 0.05 0.00 0.30 0.03 0.00 0.00 0.00 0.00 99.62
[root@abc ~]#
Spending time in %user is expected behavior, as this is where all non-system tasks are accounted for.
If cycles are actively being spent in %system then much of the execution time is being spent in lower-level code.
If %iowait is high then it indicates processes are actively waiting due to disk accesses being a bottleneck on the system.
注意上面的 %iowait列
来源于:https://access.redhat.com/articles/325783
How to analyze and interpret sar data.