docs - Update shm_open(3) manual page
[dragonfly.git] / usr.bin / vmstat / vmstat.8
blob5e9b9632d6f8a9c5da3576d9d215a7ee4c6c251d
1 .\" Copyright (c) 1986, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)vmstat.8    8.1 (Berkeley) 6/6/93
29 .\" $FreeBSD: src/usr.bin/vmstat/vmstat.8,v 1.16.2.5 2001/08/16 13:17:13 ru Exp $
30 .\" $DragonFly: src/usr.bin/vmstat/vmstat.8,v 1.6 2008/09/02 11:50:46 matthias Exp $
31 .\"
32 .Dd May 30, 2013
33 .Dt VMSTAT 8
34 .Os
35 .Sh NAME
36 .Nm vmstat
37 .Nd report virtual memory statistics
38 .Sh SYNOPSIS
39 .Nm
40 .\" .Op Fl bfimst
41 .Op Fl imosuvz
42 .Op Fl c Ar count
43 .Op Fl M Ar core
44 .Op Fl N Ar system
45 .Op Fl w Ar wait
46 .Op Fl n Ar devs
47 .Oo
48 .Fl p
49 .Sm off
50 .Ar type , if , pass
51 .Sm on
52 .Oc
53 .Op Ar disks
54 .Sh DESCRIPTION
55 .Nm Vmstat
56 reports certain kernel statistics kept about process, virtual memory,
57 disk, trap and cpu activity.
58 .Pp
59 The options are as follows:
60 .Bl -tag -width indent
61 .It Fl b
62 Formatted numbers use a brief format which some may find
63 more readable with looped output.
64 .It Fl c
65 Repeat the display
66 .Ar count
67 times.
68 The first display is for the time since a reboot and each subsequent
69 report is for the time period since the last display.
70 If no repeat
71 .Ar count
72 is specified, and
73 .Fl w
74 is specified, the default is infinity, otherwise the default is one.
75 .\" .It Fl f
76 .\" Report on the number
77 .\" .Xr fork 2
78 .\" and
79 .\" .Xr vfork 2
80 .\" system calls since system startup, and the number of pages of virtual memory
81 .\" involved in each.
82 .It Fl i
83 Report on the number of interrupts taken by each device since system
84 startup.
85 .It Fl M
86 Extract values associated with the name list from the specified
87 .Ar core
88 instead of the default
89 .Pa /dev/kmem .
90 .It Fl N
91 Extract the name list from the specified
92 .Ar system
93 instead of the default
94 .Pa /boot/kernel .
95 .It Fl m
96 Report on the usage of kernel dynamic memory listed first by size of
97 allocation and then by type of usage.
98 .It Fl n
99 Change the maximum number of disks to display from the default of 2.
100 .It Fl o
101 Report the usage of kernel object cache.
102 It only works on the running system.
103 .It Fl p
104 Specify which types of devices to display.  There are three different
105 categories of devices:
107 .Bl -tag -width indent -compact
108 .It device type:
109 .Bl -tag -width 9n -compact
110 .It da
111 Direct Access devices
112 .It sa
113 Sequential Access devices
114 .It printer
115 Printers
116 .It proc
117 Processor devices
118 .It worm
119 Write Once Read Multiple devices
120 .It cd
121 CD devices
122 .It scanner
123 Scanner devices
124 .It optical
125 Optical Memory devices
126 .It changer
127 Medium Changer devices
128 .It comm
129 Communication devices
130 .It array
131 Storage Array devices
132 .It enclosure
133 Enclosure Services devices
134 .It floppy
135 Floppy devices
138 .It interface:
139 .Bl -tag -width 9n -compact
140 .It IDE
141 Integrated Drive Electronics devices
142 .It SCSI
143 Small Computer System Interface devices
144 .It other
145 Any other device interface
148 .It passthrough:
149 .Bl -tag -width 9n -compact
150 .It pass
151 Passthrough devices
155 The user must specify at least one device type, and may specify at most
156 one device type from each category.  Multiple device types in a single
157 device type statement must be separated by commas.
159 Any number of
160 .Fl p
161 arguments may be specified on the command line.  All
162 .Fl p
163 arguments are ORed together to form a matching expression against which
164 all devices in the system are compared.  Any device that fully matches
166 .Fl p
167 argument will be included in the
169 output, up to three devices, or the maximum number of devices specified
170 by the user.
171 .It Fl s
172 Display the contents of the
173 .Em sum
174 structure, giving the total number of several kinds of paging related
175 events which have occurred since system startup.
176 .\" .It Fl t
177 .\" Report on the number of page in and page reclaims since system startup,
178 .\" and the amount of time required by each.
179 .It Fl u
180 Output unformatted numeric values, suitable for field extraction and
181 numeric sorting.
182 Columnar output will not be nicely aligned.
183 .It Fl v
184 If specified together with
185 .Fl i ,
186 include IRQ numbers and IRQ target CPU numbers before device names.
187 .It Fl w
188 Pause
189 .Ar wait
190 seconds between each display.
191 If no repeat
192 .Ar wait
193 interval is specified, the default is 1 second.
194 .It Fl z
195 Report on memory used by the kernel zone allocator, by zone.
196 The information shown is the same as that returned by the
197 .Va vm.zone
198 sysctl variable.
201 By default,
203 displays the following information:
204 .Bl -tag -width indent
205 .It procs
206 Information about the numbers of processes in various states.
208 .Bl -tag -width indent -compact
209 .It r
210 in run queue
211 .It b
212 blocked for resources (i/o, paging, etc.)
213 .It w
214 runnable or short sleeper (< 20 secs) but swapped
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.
222 .Bl -tag -width indent -compact
223 .It fre
224 Approximate free and easily-freeable memory.
226 .It page
227 Information about page faults and paging activity.
228 These are averaged each five seconds, and given in units per second.
230 .Bl -tag -width indent -compact
231 .It flt
232 total number of page faults
233 .It re
234 page reclaims (simulating reference bits)
235 .\" .It at
236 .\" pages attached (found in free list)
237 .It pi
238 pages paged in
239 .It po
240 pages paged out
241 .It fr
242 pages freed per second
243 .\" .It de
244 .\" anticipated short term memory shortfall
246 .It disks
247 Disk operations per second (this field is system dependent).
248 Typically paging will be split across the available drives.
249 The header of the field is the first two characters of the disk name and
250 the unit number.
251 If more than three disk drives are configured in the system,
253 displays only the first three drives, unless the user specifies the
254 .Fl n
255 argument to increase the number of drives displayed.  This will probably
256 cause the display to exceed 80 columns, however.
257 To force
259 to display specific drives, their names may be supplied on the command line.
261 defaults to show disks first, and then various other random devices in the
262 system to add up to three devices, if there are that many devices in the
263 system.  If devices are specified on the command line, or if a device type
264 matching pattern is specified (see above),
266 will only display the given devices or the devices matching the pattern,
267 and will not randomly select other devices in the system.
268 .It faults
269 Trap/interrupt rate averages per second over last 5 seconds.
271 .Bl -tag -width indent -compact
272 .It int
273 device interrupts per interval (including clock interrupts)
274 .It sys
275 system calls per interval
276 .It ctx
277 cpu context switch rate (switches/interval)
279 .It cpu
280 Breakdown of percentage usage of CPU time.
282 .Bl -tag -width indent -compact
283 .It us
284 user time for normal and low priority processes
285 .It sy
286 system time
287 .It id
288 cpu idle
291 .Sh FILES
292 .Bl -tag -width /dev/kmemxxx -compact
293 .It Pa /boot/kernel
294 default kernel namelist
295 .It Pa /dev/kmem
296 default memory file
298 .Sh EXAMPLES
299 The command:
300 .Dl vmstat -w 5
301 will print what the system is doing every five
302 seconds; this is a good choice of printing interval since this is how often
303 some of the statistics are sampled in the system.
304 Others vary every second and running the output for a while will make it
305 apparent which are recomputed every second.
307 The command:
308 .Dl vmstat -p da -p cd -w 1
309 will tell vmstat to select the first three direct access or CDROM devices
310 and display statistics on those devices, as well as other systems
311 statistics every second.
312 .Sh SEE ALSO
313 .Xr fstat 1 ,
314 .Xr netstat 1 ,
315 .Xr nfsstat 1 ,
316 .Xr ps 1 ,
317 .Xr systat 1 ,
318 .Xr iostat 8 ,
319 .Xr pstat 8 ,
320 .Xr sysctl 8
322 The sections starting with ``Interpreting system activity'' in
323 .%T "Installing and Operating 4.3BSD" .
324 .Sh BUGS
326 .Fl c
328 .Fl w
329 options are only available with the default output.