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
36 .Nd report virtual memory statistics
42 .Op Fl M Ar core Op Fl N Ar system
57 utility reports certain kernel statistics kept about process, virtual memory,
58 disk, trap and cpu activity.
62 option is not specified, information is obtained from
63 the currently running kernel via the
66 Otherwise, information is read from the specified core file,
67 using the name list from the specified kernel image (or from
70 The options are as follows:
71 .Bl -tag -width indent
75 in a selection of different human and machine readable formats.
78 for details on command line arguments.
82 include statistics about interrupts that have never been generated.
87 The first display is for the time since a reboot and each subsequent
88 report is for the time period since the last display.
93 is specified, the default is infinity, otherwise the default is one.
100 system calls since system startup, and the number of pages of virtual memory
103 Changes memory columns into more easily human readable form.
105 standard output is a terminal device.
107 Changes memory columns into straight numbers.
108 The default if standard output
109 is not a terminal device (such as a script).
111 Report on the number of interrupts taken by each device since system
114 Extract values associated with the name list from the specified
120 extract the name list from the specified
122 instead of the default,
123 which is the kernel image the system has booted from.
125 Report on the usage of kernel dynamic memory allocated using
129 Change the maximum number of disks to display from the default of 2.
131 Display a list of virtual memory objects in the system and the resident
132 memory used by each object.
134 Report per-cpu system/user/idle cpu statistics.
136 Specify which types of devices to display.
137 There are three different
138 categories of devices:
140 .Bl -tag -width indent -compact
142 .Bl -tag -width 9n -compact
144 Direct Access devices
146 Sequential Access devices
152 Write Once Read Multiple devices
158 Optical Memory devices
160 Medium Changer devices
162 Communication devices
164 Storage Array devices
166 Enclosure Services devices
172 .Bl -tag -width 9n -compact
174 Integrated Drive Electronics devices
176 Small Computer System Interface devices
178 Any other device interface
182 .Bl -tag -width 9n -compact
188 The user must specify at least one device type, and may specify at most
189 one device type from each category.
190 Multiple device types in a single
191 device type statement must be separated by commas.
195 arguments may be specified on the command line.
198 arguments are ORed together to form a matching expression against which
199 all devices in the system are compared.
200 Any device that fully matches
203 argument will be included in the
205 output, up to two devices, or the maximum number of devices specified
208 Display the contents of the
210 structure, giving the total number of several kinds of paging related
211 events which have occurred since system startup.
213 .\" Report on the number of page in and page reclaims since system startup,
214 .\" and the amount of time required by each.
218 seconds between each display.
221 interval is specified, the default is 1 second.
224 command will accept and honor a non-integer number of seconds.
226 Report on memory used by the kernel zone allocator,
235 arguments may be given after their respective flags at any point
236 on the command line before the
238 argument(s), or without their flags, as the final argument(s).
239 The latter form is accepted for backwards compatibility, but it is
240 preferred to use the forms with
248 displays the following information:
249 .Bl -tag -width indent
251 Information about the number of threads in various states:
253 .Bl -tag -width indent -compact
255 running or in run queue
257 blocked for resources (i/o, paging, etc.)
262 Information about the usage of virtual and real memory.
264 Mapped virtual memory is a sum of all of the virtual pages belonging
265 to mapped virtual memory objects.
266 Note that the entire memory object's size is considered mapped even if
267 only a subset of the object's pages are currently mapped.
268 This statistic is not related to the active page queue which is used to track
271 .Bl -tag -width indent -compact
273 mapped virtual memory
274 .Po previously called active in
279 size of the free list
282 Information about page faults and paging activity.
283 These are given in units per second.
285 .Bl -tag -width indent -compact
287 total number of page faults
289 page reclaims (simulating reference bits)
291 .\" pages attached (found in free list)
299 .\" anticipated short term memory shortfall
301 pages scanned by page daemon
304 Disk operations per second (this field is system dependent).
305 Typically paging will be split across the available drives.
306 The header of the field is the first two characters of the disk name and
308 If more than two disk drives are configured in the system,
310 displays only the first two drives, unless the user specifies the
312 argument to increase the number of drives displayed.
314 cause the display to exceed 80 columns, however.
317 to display specific drives, their names may be supplied on the command line.
321 defaults to show disks first, and then various other random devices in the
322 system to add up to two devices, if there are that many devices in the
324 If devices are specified on the command line, or if a device type
325 matching pattern is specified (see above),
327 will only display the given devices or the devices matching the pattern,
328 and will not randomly select other devices in the system.
330 Trap/interrupt rates per second.
332 .Bl -tag -width indent -compact
334 device interrupts (including clock interrupts)
341 Breakdown of percentage usage of CPU time.
343 .Bl -tag -width indent -compact
345 user time for normal and low priority processes
347 system and interrupt time
353 .Bl -tag -width /boot/kernel/kernel -compact
354 .It Pa /boot/kernel/kernel
355 default kernel namelist
362 will print what the system is doing every five
366 .Dl vmstat -p da -p cd -w 1
367 will tell vmstat to select the first two direct access or CDROM devices
368 and display statistics on those devices, as well as other systems
369 statistics every second.
378 .Xr xo_parse_args 3 ,
386 The sections starting with ``Interpreting system activity'' in
387 .%T "Installing and Operating 4.3BSD" .
393 options are only available with the default output.