2 .\" Copyright (c) 2001 Sun Microsystems, Inc. All Rights Reserved.
3 .\" 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.
4 .\" 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
5 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH VMSTAT 8 "April 14, 2015"
8 vmstat \- report virtual memory statistics
12 \fBvmstat\fR [\fB-ipqsS\fR] [\fB-T\fR u | d] [\fIdisks\fR] [\fIinterval\fR [\fIcount\fR]]
17 \fBvmstat\fR reports virtual memory statistics regarding kernel thread, virtual
18 memory, disk, trap, and \fBCPU\fR activity.
21 On \fBMP\fR (multi-processor) systems, \fBvmstat\fR averages the number of
22 \fBCPUs\fR into the output. For per-processor statistics, see \fBmpstat\fR(8).
25 \fBvmstat\fR only supports statistics for certain devices. For more general
26 system statistics, use \fBsar\fR(1), \fBiostat\fR(8), or \fBsar\fR(8).
29 Without options, \fBvmstat\fR displays a one-line summary of the virtual memory
30 activity since the system was booted.
33 During execution of the kernel status command, the \fBstate\fR of the system
34 can change. If relevant, a state change message is included in the \fBvmstat\fR
35 output, in one of the following forms:
40 <<device removed: sd0>>
41 <<processors added: 1, 3>>
42 <<processors removed: 1, 3>>
49 See \fI\fR for device naming conventions for disks.
52 The following options are supported:
59 Report the number of interrupts per device. \fIcount\fR and \fIinterval\fR does
60 not apply to the \fB-i\fR option.
69 Report paging activity in details. This option will display the following,
95 Executable page-frees.
122 Anonymous page-frees.
131 File system page-ins.
140 File system page-outs.
149 File system page-frees.
152 When executed in a \fBzone\fR and if the pools facility is active, all of the
153 above only report actitivity on the processors in the processor set of the
163 Suppress messages related to state changes.
172 Display the total number of various system events since boot. \fIcount\fR and
173 \fIinterval\fR does not apply to the \fB-s\fR option.
182 Report on swapping rather than paging activity. This option will change two
183 fields in \fBvmstat\fR's ``paging'' display: rather than the ``re'' and ``mf''
184 fields, \fBvmstat\fR will report ``si'' (swap-ins) and ``so'' (swap-outs).
190 \fB\fB-T\fR \fBu\fR | \fBd\fR\fR
193 Specify \fBu\fR for a printed representation of the internal representation of
194 time. See \fBtime\fR(2). Specify \fBd\fR for standard date format. See
200 The following operands are supported:
207 Specifies the number of times that the statistics are repeated. \fIcount\fR
208 does not apply to the \fB-i\fR and \fB-s\fR options.
217 Specifies which disks are to be given priority in the output (only four disks
218 fit on a line). Common disk names are \fBid\fR, \fBsd\fR, \fBxd\fR, or
219 \fBxy,\fR followed by a number (for example, \fBsd2\fR, \fBxd0\fR, and so
229 Specifies the last number of seconds over which \fBvmstat\fR summarizes
230 activity. This number of seconds repeats forever. \fIinterval\fR does not apply
231 to the \fB-i\fR and \fB-s\fR options.
236 \fBExample 1 \fRUsing \fBvmstat\fR
239 The following command displays a summary of what the system is doing every five
245 example% \fBvmstat 5\fR
248 kthr memory page disk faults cpu
249 r b w swap free re mf pi p fr de sr s0 s1 s2 s3 in sy cs us sy id
250 0 0 0 11456 4120 1 41 19 1 3 0 2 0 4 0 0 48 112 130 4 14 82
251 0 0 1 10132 4280 0 4 44 0 0 0 0 0 23 0 0 211 230 144 3 35 62
252 0 0 1 10132 4616 0 0 20 0 0 0 0 0 19 0 0 150 172 146 3 33 64
253 0 0 1 10132 5292 0 0 9 0 0 0 0 0 21 0 0 165 105 130 1 21 78
254 1 1 1 10132 5496 0 0 5 0 0 0 0 0 23 0 0 183 92 134 1 20 79
255 1 0 1 10132 5564 0 0 25 0 0 0 0 0 18 0 0 131 231 116 4 34 62
256 1 0 1 10124 5412 0 0 37 0 0 0 0 0 22 0 0 166 179 118 1 33 67
257 1 0 1 10124 5236 0 0 24 0 0 0 0 0 14 0 0 109 243 113 4 56 39
267 The fields of \fBvmstat\fR's display are
275 Report the number of kernel threads in each of the three following states:
282 the number of kernel threads in run queue
291 the number of blocked kernel threads that are waiting for resources \fBI/O,\fR
301 the number of swapped out lightweight processes (LWPs) that are waiting for
302 processing resources to finish.
313 Report on usage of virtual and real memory.
320 available swap space (Kbytes)
329 size of the free list (Kbytes)
340 Report information about page faults and paging activity. The information on
341 each of the following activities is given in units per second.
348 page reclaims \(em but see the \fB-S\fR option for how this field is modified.
357 minor faults \(em but see the \fB-S\fR option for how this field is modified.
393 anticipated short-term memory shortfall (Kbytes)
402 pages scanned by clock algorithm
405 When executed in a \fBzone\fR and if the pools facility is active, all of the
406 above (except for "de") only report activity on the processors in the processor
407 set of the \fBzone\fR's pool.
416 Report the number of disk operations per second. There are slots for up to four
417 disks, labeled with a single letter and number. The letter indicates the type
418 of disk (s = \fBSCSI\fR, i = \fBIPI\fR, and so forth); the number is the
428 Report the trap/interrupt rates (per second).
453 \fBCPU\fR context switches
456 When executed in a \fBzone\fR and if the pools facility is active, all of the
457 above only report actitivity on the processors in the processor set of the
467 Give a breakdown of percentage usage of \fBCPU\fR time. On \fBMP\fR systems,
468 this is an average across all processors.
496 When executed in a \fBzone\fR and if the pools facility is active, all of the
497 above only report actitivity on the processors in the processor set of the
503 See \fBattributes\fR(5) for descriptions of the following attributes:
511 ATTRIBUTE TYPE ATTRIBUTE VALUE
513 Interface Stability See below.
518 Invocation is evolving. Human readable output is unstable.
521 \fBdate\fR(1), \fBsar\fR(1), \fBiostat\fR(8), \fBmpstat\fR(8), \fBsar\fR(8),
522 \fBtime\fR(2), \fBattributes\fR(5)
525 The sum of CPU utilization might vary slightly from 100 because of rounding
526 errors in the production of a percentage figure.