vmstat(1M) manual page
Table of Contents
vmstat - report virtual memory statistics
vmstat [ -cisS ]
[ disks ] [ interval [ count ] ]
SUNWcsu
vmstat
delves into the system and reports certain statistics kept about process,
virtual memory, disk, trap and CPU
activity. Note: vmstat statistics are
only supported for certain devices.
Without options, vmstat displays a one-line
summary of the virtual memory activity since the system was booted. If
interval is specified, vmstat summarizes activity over the last interval
seconds, repeating forever. If a count is given, the statistics are repeated
count times. Note: interval and count do not apply to the -i and -s options.
If disks are specified, they are given priority when vmstat chooses which
disks to display (only four fit on a line). Common disk names are id, sd,
xd, or xy, followed by a number, for example, sd2, xd0, and so forth. For
more general system statistics, use sar(1)
, iostat(1M)
, or sar(1M)
.
See
for device naming conventions for disks.
- -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.
- -s
- Display the
total number of various system events 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 ‘‘mf’’ fields, vmstat will report ‘‘si’’ (swap-ins)
and ‘‘so’’ (swap-outs).
The following command displays a summary of what the system is
doing every five seconds.
example% vmstat 5
procs
| memory | page | disk | faults | cpu |
lb1 rb1 rb1 rb1 rb1 rb1 rb1 rb1 rb1 rb1 rb1 rb1 rb1 rb1 rb1 rb1 rb1 rb1
rb1 . |
r b w | swap free | re | mf | pi | po |
lb1 rb1 rb1 rb1 rb1 rb1 rb1 rb1 rb1 rb1 rb1
rb1 rb1 rb1 rb1 rb1 rb1 rb1 rb1 . |
0 0 0 | 11456 4120 | 1 | 41 | 19 | 1 |
0 0 1 | 10132 4280 | 0 | 4 | 44 | 0 |
0
0 1 | 10132 4616 | 0 | 0 | 20 | 0 |
0 0 1 | 10132 5292 | 0 | 0 | 9 | 0 |
1 1 1 | 10132 5496 | 0 | 0 | 5 | 0 |
1 0 1 | 10132 5564 | 0 | 0 | 25 | 0 |
1
0 1 | 10124 5412 | 0 | 0 | 37 | 0 |
1 0 1 | 10124 5236 | 0 | 0 | 24 | 0 |
^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, and so forth)
- w
runnable but swapped
- memory
- Report on usage of virtual and real memory.
- swap
- amount of swap space currently
available (Kbytes)
- free
- size of the free list (Kbytes)
- page
- Report information
about page faults and paging activity. The information on each of the following
activities is given in units per second.
- re
- page reclaims -- but see the
-S option for how this field is modified.
- mf
- minor faults -- but see the -S
option for how this field is modified.
- pi
- kilobytes paged in
- po
- kilobytes
paged out
- fr
- kilobytes freed
- de
- anticipated short-term memory shortfall
(Kbytes)
- sr
pages scanned by clock algorithm
- disk
- Report the number of
disk operations per second. There are slots for up to four disks, labeled
with a single letter and number. The letter indicates the type of disk
(s = SCSI, i = IPI, and so forth); the number is the logical unit number.
- faults
- Report the trap/interrupt rates (per second).
- in
- (non clock) device
interrupts
- sy
- system calls
- cs
- CPU
context switches
- cpu
- Give a breakdown
of percentage usage of CPU
time. On MP systems, this is an average across
all processors.
- us
- user time
- sy
- system time
- id
idle time
sar(1)
,
iostat(1M)
, sar(1M)
Table of Contents