1 .\" Copyright (c) 1986, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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
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 $
37 .Nd report virtual memory statistics
56 reports certain kernel statistics kept about process, virtual memory,
57 disk, trap and cpu activity.
59 The options are as follows:
60 .Bl -tag -width indent
62 Formatted numbers use a brief format which some may find
63 more readable with looped output.
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.
74 is specified, the default is infinity, otherwise the default is one.
76 .\" Report on the number
80 .\" system calls since system startup, and the number of pages of virtual memory
83 Report on the number of interrupts taken by each device since system
86 Extract values associated with the name list from the specified
88 instead of the default
91 Extract the name list from the specified
93 instead of the default
96 Report on the usage of kernel dynamic memory listed first by size of
97 allocation and then by type of usage.
99 Change the maximum number of disks to display from the default of 2.
101 Specify which types of devices to display. There are three different
102 categories of devices:
104 .Bl -tag -width indent -compact
106 .Bl -tag -width 9n -compact
108 Direct Access devices
110 Sequential Access devices
116 Write Once Read Multiple devices
122 Optical Memory devices
124 Medium Changer devices
126 Communication devices
128 Storage Array devices
130 Enclosure Services devices
136 .Bl -tag -width 9n -compact
138 Integrated Drive Electronics devices
140 Small Computer System Interface devices
142 Any other device interface
146 .Bl -tag -width 9n -compact
152 The user must specify at least one device type, and may specify at most
153 one device type from each category. Multiple device types in a single
154 device type statement must be separated by commas.
158 arguments may be specified on the command line. All
160 arguments are ORed together to form a matching expression against which
161 all devices in the system are compared. Any device that fully matches
164 argument will be included in the
166 output, up to three devices, or the maximum number of devices specified
169 Display the contents of the
171 structure, giving the total number of several kinds of paging related
172 events which have occurred since system startup.
174 .\" Report on the number of page in and page reclaims since system startup,
175 .\" and the amount of time required by each.
177 Output unformatted numeric values, suitable for field extraction and
179 Columnar output will not be nicely aligned.
181 If specified together with
183 include IRQ numbers and IRQ target CPU numbers before device names.
187 seconds between each display.
190 interval is specified, the default is 1 second.
192 Report on memory used by the kernel zone allocator, by zone.
193 The information shown is the same as that returned by the
200 displays the following information:
201 .Bl -tag -width indent
203 Information about the numbers of processes in various states.
205 .Bl -tag -width indent -compact
209 blocked for resources (i/o, paging, etc.)
211 runnable or short sleeper (< 20 secs) but swapped
214 Information about the usage of virtual and real memory.
215 Virtual pages (reported in units of 1024 bytes) are considered active if
216 they belong to processes which are running or have run in the last 20
219 .Bl -tag -width indent -compact
221 Approximate free and easily-freeable memory.
224 Information about page faults and paging activity.
225 These are averaged each five seconds, and given in units per second.
227 .Bl -tag -width indent -compact
229 total number of page faults
231 page reclaims (simulating reference bits)
233 .\" pages attached (found in free list)
239 pages freed per second
241 .\" anticipated short term memory shortfall
244 Disk operations per second (this field is system dependent).
245 Typically paging will be split across the available drives.
246 The header of the field is the first two characters of the disk name and
248 If more than three disk drives are configured in the system,
250 displays only the first three drives, unless the user specifies the
252 argument to increase the number of drives displayed. This will probably
253 cause the display to exceed 80 columns, however.
256 to display specific drives, their names may be supplied on the command line.
258 defaults to show disks first, and then various other random devices in the
259 system to add up to three devices, if there are that many devices in the
260 system. If devices are specified on the command line, or if a device type
261 matching pattern is specified (see above),
263 will only display the given devices or the devices matching the pattern,
264 and will not randomly select other devices in the system.
266 Trap/interrupt rate averages per second over last 5 seconds.
268 .Bl -tag -width indent -compact
270 device interrupts per interval (including clock interrupts)
272 system calls per interval
274 cpu context switch rate (switches/interval)
277 Breakdown of percentage usage of CPU time.
279 .Bl -tag -width indent -compact
281 user time for normal and low priority processes
289 .Bl -tag -width /dev/kmemxxx -compact
291 default kernel namelist
298 will print what the system is doing every five
299 seconds; this is a good choice of printing interval since this is how often
300 some of the statistics are sampled in the system.
301 Others vary every second and running the output for a while will make it
302 apparent which are recomputed every second.
305 .Dl vmstat -p da -p cd -w 1
306 will tell vmstat to select the first three direct access or CDROM devices
307 and display statistics on those devices, as well as other systems
308 statistics every second.
319 The sections starting with ``Interpreting system activity'' in
320 .%T "Installing and Operating 4.3BSD" .
326 options are only available with the default output.