Annotation of src/usr.bin/vmstat/vmstat.1, Revision 1.17
1.17 ! ad 1: .\" $NetBSD: vmstat.1,v 1.16 2005/03/10 16:29:04 wiz Exp $
1.1 wiz 2: .\"
1.17 ! ad 3: .\" Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
1.1 wiz 4: .\" All rights reserved.
5: .\"
6: .\" Redistribution and use in source and binary forms, with or without
7: .\" modification, are permitted provided that the following conditions
8: .\" are met:
9: .\" 1. Redistributions of source code must retain the above copyright
10: .\" notice, this list of conditions and the following disclaimer.
11: .\" 2. Redistributions in binary form must reproduce the above copyright
12: .\" notice, this list of conditions and the following disclaimer in the
13: .\" documentation and/or other materials provided with the distribution.
14: .\" 3. All advertising materials mentioning features or use of this software
15: .\" must display the following acknowledgement:
16: .\" This product includes software developed by the NetBSD
17: .\" Foundation, Inc. and its contributors.
18: .\" 4. Neither the name of The NetBSD Foundation nor the names of its
19: .\" contributors may be used to endorse or promote products derived
20: .\" from this software without specific prior written permission.
21: .\"
22: .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
23: .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
24: .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25: .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
26: .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27: .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28: .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29: .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30: .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31: .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32: .\" POSSIBILITY OF SUCH DAMAGE.
33: .\"
34: .\" Copyright (c) 1986, 1993
35: .\" The Regents of the University of California. All rights reserved.
36: .\"
37: .\" Redistribution and use in source and binary forms, with or without
38: .\" modification, are permitted provided that the following conditions
39: .\" are met:
40: .\" 1. Redistributions of source code must retain the above copyright
41: .\" notice, this list of conditions and the following disclaimer.
42: .\" 2. Redistributions in binary form must reproduce the above copyright
43: .\" notice, this list of conditions and the following disclaimer in the
44: .\" documentation and/or other materials provided with the distribution.
1.11 agc 45: .\" 3. Neither the name of the University nor the names of its contributors
1.1 wiz 46: .\" may be used to endorse or promote products derived from this software
47: .\" without specific prior written permission.
48: .\"
49: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
50: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
51: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
52: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
53: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
55: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
56: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
57: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
58: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
59: .\" SUCH DAMAGE.
60: .\"
61: .\" @(#)vmstat.8 8.1 (Berkeley) 6/6/93
62: .\"
1.17 ! ad 63: .Dd November 6, 2007
1.8 enami 64: .Dt VMSTAT 1
1.1 wiz 65: .Os
66: .Sh NAME
67: .Nm vmstat
68: .Nd report virtual memory statistics
69: .Sh SYNOPSIS
1.9 wiz 70: .Nm
1.17 ! ad 71: .Op Fl CefHiLlmstUvW
1.14 wiz 72: .Op Fl c Ar count
73: .Op Fl h Ar hashname
1.1 wiz 74: .Op Fl M Ar core
75: .Op Fl N Ar system
1.3 lukem 76: .Op Fl u Ar histname
1.1 wiz 77: .Op Fl w Ar wait
78: .Op Ar disks
79: .Sh DESCRIPTION
80: .Nm
81: reports certain kernel statistics kept about process, virtual memory,
1.14 wiz 82: disk, trap, and CPU activity.
1.1 wiz 83: .Pp
84: The options are as follows:
1.3 lukem 85: .Bl -tag -width xxxhistname
1.17 ! ad 86: .It Fl C
! 87: Report on kernel memory caches.
! 88: Combine with the
! 89: .Fl m
! 90: option to see information about memory pools that back the caches.
1.1 wiz 91: .It Fl c Ar count
92: Repeat the display
93: .Ar count
94: times.
95: The first display is for the time since a reboot and each subsequent report
96: is for the time period since the last display.
97: If no
98: .Ar wait
99: interval is specified, the default is 1 second.
100: .It Fl e
101: Report the values of system event counters.
102: .It Fl f
103: Report fork statistics.
1.14 wiz 104: .It Fl H
105: Report all hash table statistics.
1.5 lukem 106: .It Fl h Ar hashname
107: Report hash table statistics for
108: .Ar hashname .
1.1 wiz 109: .It Fl i
110: Report the values of system interrupt counters.
1.5 lukem 111: .It Fl L
112: List all the hashes supported for
113: .Fl h
114: and
115: .Fl H .
1.14 wiz 116: .It Fl l
117: List the UVM histories being maintained by the kernel.
118: .It Fl M Ar core
119: Extract values associated with the name list from the specified core
120: instead of the default
121: .Pa /dev/mem .
1.1 wiz 122: .It Fl m
123: Report on the usage of kernel dynamic memory listed first by size of
1.14 wiz 124: allocation and then by type of usage,
125: followed by a list of the kernel memory pools and their usage.
126: .It Fl N Ar system
127: Extract the name list from the specified system instead of the default
128: .Pa /netbsd .
1.1 wiz 129: .It Fl s
130: Display the contents of the
1.2 ross 131: .Dv uvmexp
1.7 grant 132: structure.
133: This contains various paging event and memory status counters.
1.15 he 134: .It Fl t
135: Display the contents of the
136: .Dv vmtotal
137: structure.
138: This includes information about processes and virtual memory.
139: .Pp
140: The process part shows the number of processes in the following states:
141: .Pp
142: .Bl -tag -width abc -compact
143: .It ru
144: on the run queue
145: .It dw
146: in disk I/O wait
147: .It pw
148: waiting for paging
149: .It sl
150: sleeping while resident
151: .It sw
152: swapped out, but either runnable or in short-term blocking state
153: .El
154: .Pp
155: The virtual memory section shows:
156: .Pp
157: .Bl -tag -width abcdefgh -compact
158: .It total-v
159: Total virtual memory
160: .It active-v
161: Active virtual memory in use
162: .It active-r
163: Active real memory in use
164: .It vm-sh
165: Shared virtual memory
166: .It avm-sh
167: Active shared virtual memory
168: .It rm-sh
169: Shared real memory
170: .It arm-sh
171: Active shared real memory
172: .It free
173: Free memory
174: .El
175: .Pp
176: All memory values are shown in number of pages.
1.14 wiz 177: .It Fl U
178: Dump all UVM histories.
1.3 lukem 179: .It Fl u Ar histname
180: Dump the specified UVM history.
1.1 wiz 181: .It Fl v
1.7 grant 182: Print more verbose information.
183: When used with the
1.10 dsl 184: .Fl i ,
1.14 wiz 185: .Fl e ,
1.1 wiz 186: or
1.10 dsl 187: .Fl m
188: options prints out all counters, not just those with non-zero values.
1.13 simonb 189: .It Fl W
190: Print more verbose information about kernel memory pools.
1.1 wiz 191: .It Fl w Ar wait
192: Pause
193: .Ar wait
194: seconds between each display.
195: If no repeat
196: .Ar count
197: is specified, the default is infinity.
198: .El
199: .Pp
200: By default,
201: .Nm
202: displays the following information:
203: .Pp
204: .Bl -tag -width memory
205: .It procs
206: Information about the numbers of processes in various states.
207: .Pp
208: .Bl -tag -width abcd -compact
209: .It r
210: in run queue
211: .It b
212: blocked for resources (i/o, paging, etc.)
213: .It w
1.6 ross 214: runnable or short sleeper (\*[Lt] 20 secs) but swapped
1.1 wiz 215: .El
216: .It memory
217: Information about the usage of virtual and real memory.
218: Virtual pages (reported in units of 1024 bytes) are considered active if
219: they belong to processes which are running or have run in the last 20
220: seconds.
221: .Pp
222: .Bl -tag -width abcd -compact
223: .It avm
224: active virtual pages
225: .It fre
226: size of the free list
227: .El
228: .It page
229: Information about page faults and paging activity.
1.4 wiz 230: These are averaged every five seconds, and given in units per second.
1.1 wiz 231: .Pp
232: .Bl -tag -width abcd -compact
233: .It flt
234: total page faults
235: .It re
236: page reclaims (simulating reference bits)
237: .It pi
238: pages paged in
239: .It po
240: pages paged out
241: .It fr
242: pages freed per second
243: .It sr
244: pages scanned by clock algorithm, per-second
245: .El
246: .It disks
247: Disk transfers per second.
248: Typically paging will be split across the available drives.
249: The header of the field is the first character of the disk name and
250: the unit number.
251: If more than four disk drives are configured in the system,
252: .Nm
253: displays only the first four drives.
254: To force
255: .Nm
256: to display specific drives, their names may be supplied on the command line.
257: .It faults
258: Trap/interrupt rate averages per second over last 5 seconds.
259: .Pp
260: .Bl -tag -width abcd -compact
261: .It in
262: device interrupts per interval (including clock interrupts)
263: .It sy
264: system calls per interval
265: .It cs
1.12 wiz 266: CPU context switch rate (switches/interval)
1.1 wiz 267: .El
268: .It cpu
269: Breakdown of percentage usage of CPU time.
270: .Pp
271: .Bl -tag -width abcd -compact
272: .It us
273: user time for normal and low priority processes
274: .It sy
275: system time
276: .It id
1.12 wiz 277: CPU idle
1.1 wiz 278: .El
279: .El
1.4 wiz 280: .Sh FILES
281: .Bl -tag -width eeenymeeny -compact
282: .It Pa /netbsd
283: default kernel namelist
284: .It Pa /dev/mem
285: default memory file
286: .El
1.1 wiz 287: .Sh EXAMPLES
1.3 lukem 288: The command
289: .Dq Li vmstat -w 5
290: will print what the system is doing every five
1.1 wiz 291: seconds; this is a good choice of printing interval since this is how often
292: some of the statistics are sampled in the system.
293: Others vary every second and running the output for a while will make it
294: apparent which are recomputed every second.
295: .Sh SEE ALSO
296: .Xr fstat 1 ,
297: .Xr netstat 1 ,
298: .Xr nfsstat 1 ,
299: .Xr ps 1 ,
300: .Xr systat 1 ,
301: .Xr iostat 8 ,
302: .Xr pstat 8
303: .Pp
1.3 lukem 304: The sections starting with
305: .Dq Interpreting system activity
306: in
1.1 wiz 307: .%T Installing and Operating 4.3BSD .
308: .Sh BUGS
309: The
310: .Fl c
311: and
312: .Fl w
313: options are only available with the default output.
314: .Pp
315: The
1.3 lukem 316: .Fl l ,
1.14 wiz 317: .Fl U ,
1.1 wiz 318: and
1.14 wiz 319: .Fl u
1.1 wiz 320: options are useful only if the system was compiled with support for UVM
321: history.
CVSweb <webmaster@jp.NetBSD.org>