vmstat reports some statistics kept by the system on
processes, demand paging, and CPU and trap activity. Three
types of reports are available:
By default, vmstat displays a summary of the number of
processes in various states, paging activity, system activity, and
CPU cycle consumption.
The -f option reports the number of
fork(S)
system calls performed.
The -s option outputs a verbose listing of paging and
trap activity.
If no interval or count is specified, the totals
since system bootup are displayed.
If an interval is given, the number of events that have
occurred in the last interval seconds is shown. If no
count is specified, this display is repeated forever every
interval seconds. Otherwise, when a count is
also specified, the information is displayed count times.
Other options that may be specified include:
-nnamelist
Use file namelist as an alternate symbol table instead of
/unix.
-llines
For the default display, repeat the header every lines
reports (default is 20).
The fields in the default report are:
procs
The number of processes which are:
r
In the run queue.
b
Blocked waiting for resources.
w
Swapped out.
These values always reflect the current situation, even if the
totals since boot are being displayed.
paging
Reports on the performance of the demand paging system. Unless the
totals since boot are being displayed, this information is averaged
over the preceding interval seconds:
frs
Free swap space.
dmd
Demand zero and demand fill pages.
sw
Pages on swap.
cch
Pages in cache.
fil
Pages on file.
pft
Protection faults.
frp
Pages freed.
pos
Processes swapped out successfully.
pif
Processes swapped in unsuccessfully.
pis
Processes swapped in successfully.
rso
Regions swapped out.
rsi
Regions swapped in.
system
Reports on the general system activity. Unless the totals since
boot are being shown, these figures are averaged over the last
interval seconds:
sy
Number of system calls.
cs
Number of context switches.
cpu
Percentage of CPU cycles spent in various operating modes:
us
User.
su
System.
id
Idle.
The -f and -s reports are a series of lines of
the form:
number description
which means that number of the items described by
description happened (either since boot or in the last
interval seconds, as appropriate). These reports should be
self-explanatory.