The iostat command
The iostat command is the fastest way to get a first impression, whether or not the system has a disk I/O-bound performance problem.
See Assessing disk performance with the iostat command. The tool also reports CPU statistics.
The following example shows a part of an iostat command
output. The first stanza shows the summary statistic since system startup.
# iostat -t 2 6
tty: tin tout avg-cpu: % user % sys % idle % iowait
0.0 0.8 8.4 2.6 88.5 0.5
0.0 80.2 4.5 3.0 92.1 0.5
0.0 40.5 7.0 4.0 89.0 0.0
0.0 40.5 9.0 2.5 88.5 0.0
0.0 40.5 7.5 1.0 91.5 0.0
0.0 40.5 10.0 3.5 80.5 6.0The CPU statistics columns (% user, % sys, % idle, and % iowait) provide a breakdown of CPU usage. This information is also reported in the vmstat command output in the columns labeled us, sy, id, and wa. For a detailed explanation for the values, see vmstat command. Also note the change made to %iowait described in Wait I/O time reporting.