vmstat(1)
NAME
vmstat − report virtual memory statistics
SYNTAX
vmstat [−fsSzkK] [interval[count]] [namelist corefile]
DESCRIPTION
The vmstat command delves into the system and normally reports certain statistics kept about process, virtual memory, disk, trap and cpu activity. If given a −f argument, it instead reports on the number of forks and vforks since system startup and the number of pages of virtual memory involved in each kind of fork. If given a −s argument, it instead prints the contents of the sum structure, giving the total number of several kinds of paging related events which have occurred since boot. If given a −z argument, the sum structure will be zeroed out, if the UID indicates root privilege. If given a −K argument, kernel level memory allocation/deallocation statistics will be given. If given a −k argument and a namelist and corefile, a dump may be interrogated to either print the contents of the sum structure (default) or if given a −kK argument, the kernel level memory allocation/deallocation statistics will be printed from the dump.
If none of these options are given, vmstat will report in the first line a summary of the virtual memory activity since the system has been booted. If interval is specified, then successive lines are summaries over the last interval seconds. “vmstat 5” will print what the system is doing every five seconds; this is a good choice of printing interval since this is how often some of the statistics are sampled in the system; others vary every second, running the output for a while will make it apparent which are recomputed every second. If a count is given, the statistics are repeated count times. The format fields are:
Procs: information about numbers of processes in various states.
rin run queue
bblocked for resources (i/o, paging, etc.)
wrunnable or short sleeper (< 20 secs) but swapped
Memory: information about the usage of virtual and real memory. Virtual pages are considered active if they belong to processes which are running or have run in the last 20 seconds. A “page” here is 1024 bytes.
avmactive virtual pages
fresize of the free list
If the number of pages exceeds 9999, it is shown in a scaled
representation with the suffix “k” indicating multiplication
by 1000 and “m”, 1000000. For example, the value 12345 would
appear as “12k”.
Page: information about page faults and paging activity. These are averaged each five seconds, and given in units per second.
repage reclaims (simulating reference bits)
atpages attached (found in free list not swapdev or filesystem)
pipages paged in
popages paged out
frpages freed per second
deanticipated short term memory shortfall
srpages scanned by clock algorithm, per-second
up/hp/rk: Disk operations per second (this field is system dependent). Typically paging will be split across several of the available drives. The number under each of these is the unit number. Faults: trap/interrupt rate averages per second over last 5 seconds.
in(non clock) device interrupts per second
sysystem calls per second
cscpu context switch rate (switches/sec)
Cpu: breakdown of percentage usage of CPU time
ususer time for normal and low priority processes
sysystem time
idcpu idle
If given a
−S
argument, the page reclaim (re) and pages attached (at) fields will be
replaced with
siprocesses swapped in
soprocesses swapped out
OPTIONS
−fDisplays number of forks and vforks since system startup and number of pages of virtual memory involved in each kind of fork.
−sDisplays total number of several kinds of paging-related events occurring since boot.
FILES
/dev/kmem
/vmunix