VMSTAT(8)

NAME
vmstat - report virtual memory statistics

SYNOPSIS
vmstat [ -cfisS ] [ interval [ count ] ]

DESCRIPTION
vmstat delves into the system and normally reports certain statistics kept about process, virtual memory, disk, trap and CPU activity.

Without options, vmstat displays a one-line summary of the virtual memory activity since the system has been booted. If interval is specified, vmstat summarizes activity over the last interval seconds. If a count is given, the statistics are repeated count times.

For example, the following command displays a summary of 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.
    example% vmstat 5

    procs     memory                       page      faults
    r b w   avm  fre  re at  pi  po  fr  de  sr x0 x1 x2 x3  in   sy  cs  us  sy  id
    2 0 0   918  286   0  0   0   0   0   0    0  1  0   0   0    4  12    5   3   5  91
    1 0 0   846  254   0  0   0   0   0   0    0  6  0   1   0   42 153  31  7  40  54
    1 0 0   840  268   0  0   0   0   0   0    0  5  0   0   0   27 103  25  8  26  66
    1 0 0   620  312   0  0   0   0   0   0    0  6  0   0   0   26  76  25  6  27  67

    CTRL-C
    example%

The fields of vmstat's display are:

procs
    Report the number of processes in each of the three following states:
    r   in run queue
    b   blocked for resources (i/o, paging, etc.)
    w   runnable or short sleeper (< 20 secs) but swapped

memory
    Report on usage of virtual and real memory. Virtual memory is considered active if it belongs to processes which are running or have run in the last 20 seconds.
    avm number of active virtual Kbytes
    fre size of the free list in Kbytes

page
    Report information about page faults and paging activity. The information on each of the following activities is averaged each five seconds, and given in units per second.
    re  page reclaims — but see the -S option for how this field is modified.
    at  number of attaches — but see the -S option for how this field is modified.
    pi  kilobytes per second paged in
    po  kilobytes per second paged out
    fr  kilobytes freed per second
    de  anticipated short term memory shortfall in Kbytes
    sr  pages scanned by clock algorithm, per-second

disk
    Report number of disk operations per second (this field is system dependent). For Sun systems, four slots are available for up to four drives: ``x0'' (or ``s0'' for SCSI disks), ``x1'', ``x2'', and ``x3''.

faults
    Report trap/interrupt rate averages per second over last 5 seconds.
    in  (non clock) device interrupts per second
    sy  system calls per second
    cs  CPU context switch rate (switches/sec)

cpu Give a breakdown of percentage usage of CPU time.
    us  user time for normal and low priority processes
    sy  system time
    id  CPU idle

OPTIONS

-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.

-f  Report on the number of forks and vforks since system startup and the number of pages of virtual memory involved in each kind of fork.

-i  Report the number of interrupts per device. Autovectored interrupts (including the clock) are listed first.

-s  Display the contents of the sum structure, giving the total number of several kinds of paging-related events which have occurred since boot.

-S  Report on swapping rather than paging activity. This option will change two fields in vmstat's ``paging'' display: rather than the ``re'' and ``at'' fields, vmstat will report ``si'' (swap-ins), and ``so'' (swap-outs).

FILES
/dev/kmem
/vmunix

BUGS
If more than one autovectored device has the same name, interrupts are counted for all like-named devices regardless of unit number. Such devices are listed with a unit number of `?'.