xref: /netbsd/usr.bin/vmstat/vmstat.1 (revision bf9ec67e)
1.\"	$NetBSD: vmstat.1,v 1.6 2002/02/08 01:36:37 ross Exp $
2.\"
3.\" Copyright (c) 2000 The NetBSD Foundation, Inc.
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.
45.\" 3. All advertising materials mentioning features or use of this software
46.\"    must display the following acknowledgement:
47.\"	This product includes software developed by the University of
48.\"	California, Berkeley and its contributors.
49.\" 4. Neither the name of the University nor the names of its contributors
50.\"    may be used to endorse or promote products derived from this software
51.\"    without specific prior written permission.
52.\"
53.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
54.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
55.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
56.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
57.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
58.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
59.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
60.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
61.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
62.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
63.\" SUCH DAMAGE.
64.\"
65.\"	@(#)vmstat.8	8.1 (Berkeley) 6/6/93
66.\"
67.Dd November 26, 2001
68.Dt VMSTAT 8
69.Os
70.Sh NAME
71.Nm vmstat
72.Nd report virtual memory statistics
73.Sh SYNOPSIS
74.Nm
75.Op Fl efHilLmsUv
76.Bk -words
77.Op Fl M Ar core
78.Ek
79.Bk -words
80.Op Fl N Ar system
81.Ek
82.Bk -words
83.Op Fl c Ar count
84.Ek
85.Bk -words
86.Op Fl h Ar hashname
87.Ek
88.Bk -words
89.Op Fl u Ar histname
90.Ek
91.Bk -words
92.Op Fl w Ar wait
93.Ek
94.Op Ar disks
95.Sh DESCRIPTION
96.Nm
97reports certain kernel statistics kept about process, virtual memory,
98disk, trap and cpu activity.
99.Pp
100The options are as follows:
101.Bl -tag -width xxxhistname
102.It Fl M Ar core
103Extract values associated with the name list from the specified core
104instead of the default
105.Pa /dev/mem .
106.It Fl N Ar system
107Extract the name list from the specified system instead of the default
108.Pa /netbsd .
109.It Fl c Ar count
110Repeat the display
111.Ar count
112times.
113The first display is for the time since a reboot and each subsequent report
114is for the time period since the last display.
115If no
116.Ar wait
117interval is specified, the default is 1 second.
118.It Fl e
119Report the values of system event counters.
120.It Fl f
121Report fork statistics.
122.It Fl h Ar hashname
123Report hash table statistics for
124.Ar hashname .
125.It Fl H
126Report all hash table statistics.
127.It Fl i
128Report the values of system interrupt counters.
129.It Fl l
130List the UVM histories being maintained by the kernel.
131.It Fl L
132List all the hashes supported for
133.Fl h
134and
135.Fl H .
136.It Fl m
137Report on the usage of kernel dynamic memory listed first by size of
138allocation and then by type of usage.
139.It Fl s
140Display the contents of the
141.Dv uvmexp
142structure. This contains various paging event and memory status counters.
143.It Fl u Ar histname
144Dump the specified UVM history.
145.It Fl U
146Dump all UVM histories.
147.It Fl v
148Print more verbose information.  When used with the
149.Fl i
150or
151.Fl e
152options, prints out all interrupts or event counters, not just those with
153non-zero values.
154.It Fl w Ar wait
155Pause
156.Ar wait
157seconds between each display.
158If no repeat
159.Ar count
160is specified, the default is infinity.
161.El
162.Pp
163By default,
164.Nm
165displays the following information:
166.Pp
167.Bl -tag -width memory
168.It procs
169Information about the numbers of processes in various states.
170.Pp
171.Bl -tag -width abcd -compact
172.It r
173in run queue
174.It b
175blocked for resources (i/o, paging, etc.)
176.It w
177runnable or short sleeper (\*[Lt] 20 secs) but swapped
178.El
179.It memory
180Information about the usage of virtual and real memory.
181Virtual pages (reported in units of 1024 bytes) are considered active if
182they belong to processes which are running or have run in the last 20
183seconds.
184.Pp
185.Bl -tag -width abcd -compact
186.It avm
187active virtual pages
188.It fre
189size of the free list
190.El
191.It page
192Information about page faults and paging activity.
193These are averaged every five seconds, and given in units per second.
194.Pp
195.Bl -tag -width abcd -compact
196.It flt
197total page faults
198.It re
199page reclaims (simulating reference bits)
200.It pi
201pages paged in
202.It po
203pages paged out
204.It fr
205pages freed per second
206.It sr
207pages scanned by clock algorithm, per-second
208.El
209.It disks
210Disk transfers per second.
211Typically paging will be split across the available drives.
212The header of the field is the first character of the disk name and
213the unit number.
214If more than four disk drives are configured in the system,
215.Nm
216displays only the first four drives.
217To force
218.Nm
219to display specific drives, their names may be supplied on the command line.
220.It faults
221Trap/interrupt rate averages per second over last 5 seconds.
222.Pp
223.Bl -tag -width abcd -compact
224.It in
225device interrupts per interval (including clock interrupts)
226.It sy
227system calls per interval
228.It cs
229cpu context switch rate (switches/interval)
230.El
231.It cpu
232Breakdown of percentage usage of CPU time.
233.Pp
234.Bl -tag -width abcd -compact
235.It us
236user time for normal and low priority processes
237.It sy
238system time
239.It id
240cpu idle
241.El
242.El
243.Sh FILES
244.Bl -tag -width eeenymeeny -compact
245.It Pa /netbsd
246default kernel namelist
247.It Pa /dev/mem
248default memory file
249.El
250.Sh EXAMPLES
251The command
252.Dq Li vmstat -w 5
253will print what the system is doing every five
254seconds; this is a good choice of printing interval since this is how often
255some of the statistics are sampled in the system.
256Others vary every second and running the output for a while will make it
257apparent which are recomputed every second.
258.Sh SEE ALSO
259.Xr fstat 1 ,
260.Xr netstat 1 ,
261.Xr nfsstat 1 ,
262.Xr ps 1 ,
263.Xr systat 1 ,
264.Xr iostat 8 ,
265.Xr pstat 8
266.Pp
267The sections starting with
268.Dq Interpreting system activity
269in
270.%T Installing and Operating 4.3BSD .
271.Sh BUGS
272The
273.Fl c
274and
275.Fl w
276options are only available with the default output.
277.Pp
278The
279.Fl l ,
280.Fl u ,
281and
282.Fl U
283options are useful only if the system was compiled with support for UVM
284history.
285