Annotation of src/usr.bin/vmstat/vmstat.8, Revision 1.14
1.14 ! aaron 1: .\" $OpenBSD: vmstat.8,v 1.13 1999/06/05 01:21:49 aaron Exp $
1.3 deraadt 2: .\" $NetBSD: vmstat.8,v 1.12 1996/05/10 23:19:30 thorpej Exp $
1.1 deraadt 3: .\"
4: .\" Copyright (c) 1986, 1993
5: .\" The Regents of the University of California. All rights reserved.
6: .\"
7: .\" Redistribution and use in source and binary forms, with or without
8: .\" modification, are permitted provided that the following conditions
9: .\" are met:
10: .\" 1. Redistributions of source code must retain the above copyright
11: .\" notice, this list of conditions and the following disclaimer.
12: .\" 2. Redistributions in binary form must reproduce the above copyright
13: .\" notice, this list of conditions and the following disclaimer in the
14: .\" documentation and/or other materials provided with the distribution.
15: .\" 3. All advertising materials mentioning features or use of this software
16: .\" must display the following acknowledgement:
17: .\" This product includes software developed by the University of
18: .\" California, Berkeley and its contributors.
19: .\" 4. Neither the name of the University nor the names of its contributors
20: .\" may be used to endorse or promote products derived from this software
21: .\" without specific prior written permission.
22: .\"
23: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33: .\" SUCH DAMAGE.
34: .\"
35: .\" @(#)vmstat.8 8.1 (Berkeley) 6/6/93
36: .\"
1.8 deraadt 37: .Dd June 6, 1993
38: .Dt VMSTAT 8
39: .Os
40: .Sh NAME
41: .Nm vmstat
42: .Nd report virtual memory statistics
43: .Sh SYNOPSIS
44: .Nm vmstat
45: .Op Fl fimst
46: .Nm vmstat
47: .Op Fl c Ar count
1.9 janjaap 48: .Op Fl M Ar core
1.8 deraadt 49: .Op Fl N Ar system
50: .Op Fl w Ar wait
51: .Op disks
52: .Sh DESCRIPTION
53: .Nm vmstat
1.1 deraadt 54: reports certain kernel statistics kept about process, virtual memory,
55: disk, trap and cpu activity.
1.8 deraadt 56: .Pp
1.1 deraadt 57: The options are as follows:
1.8 deraadt 58: .Bl -tag -width "blah"
59: .It Fl c Ar count
1.1 deraadt 60: Repeat the display
1.8 deraadt 61: .Ar count
1.1 deraadt 62: times.
63: The first display is for the time since a reboot and each subsequent report
64: is for the time period since the last display.
65: If no
1.8 deraadt 66: .Ar wait
1.1 deraadt 67: interval is specified, the default is 1 second.
1.8 deraadt 68: .It Fl f
1.1 deraadt 69: Report on the number
1.8 deraadt 70: .Xr fork 2 ,
71: .Xr vfork 2 ,
1.1 deraadt 72: and
1.8 deraadt 73: .Xr rfork 2
1.1 deraadt 74: system calls since system startup, and the number of pages of virtual memory
75: involved in each.
1.8 deraadt 76: .It Fl i
1.1 deraadt 77: Report on the number of interrupts taken by each device since system
78: startup.
1.8 deraadt 79: .It Fl M Ar core
1.13 aaron 80: Extract values associated with the name list from the specified core
1.8 deraadt 81: instead of the default
82: .Pa /dev/mem .
83: .It Fl N Ar system
1.1 deraadt 84: Extract the name list from the specified system instead of the default
1.8 deraadt 85: .Pa /bsd .
86: .It Fl m
1.1 deraadt 87: Report on the usage of kernel dynamic memory listed first by size of
88: allocation and then by type of usage.
1.8 deraadt 89: .It Fl s
1.1 deraadt 90: Display the contents of the
1.8 deraadt 91: .Ar sum
1.1 deraadt 92: structure, giving the total number of several kinds of paging related
93: events which have occurred since system startup.
1.8 deraadt 94: .It Fl t
1.1 deraadt 95: Report on the number of page in and page reclaims since system startup,
96: and the amount of time required by each.
1.8 deraadt 97: .It Fl w Ar wait
1.1 deraadt 98: Pause
1.8 deraadt 99: .Ar wait
1.1 deraadt 100: seconds between each display.
101: If no repeat
1.8 deraadt 102: .Ar count
1.1 deraadt 103: is specified, the default is infinity.
1.8 deraadt 104: .El
105: .Pp
1.1 deraadt 106: By default,
1.8 deraadt 107: .Nm vmstat
108: displays the following information just once:
109: .Bl -tag -width "whatever"
110: .It procs
1.1 deraadt 111: Information about the numbers of processes in various states.
1.8 deraadt 112: .Pp
113: .Bl -inset -width xxxxxx -compact
114: .It Ar r
115: in run queue
116: .It Ar b
117: blocked for resources (i/o, paging, etc.)
118: .It Ar w
119: runnable or short sleeper (< 20 secs) but swapped
120: .El
121: .Pp
122: .It Ar memory
123: Information about the usage of virtual and real memory. Virtual pages
124: (reported in units of 1024 bytes) are considered active if they belong
125: to processes which are running or have run in the last 20 seconds.
126: .Pp
127: .Bl -inset -width xxxxxx -compact
128: .It Ar avm
129: active virtual pages
130: .It Ar fre
131: size of the free list
132: .El
133: .Pp
134: .It Ar page
1.1 deraadt 135: Information about page faults and paging activity.
136: These are averaged each five seconds, and given in units per second.
1.8 deraadt 137: .Pp
138: .Bl -inset -width xxxxxx -compact
139: .It Ar re
140: page reclaims (simulating reference bits)
141: .It Ar at
142: pages attached (found in free list)
143: .It Ar pi
144: pages paged in
145: .It Ar po
146: pages paged out
147: .It Ar fr
148: pages freed per second
149: .It Ar de
150: anticipated short term memory shortfall
151: .It Ar sr
152: pages scanned by clock algorithm, per-second
153: .El
154: .Pp
155: .It Ar disks
1.2 tholo 156: Disk transfers per second.
1.1 deraadt 157: Typically paging will be split across the available drives.
158: The header of the field is the first character of the disk name and
159: the unit number.
160: If more than four disk drives are configured in the system,
1.8 deraadt 161: .Nm vmstat
1.1 deraadt 162: displays only the first four drives.
163: To force
1.8 deraadt 164: .Nm vmstat
1.1 deraadt 165: to display specific drives, their names may be supplied on the command line.
1.8 deraadt 166: .Pp
167: .It Ar faults
1.1 deraadt 168: Trap/interrupt rate averages per second over last 5 seconds.
1.8 deraadt 169: .Pp
170: .Bl -inset -width xxxxxx -compact
171: .It Ar in
172: device interrupts per interval (including clock interrupts)
173: .It Ar sy
174: system calls per interval
175: .It Ar cs
176: cpu context switch rate (switches/interval)
177: .El
178: .Pp
179: .It Ar cpu
1.1 deraadt 180: Breakdown of percentage usage of CPU time.
1.8 deraadt 181: .Pp
182: .Bl -inset -width xxxxxx -compact
183: .It Ar us
184: user time for normal and low priority processes
185: .It Ar sy
186: system time
187: .It Ar id
188: cpu idle
189: .El
190: .El
191: .Sh EXAMPLES
1.6 deraadt 192: The command ``vmstat -w 5'' will print what the system is doing every five
1.1 deraadt 193: seconds; this is a good choice of printing interval since this is how often
194: some of the statistics are sampled in the system.
195: Others vary every second and running the output for a while will make it
196: apparent which are recomputed every second.
1.8 deraadt 197: .Sh FILES
198: .Bl -tag -width /etc/networks -compact
199: .It Pa /bsd
1.11 aaron 200: default kernel namelist
1.8 deraadt 201: .It Pa /dev/mem
1.11 aaron 202: default memory file
1.8 deraadt 203: .El
204: .Sh SEE ALSO
205: .Xr fstat 1 ,
206: .Xr netstat 1 ,
207: .Xr nfsstat 1 ,
208: .Xr ps 1 ,
209: .Xr systat 1 ,
210: .Xr iostat 8 ,
211: .Xr pstat 8
1.14 ! aaron 212: .Pp
1.1 deraadt 213: The sections starting with ``Interpreting system activity'' in
1.10 pjanzen 214: .%T "Installing and Operating 4.3BSD" .
1.8 deraadt 215: .Sh BUGS
216: The
217: .Fl c
218: and
219: .Fl w
220: options are only available with the default output.
221: .Pp
222: This manual page lacks an incredible amount of detail.