Continuous performance monitoring with the vmstat command
The vmstat command is useful for obtaining an overall picture of CPU, paging, and memory usage.
The following is a sample report produced by the vmstat command:
# vmstat 5 2
kthr memory page faults cpu
----- ----------- ------------------------ ------------ -----------
r b avm fre re pi po fr sr cy in sy cs us sy id wa
1 1 197167 477552 0 0 0 7 21 0 106 1114 451 0 0 99 0
0 0 197178 477541 0 0 0 0 0 0 443 1123 442 0 0 99 0
Remember that the first report from the vmstat command displays cumulative activity since the last system boot. The second report shows activity for the first 5-second interval.
For detailed discussions of the vmstat command, see vmstat command, Memory usage determination with the vmstat command, and Assessing disk performance with the vmstat command.