view usr/src/man/man1m/vmstat.1m @ 13659:57451298f940

1469 ttyc/ttyd should be an allowed console device Reviewed by: Milan Jurik <milan.jurik@xylab.cz> Reviewed by: Alexander Eremin <alexander.r.eremin@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net>
author Gary Mills <gary_mills@fastmail.fm>
date Thu, 05 Apr 2012 08:47:21 -0500
parents 5b2854ecc12d
children
line wrap: on
line source

'\" te
.\"  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]
.TH VMSTAT 1M "Mar 23, 2009"
.SH NAME
vmstat \- report virtual memory statistics
.SH SYNOPSIS
.LP
.nf
\fBvmstat\fR [\fB-cipqsS\fR] [\fB-T\fR u | d] [\fIdisks\fR] [\fIinterval\fR [\fIcount\fR]]
.fi

.SH DESCRIPTION
.sp
.LP
\fBvmstat\fR reports virtual memory statistics regarding kernel thread, virtual
memory, disk, trap, and \fBCPU\fR activity.
.sp
.LP
On \fBMP\fR (multi-processor) systems, \fBvmstat\fR averages the number of
\fBCPUs\fR into the output. For per-processor statistics, see \fBmpstat\fR(1M).
.sp
.LP
\fBvmstat\fR only supports statistics for certain devices. For more general
system statistics, use \fBsar\fR(1), \fBiostat\fR(1M), or \fBsar\fR(1M).
.sp
.LP
Without options, \fBvmstat\fR displays a one-line summary of the virtual memory
activity since the system was booted.
.sp
.LP
During execution of the kernel status command, the \fBstate\fR of the system
can change. If relevant, a state change message is included in the \fBvmstat\fR
output, in one of the following forms:
.sp
.in +2
.nf
<<device added: sd0>>
<<device removed: sd0>>
<<processors added: 1, 3>>
<<processors removed: 1, 3>>
.fi
.in -2
.sp

.sp
.LP
See \fI\fR for device naming conventions for disks.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-c\fR\fR
.ad
.RS 13n
Report cache flushing statistics. This option is obsolete, and no longer
meaningful. This option might be removed in a future version of Solaris.
.RE

.sp
.ne 2
.na
\fB\fB-i\fR\fR
.ad
.RS 13n
Report the number of interrupts per device. \fIcount\fR and \fIinterval\fR does
not apply to the \fB-i\fR option.
.RE

.sp
.ne 2
.na
\fB\fB-p\fR\fR
.ad
.RS 13n
Report paging activity in details. This option will display the following,
respectively:
.sp
.ne 2
.na
\fBepi\fR
.ad
.RS 7n
Executable page-ins.
.RE

.sp
.ne 2
.na
\fBepo\fR
.ad
.RS 7n
Executable page-outs.
.RE

.sp
.ne 2
.na
\fBepf\fR
.ad
.RS 7n
Executable page-frees.
.RE

.sp
.ne 2
.na
\fBapi\fR
.ad
.RS 7n
Anonymous page-ins.
.RE

.sp
.ne 2
.na
\fBapo\fR
.ad
.RS 7n
Anonymous page-outs.
.RE

.sp
.ne 2
.na
\fBapf\fR
.ad
.RS 7n
Anonymous page-frees.
.RE

.sp
.ne 2
.na
\fBfpi\fR
.ad
.RS 7n
File system page-ins.
.RE

.sp
.ne 2
.na
\fBfpo\fR
.ad
.RS 7n
File system page-outs.
.RE

.sp
.ne 2
.na
\fBfpf\fR
.ad
.RS 7n
File system page-frees.
.RE

When executed in a \fBzone\fR and if the pools facility is active, all of the
above only report actitivity on the processors in the processor set of the
\fBzone\fR's pool.
.RE

.sp
.ne 2
.na
\fB\fB-q\fR\fR
.ad
.RS 13n
Suppress messages related to state changes.
.RE

.sp
.ne 2
.na
\fB\fB-s\fR\fR
.ad
.RS 13n
Display the total number of various system events since boot. \fIcount\fR and
\fIinterval\fR does not apply to the \fB-s\fR option.
.RE

.sp
.ne 2
.na
\fB\fB-S\fR\fR
.ad
.RS 13n
Report on swapping rather than paging activity. This option will change two
fields in \fBvmstat\fR's ``paging'' display: rather than the ``re'' and ``mf''
fields, \fBvmstat\fR will report ``si'' (swap-ins) and ``so'' (swap-outs).
.RE

.sp
.ne 2
.na
\fB\fB-T\fR \fBu\fR |  \fBd\fR\fR
.ad
.RS 13n
Specify \fBu\fR for a printed representation of the internal representation of
time. See \fBtime\fR(2). Specify \fBd\fR for standard date format. See
\fBdate\fR(1).
.RE

.SH OPERANDS
.sp
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fIcount\fR\fR
.ad
.RS 12n
Specifies the number of times that the statistics are repeated. \fIcount\fR
does not apply to the \fB-i\fR and \fB-s\fR options.
.RE

.sp
.ne 2
.na
\fB\fIdisks\fR\fR
.ad
.RS 12n
Specifies which disks are to be given priority in the output (only four disks
fit on a line). Common disk names are \fBid\fR, \fBsd\fR, \fBxd\fR, or
\fBxy,\fR followed by a number (for example, \fBsd2\fR, \fBxd0\fR, and so
forth).
.RE

.sp
.ne 2
.na
\fB\fIinterval\fR\fR
.ad
.RS 12n
Specifies the last number of seconds over which \fBvmstat\fR summarizes
activity. This number of seconds repeats forever. \fIinterval\fR does not apply
to the \fB-i\fR and \fB-s\fR options.
.RE

.SH EXAMPLES
.LP
\fBExample 1 \fRUsing \fBvmstat\fR
.sp
.LP
The following command displays a summary of what the system is doing every five
seconds.

.sp
.in +2
.nf
example% \fBvmstat 5\fR


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%
.fi
.in -2
.sp

.sp
.LP
The fields of \fBvmstat\fR's display are

.sp
.ne 2
.na
\fB\fBkthr\fR\fR
.ad
.RS 10n
Report the number of kernel threads in each of the three following states:
.sp
.ne 2
.na
\fB\fBr\fR\fR
.ad
.RS 5n
the number of kernel threads in run queue
.RE

.sp
.ne 2
.na
\fB\fBb\fR\fR
.ad
.RS 5n
the number of blocked kernel threads that are waiting for resources \fBI/O,\fR
paging, and so forth
.RE

.sp
.ne 2
.na
\fB\fBw\fR\fR
.ad
.RS 5n
the number of swapped out lightweight processes (LWPs) that are waiting for
processing resources to finish.
.RE

.RE

.sp
.ne 2
.na
\fB\fBmemory\fR\fR
.ad
.RS 10n
Report on usage of virtual and real memory.
.sp
.ne 2
.na
\fB\fBswap\fR\fR
.ad
.RS 8n
available swap space (Kbytes)
.RE

.sp
.ne 2
.na
\fB\fBfree\fR\fR
.ad
.RS 8n
size of the free list (Kbytes)
.RE

.RE

.sp
.ne 2
.na
\fB\fBpage\fR\fR
.ad
.RS 10n
Report information about page faults and paging activity. The information on
each of the following activities is given in units per second.
.sp
.ne 2
.na
\fB\fBre\fR\fR
.ad
.RS 6n
page reclaims \(em but see the \fB-S\fR option for how this field is modified.
.RE

.sp
.ne 2
.na
\fB\fBmf\fR\fR
.ad
.RS 6n
minor faults \(em but see the \fB-S\fR option for how this field is modified.
.RE

.sp
.ne 2
.na
\fB\fBpi\fR\fR
.ad
.RS 6n
kilobytes paged in
.RE

.sp
.ne 2
.na
\fB\fBpo\fR\fR
.ad
.RS 6n
kilobytes paged out
.RE

.sp
.ne 2
.na
\fB\fBfr\fR\fR
.ad
.RS 6n
kilobytes freed
.RE

.sp
.ne 2
.na
\fB\fBde\fR\fR
.ad
.RS 6n
anticipated short-term memory shortfall (Kbytes)
.RE

.sp
.ne 2
.na
\fB\fBsr\fR\fR
.ad
.RS 6n
pages scanned by clock algorithm
.RE

When executed in a \fBzone\fR and if the pools facility is active, all of the
above (except for "de") only report activity on the processors in the processor
set of the \fBzone\fR's pool.
.RE

.sp
.ne 2
.na
\fB\fBdisk\fR\fR
.ad
.RS 10n
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 = \fBSCSI\fR, i = \fBIPI\fR, and so forth); the number is the
logical unit number.
.RE

.sp
.ne 2
.na
\fB\fBfaults\fR\fR
.ad
.RS 10n
Report the trap/interrupt rates (per second).
.sp
.ne 2
.na
\fB\fBin\fR\fR
.ad
.RS 6n
interrupts
.RE

.sp
.ne 2
.na
\fB\fBsy\fR\fR
.ad
.RS 6n
system calls
.RE

.sp
.ne 2
.na
\fB\fBcs\fR\fR
.ad
.RS 6n
\fBCPU\fR context switches
.RE

When executed in a \fBzone\fR and if the pools facility is active, all of the
above only report actitivity on the processors in the processor set of the
\fBzone\fR's pool.
.RE

.sp
.ne 2
.na
\fB\fBcpu\fR\fR
.ad
.RS 10n
Give a breakdown of percentage usage of \fBCPU\fR time. On \fBMP\fR systems,
this is an average across all processors.
.sp
.ne 2
.na
\fB\fBus\fR\fR
.ad
.RS 6n
user time
.RE

.sp
.ne 2
.na
\fB\fBsy\fR\fR
.ad
.RS 6n
system time
.RE

.sp
.ne 2
.na
\fB\fBid\fR\fR
.ad
.RS 6n
idle time
.RE

When executed in a \fBzone\fR and if the pools facility is active, all of the
above only report actitivity on the processors in the processor set of the
\fBzone\fR's pool.
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	See below.
.TE

.sp
.LP
Invocation is evolving. Human readable output is unstable.
.SH SEE ALSO
.sp
.LP
\fBdate\fR(1), \fBsar\fR(1), \fBiostat\fR(1M), \fBmpstat\fR(1M), \fBsar\fR(1M),
\fBtime\fR(2), \fBattributes\fR(5)
.SH NOTES
.sp
.LP
The sum of CPU utilization might vary slightly from 100 because of rounding
errors in the production of a percentage figure.
.sp
.LP
The \fB-c\fR option (Report cache flushing statistics) is not supported in this
release.