xref: /netbsd/usr.bin/vmstat/vmstat.1 (revision c4a72b64)
1.\"	$NetBSD: vmstat.1,v 1.8 2002/11/07 13:40:16 enami 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 1
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.
143This contains various paging event and memory status counters.
144.It Fl u Ar histname
145Dump the specified UVM history.
146.It Fl U
147Dump all UVM histories.
148.It Fl v
149Print more verbose information.
150When used with the
151.Fl i
152or
153.Fl e
154options, prints out all interrupts or event counters, not just those with
155non-zero values.
156.It Fl w Ar wait
157Pause
158.Ar wait
159seconds between each display.
160If no repeat
161.Ar count
162is specified, the default is infinity.
163.El
164.Pp
165By default,
166.Nm
167displays the following information:
168.Pp
169.Bl -tag -width memory
170.It procs
171Information about the numbers of processes in various states.
172.Pp
173.Bl -tag -width abcd -compact
174.It r
175in run queue
176.It b
177blocked for resources (i/o, paging, etc.)
178.It w
179runnable or short sleeper (\*[Lt] 20 secs) but swapped
180.El
181.It memory
182Information about the usage of virtual and real memory.
183Virtual pages (reported in units of 1024 bytes) are considered active if
184they belong to processes which are running or have run in the last 20
185seconds.
186.Pp
187.Bl -tag -width abcd -compact
188.It avm
189active virtual pages
190.It fre
191size of the free list
192.El
193.It page
194Information about page faults and paging activity.
195These are averaged every five seconds, and given in units per second.
196.Pp
197.Bl -tag -width abcd -compact
198.It flt
199total page faults
200.It re
201page reclaims (simulating reference bits)
202.It pi
203pages paged in
204.It po
205pages paged out
206.It fr
207pages freed per second
208.It sr
209pages scanned by clock algorithm, per-second
210.El
211.It disks
212Disk transfers per second.
213Typically paging will be split across the available drives.
214The header of the field is the first character of the disk name and
215the unit number.
216If more than four disk drives are configured in the system,
217.Nm
218displays only the first four drives.
219To force
220.Nm
221to display specific drives, their names may be supplied on the command line.
222.It faults
223Trap/interrupt rate averages per second over last 5 seconds.
224.Pp
225.Bl -tag -width abcd -compact
226.It in
227device interrupts per interval (including clock interrupts)
228.It sy
229system calls per interval
230.It cs
231cpu context switch rate (switches/interval)
232.El
233.It cpu
234Breakdown of percentage usage of CPU time.
235.Pp
236.Bl -tag -width abcd -compact
237.It us
238user time for normal and low priority processes
239.It sy
240system time
241.It id
242cpu idle
243.El
244.El
245.Sh FILES
246.Bl -tag -width eeenymeeny -compact
247.It Pa /netbsd
248default kernel namelist
249.It Pa /dev/mem
250default memory file
251.El
252.Sh EXAMPLES
253The command
254.Dq Li vmstat -w 5
255will print what the system is doing every five
256seconds; this is a good choice of printing interval since this is how often
257some of the statistics are sampled in the system.
258Others vary every second and running the output for a while will make it
259apparent which are recomputed every second.
260.Sh SEE ALSO
261.Xr fstat 1 ,
262.Xr netstat 1 ,
263.Xr nfsstat 1 ,
264.Xr ps 1 ,
265.Xr systat 1 ,
266.Xr iostat 8 ,
267.Xr pstat 8
268.Pp
269The sections starting with
270.Dq Interpreting system activity
271in
272.%T Installing and Operating 4.3BSD .
273.Sh BUGS
274The
275.Fl c
276and
277.Fl w
278options are only available with the default output.
279.Pp
280The
281.Fl l ,
282.Fl u ,
283and
284.Fl U
285options are useful only if the system was compiled with support for UVM
286history.
287