Copyright (c) 2001 Sun Microsystems, Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
vmstat [-ipqsS] [-T u | d] [disks] [interval [count]]
On MP (multi-processor) systems, vmstat averages the number of CPUs into the output. For per-processor statistics, see mpstat(8).
vmstat only supports statistics for certain devices. For more general system statistics, use sar(1), iostat(8), or sar(8).
Without options, vmstat displays a one-line summary of the virtual memory activity since the system was booted.
During execution of the kernel status command, the state of the system can change. If relevant, a state change message is included in the vmstat output, in one of the following forms:
<<device added: sd0>> <<device removed: sd0>> <<processors added: 1, 3>> <<processors removed: 1, 3>>
See disks(8) for device naming conventions for disks.
Report the number of interrupts per device. count and interval does not apply to the -i option.
Report paging activity in details. This option will display the following, respectively: epi
Executable page-ins.
Executable page-outs.
Executable page-frees.
Anonymous page-ins.
Anonymous page-outs.
Anonymous page-frees.
File system page-ins.
File system page-outs.
File system page-frees.
Suppress messages related to state changes.
Display the total number of various system events since boot. count and interval does not apply to the -s option.
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).
Specify u for a printed representation of the internal representation of time. See time(2). Specify d for standard date format. See date(1).
Specifies the number of times that the statistics are repeated. count does not apply to the -i and -s options.
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).
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.
The following command displays a summary of what the system is doing every five seconds.
example% vmstat 5
kthr memory page disk faults cpu
r b w swap free re mf pi p fr de sr s0 s1 s2 s3 in sy cs us sy id
0 0 0 11456 4120 1 41 19 1 3 0 2 0 4 0 0 48 112 130 4 14 82
0 0 1 10132 4280 0 4 44 0 0 0 0 0 23 0 0 211 230 144 3 35 62
0 0 1 10132 4616 0 0 20 0 0 0 0 0 19 0 0 150 172 146 3 33 64
0 0 1 10132 5292 0 0 9 0 0 0 0 0 21 0 0 165 105 130 1 21 78
1 1 1 10132 5496 0 0 5 0 0 0 0 0 23 0 0 183 92 134 1 20 79
1 0 1 10132 5564 0 0 25 0 0 0 0 0 18 0 0 131 231 116 4 34 62
1 0 1 10124 5412 0 0 37 0 0 0 0 0 22 0 0 166 179 118 1 33 67
1 0 1 10124 5236 0 0 24 0 0 0 0 0 14 0 0 109 243 113 4 56 39
^C
example%
The fields of vmstat's display are kthr
Report the number of kernel threads in each of the three following states: r
the number of kernel threads in run queue
the number of blocked kernel threads that are waiting for resources I/O, paging, and so forth
the number of swapped out lightweight processes (LWPs) that are waiting for processing resources to finish.
Report on usage of virtual and real memory. swap
available swap space (Kbytes)
size of the free list (Kbytes)
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 \(em but see the -S option for how this field is modified.
minor faults \(em but see the -S option for how this field is modified.
kilobytes paged in
kilobytes paged out
kilobytes freed
anticipated short-term memory shortfall (Kbytes)
pages scanned by clock algorithm
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.
Report the trap/interrupt rates (per second). in
interrupts
system calls
CPU context switches
Give a breakdown of percentage usage of CPU time. On MP systems, this is an average across all processors. us
user time
system time
idle time
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability See below. |
Invocation is evolving. Human readable output is unstable.