Report virtual memory statistics
vmstat [-cipsS] [disks] [ interval [count]]
vmstat reports virtual memory statistics regarding kernel thread, virtual memory, disk, trap, and CPU activity.
On MP (multi-processor) systems, vmstat averages the number of CPUs into the output. For per-processor statistics, see mpstat(1M).
vmstat only supports statistics for certain devices. For more general system statistics, use sar(1), iostat(1M), or sar(1M).
Without options, vmstat displays a one-line summary of the virtual memory activity since the system was booted.
During execution of this kernel status command, the „state“ of the kernel can change. An example would be CPUs going online or offline. vmstat will report this as « State change ».
See System Administration Guide: Advanced Administration for device naming conventions for disks.
The following options are supported:
-c Report cache flushing statistics. By default, report the total number of each kind of cache flushed since boot time. The types are: user, context, region, segment, page, and partial-page.
-i Report the number of interrupts per device. count and interval does not apply to the -i option.
-p Report paging activity in details. This option will display the following, respectively:
epi Executable page-ins.
epo Executable page-outs.
epf Executable page-frees.
api Anonymous page-ins.
apo Anonymous page-outs.
apf Anonymous page-frees.
fpi File system page-ins.
fpo File system page-outs.
fpf File system page-frees.
-s Display the total number of various system events since boot. count and interval does not apply to the -s option.
-S Report on swapping rather than paging activity. This option will change two fields in vmstat's ``paging´´ display: rather than the ``re´´ and ``mf´´ fields, vmstat will report ``si´´ (swap-ins) and ``so´´ (swap-outs).
The following operands are supported:
count Specifies the number of times that the statitics are repeated. count does not apply to the -i and -s options.
disks Specifies which disks are to be given priority in the output (only four disks fit on a line). Common disk names are id, sd, xd, or xy, followed by a number (for example, sd2, xd0, and so forth).
interval Specifies the last number of seconds over which vmstat summarizes activity. This number of seconds repeats forever. interval does not apply to the -i and -s options.