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. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)vmstat.8 8.1 (Berkeley) 6/6/93
40 .Nd report virtual memory statistics
50 .Op Fl p Ar type,if,pass
54 reports certain kernel statistics kept about process, virtual memory,
55 disk, trap and cpu activity.
57 The options are as follows:
58 .Bl -tag -width indent
63 The first display is for the time since a reboot and each subsequent
64 report is for the time period since the last display.
69 is specified, the default is infinity, otherwise the default is one.
71 .\" Report on the number
75 .\" system calls since system startup, and the number of pages of virtual memory
78 Report on the number of interrupts taken by each device since system
81 Extract values associated with the name list from the specified
83 instead of the default
86 Extract the name list from the specified
88 instead of the default
91 Report on the usage of kernel dynamic memory listed first by size of
92 allocation and then by type of usage.
94 Change the maximum number of disks to display from the default of 2.
96 Specify which types of devices to display. There are three different
97 categories of devices:
99 .Bl -tag -width indent -compact
101 .Bl -tag -width 123456789 -compact
103 Direct Access devices
105 Sequential Access devices
111 Write Once Read Multiple devices
117 Optical Memory devices
119 Medium Changer devices
121 Communication devices
123 Storage Array devices
125 Enclosure Services devices
131 .Bl -tag -width 123456789 -compact
133 Integrated Drive Electronics devices
135 Small Computer System Interface devices
137 Any other device interface
141 .Bl -tag -width 123456789 -compact
147 The user must specify at least one device type, and may specify at most
148 one device type from each category. Multiple device types in a single
149 device type statement must be separated by commas.
153 arguments may be specified on the command line. All
155 arguments are ORed together to form a matching expression against which
156 all devices in the system are compared. Any device that fully matches
159 argument will be included in the
161 output, up to three devices, or the maximum number of devices specified
164 Display the contents of the
166 structure, giving the total number of several kinds of paging related
167 events which have occurred since system startup.
169 .\" Report on the number of page in and page reclaims since system startup,
170 .\" and the amount of time required by each.
174 seconds between each display.
177 interval is specified, the default is 1 second.
179 Report on memory used by the kernel zone allocator, by zone.
184 displays the following information:
186 .Bl -tag -width indent
188 Information about the numbers of processes in various states.
190 .Bl -tag -width indent -compact
194 blocked for resources (i/o, paging, etc.)
196 runnable or short sleeper (< 20 secs) but swapped
199 Information about the usage of virtual and real memory.
200 Virtual pages (reported in units of 1024 bytes) are considered active if
201 they belong to processes which are running or have run in the last 20
204 .Bl -tag -width indent -compact
208 size of the free list
211 Information about page faults and paging activity.
212 These are averaged each five seconds, and given in units per second.
214 .Bl -tag -width indent -compact
216 total number of page faults
218 page reclaims (simulating reference bits)
220 .\" pages attached (found in free list)
226 pages freed per second
228 .\" anticipated short term memory shortfall
230 pages scanned by clock algorithm, per-second
233 Disk operations per second (this field is system dependent).
234 Typically paging will be split across the available drives.
235 The header of the field is the first two characters of the disk name and
237 If more than three disk drives are configured in the system,
239 displays only the first three drives, unless the user specifies the
241 argument to increase the number of drives displayed. This will probably
242 cause the display to exceed 80 columns, however.
245 to display specific drives, their names may be supplied on the command line.
247 defaults to show disks first, and then various other random devices in the
248 system to add up to three devices, if there are that many devices in the
249 system. If devices are specified on the command line, or if a device type
250 matching pattern is specified (see above),
252 will only display the given devices or the devices matching the pattern,
253 and will not randomly select other devices in the system.
255 Trap/interrupt rate averages per second over last 5 seconds.
257 .Bl -tag -width indent -compact
259 device interrupts per interval (including clock interrupts)
261 system calls per interval
263 cpu context switch rate (switches/interval)
266 Breakdown of percentage usage of CPU time.
268 .Bl -tag -width indent -compact
270 user time for normal and low priority processes
280 will print what the system is doing every five
281 seconds; this is a good choice of printing interval since this is how often
282 some of the statistics are sampled in the system.
283 Others vary every second and running the output for a while will make it
284 apparent which are recomputed every second.
287 .Dl vmstat -p da -p cd -w 1
288 will tell vmstat to select the first three direct access or CDROM devices
289 and display statistics on those devices, as well as other systems
290 statistics every second.
292 .Bl -tag -width /dev/kmemxxx -compact
294 default kernel namelist
307 The sections starting with ``Interpreting system activity'' in
308 .%T "Installing and Operating 4.3BSD" .
314 options are only available with the default output.