Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man8 / vmstat.8
blob24c5516c9e91d42aec2a71e99e96c5d800834c57
1 '\" te
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"
7 .SH NAME
8 vmstat \- report virtual memory statistics
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBvmstat\fR [\fB-ipqsS\fR] [\fB-T\fR u | d] [\fIdisks\fR] [\fIinterval\fR [\fIcount\fR]]
13 .fi
15 .SH DESCRIPTION
16 .LP
17 \fBvmstat\fR reports virtual memory statistics regarding kernel thread, virtual
18 memory, disk, trap, and \fBCPU\fR activity.
19 .sp
20 .LP
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).
23 .sp
24 .LP
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).
27 .sp
28 .LP
29 Without options, \fBvmstat\fR displays a one-line summary of the virtual memory
30 activity since the system was booted.
31 .sp
32 .LP
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:
36 .sp
37 .in +2
38 .nf
39 <<device added: sd0>>
40 <<device removed: sd0>>
41 <<processors added: 1, 3>>
42 <<processors removed: 1, 3>>
43 .fi
44 .in -2
45 .sp
47 .sp
48 .LP
49 See \fI\fR for device naming conventions for disks.
50 .SH OPTIONS
51 .LP
52 The following options are supported:
53 .sp
54 .ne 2
55 .na
56 \fB\fB-i\fR\fR
57 .ad
58 .RS 13n
59 Report the number of interrupts per device. \fIcount\fR and \fIinterval\fR does
60 not apply to the \fB-i\fR option.
61 .RE
63 .sp
64 .ne 2
65 .na
66 \fB\fB-p\fR\fR
67 .ad
68 .RS 13n
69 Report paging activity in details. This option will display the following,
70 respectively:
71 .sp
72 .ne 2
73 .na
74 \fBepi\fR
75 .ad
76 .RS 7n
77 Executable page-ins.
78 .RE
80 .sp
81 .ne 2
82 .na
83 \fBepo\fR
84 .ad
85 .RS 7n
86 Executable page-outs.
87 .RE
89 .sp
90 .ne 2
91 .na
92 \fBepf\fR
93 .ad
94 .RS 7n
95 Executable page-frees.
96 .RE
98 .sp
99 .ne 2
101 \fBapi\fR
103 .RS 7n
104 Anonymous page-ins.
108 .ne 2
110 \fBapo\fR
112 .RS 7n
113 Anonymous page-outs.
117 .ne 2
119 \fBapf\fR
121 .RS 7n
122 Anonymous page-frees.
126 .ne 2
128 \fBfpi\fR
130 .RS 7n
131 File system page-ins.
135 .ne 2
137 \fBfpo\fR
139 .RS 7n
140 File system page-outs.
144 .ne 2
146 \fBfpf\fR
148 .RS 7n
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
154 \fBzone\fR's pool.
158 .ne 2
160 \fB\fB-q\fR\fR
162 .RS 13n
163 Suppress messages related to state changes.
167 .ne 2
169 \fB\fB-s\fR\fR
171 .RS 13n
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.
177 .ne 2
179 \fB\fB-S\fR\fR
181 .RS 13n
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).
188 .ne 2
190 \fB\fB-T\fR \fBu\fR |  \fBd\fR\fR
192 .RS 13n
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
195 \fBdate\fR(1).
198 .SH OPERANDS
200 The following operands are supported:
202 .ne 2
204 \fB\fIcount\fR\fR
206 .RS 12n
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.
212 .ne 2
214 \fB\fIdisks\fR\fR
216 .RS 12n
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
220 forth).
224 .ne 2
226 \fB\fIinterval\fR\fR
228 .RS 12n
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.
234 .SH EXAMPLES
236 \fBExample 1 \fRUsing \fBvmstat\fR
239 The following command displays a summary of what the system is doing every five
240 seconds.
243 .in +2
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
260 example%
262 .in -2
267 The fields of \fBvmstat\fR's display are
270 .ne 2
272 \fB\fBkthr\fR\fR
274 .RS 10n
275 Report the number of kernel threads in each of the three following states:
277 .ne 2
279 \fB\fBr\fR\fR
281 .RS 5n
282 the number of kernel threads in run queue
286 .ne 2
288 \fB\fBb\fR\fR
290 .RS 5n
291 the number of blocked kernel threads that are waiting for resources \fBI/O,\fR
292 paging, and so forth
296 .ne 2
298 \fB\fBw\fR\fR
300 .RS 5n
301 the number of swapped out lightweight processes (LWPs) that are waiting for
302 processing resources to finish.
308 .ne 2
310 \fB\fBmemory\fR\fR
312 .RS 10n
313 Report on usage of virtual and real memory.
315 .ne 2
317 \fB\fBswap\fR\fR
319 .RS 8n
320 available swap space (Kbytes)
324 .ne 2
326 \fB\fBfree\fR\fR
328 .RS 8n
329 size of the free list (Kbytes)
335 .ne 2
337 \fB\fBpage\fR\fR
339 .RS 10n
340 Report information about page faults and paging activity. The information on
341 each of the following activities is given in units per second.
343 .ne 2
345 \fB\fBre\fR\fR
347 .RS 6n
348 page reclaims \(em but see the \fB-S\fR option for how this field is modified.
352 .ne 2
354 \fB\fBmf\fR\fR
356 .RS 6n
357 minor faults \(em but see the \fB-S\fR option for how this field is modified.
361 .ne 2
363 \fB\fBpi\fR\fR
365 .RS 6n
366 kilobytes paged in
370 .ne 2
372 \fB\fBpo\fR\fR
374 .RS 6n
375 kilobytes paged out
379 .ne 2
381 \fB\fBfr\fR\fR
383 .RS 6n
384 kilobytes freed
388 .ne 2
390 \fB\fBde\fR\fR
392 .RS 6n
393 anticipated short-term memory shortfall (Kbytes)
397 .ne 2
399 \fB\fBsr\fR\fR
401 .RS 6n
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.
411 .ne 2
413 \fB\fBdisk\fR\fR
415 .RS 10n
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
419 logical unit number.
423 .ne 2
425 \fB\fBfaults\fR\fR
427 .RS 10n
428 Report the trap/interrupt rates (per second).
430 .ne 2
432 \fB\fBin\fR\fR
434 .RS 6n
435 interrupts
439 .ne 2
441 \fB\fBsy\fR\fR
443 .RS 6n
444 system calls
448 .ne 2
450 \fB\fBcs\fR\fR
452 .RS 6n
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
458 \fBzone\fR's pool.
462 .ne 2
464 \fB\fBcpu\fR\fR
466 .RS 10n
467 Give a breakdown of percentage usage of \fBCPU\fR time. On \fBMP\fR systems,
468 this is an average across all processors.
470 .ne 2
472 \fB\fBus\fR\fR
474 .RS 6n
475 user time
479 .ne 2
481 \fB\fBsy\fR\fR
483 .RS 6n
484 system time
488 .ne 2
490 \fB\fBid\fR\fR
492 .RS 6n
493 idle time
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
498 \fBzone\fR's pool.
501 .SH ATTRIBUTES
503 See \fBattributes\fR(5) for descriptions of the following attributes:
508 box;
509 c | c
510 l | l .
511 ATTRIBUTE TYPE  ATTRIBUTE VALUE
513 Interface Stability     See below.
518 Invocation is evolving. Human readable output is unstable.
519 .SH SEE ALSO
521 \fBdate\fR(1), \fBsar\fR(1), \fBiostat\fR(8), \fBmpstat\fR(8), \fBsar\fR(8),
522 \fBtime\fR(2), \fBattributes\fR(5)
523 .SH NOTES
525 The sum of CPU utilization might vary slightly from 100 because of rounding
526 errors in the production of a percentage figure.