System Administration Guide: Advanced Administration

How to Check CPU Utilization (sar -u)

Use the sar -u command to display CPU utilization statistics.


$ sar -u
00:00:00    %usr    %sys    %wio   %idle
01:00:00       0       0       0     100

The sar command without any options is equivalent to sar -u. At any given moment, the processor is either busy or idle. When busy, the processor is in either user mode or system mode. When idle, the processor is either waiting for I/O completion or “sitting still” with no work to do.

The following table describes output from the -u option.

Table 24–17 Output From the sar -u Command

Field Name 

Description 

%usr

Lists the percentage of time that the processor is in user mode 

%sys

Lists the percentage of time that the processor is in system mode 

%wio

Lists the percentage of time that the processor is idle and waiting for I/O completion 

%idle

Lists the percentage of time that the processor is idle and not waiting for I/O 

A high %wio generally means that a disk slowdown has occurred.

Example—Checking CPU Utilization

The following example shows output from the sar -u command.


$ sar -u
SunOS touchstone 5.9 Generic sun4u    03/04/2003

00:00:00    %usr    %sys    %wio   %idle
01:00:00       0       0       0     100
02:00:00       0       0       0     100
03:00:00       0       0       0     100
04:00:00       0       0       0     100
05:00:00       0       0       0     100
06:00:00       0       0       0     100
07:00:00       0       0       0     100
08:00:00       0       0       0     100
08:20:01       0       0       0     100
08:40:00       0       0       0     100
09:00:00       0       0       0     100
09:20:01       6       1       1      91
09:40:01      15       2       0      82
10:00:02      13       1       2      83
10:20:03       5       2       8      84
10:40:01       3       1       0      96
11:00:01       1       0       1      97
11:20:01       2       0       0      97

Average        2       0       0      98