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. 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. 19.\" 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 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)vmstat.8 8.1 (Berkeley) 6/6/93 33.\" $Id: vmstat.8,v 1.8 1997/08/23 21:42:46 steve Exp $ 34.\" 35.Dd June 6, 1996 36.Dt VMSTAT 8 37.Os BSD 4 38.Sh NAME 39.Nm vmstat 40.Nd report virtual memory statistics 41.Sh SYNOPSIS 42.Nm vmstat 43.\" .Op Fl fimst 44.Op Fl ims 45.Op Fl c Ar count 46.Op Fl M Ar core 47.Op Fl N Ar system 48.Op Fl w Ar wait 49.Op Ar disks 50.Sh DESCRIPTION 51.Nm Vmstat 52reports certain kernel statistics kept about process, virtual memory, 53disk, trap and cpu activity. 54.Pp 55The options are as follows: 56.Bl -tag -width indent 57.It Fl c 58Repeat the display 59.Ar count 60times. 61The first display is for the time since a reboot and each subsequent report 62is for the time period since the last display. 63If no 64.Ar wait 65interval is specified, the default is 1 second. 66.\" .It Fl f 67.\" Report on the number 68.\" .Xr fork 2 69.\" and 70.\" .Xr vfork 2 71.\" system calls since system startup, and the number of pages of virtual memory 72.\" involved in each. 73.It Fl i 74Report on the number of interrupts taken by each device since system 75startup. 76.It Fl M 77Extract values associated with the name list from the specified 78.Ar core 79instead of the default 80.Pa /dev/kmem . 81.It Fl N 82Extract the name list from the specified 83.Ar system 84instead of the default 85.Pa /kernel . 86.It Fl m 87Report on the usage of kernel dynamic memory listed first by size of 88allocation and then by type of usage. 89.It Fl s 90Display the contents of the 91.Em sum 92structure, giving the total number of several kinds of paging related 93events which have occurred since system startup. 94.\" .It Fl t 95.\" Report on the number of page in and page reclaims since system startup, 96.\" and the amount of time required by each. 97.It Fl w 98Pause 99.Ar wait 100seconds between each display. 101If no repeat 102.Ar count 103is specified, the default is infinity. 104.El 105.Pp 106By default, 107.Nm 108displays the following information: 109.Pp 110.Bl -tag -width indent 111.It procs 112Information about the numbers of processes in various states. 113.Pp 114.Bl -tag -width indent -compact 115.It r 116in run queue 117.It b 118blocked for resources (i/o, paging, etc.) 119.It w 120runnable or short sleeper (< 20 secs) but swapped 121.El 122.It memory 123Information about the usage of virtual and real memory. 124Virtual pages (reported in units of 1024 bytes) are considered active if 125they belong to processes which are running or have run in the last 20 126seconds. 127.Pp 128.Bl -tag -width indent -compact 129.It avm 130active virtual pages 131.It fre 132size of the free list 133.El 134.It page 135Information about page faults and paging activity. 136These are averaged each five seconds, and given in units per second. 137.Pp 138.Bl -tag -width indent -compact 139.It flt 140total number of page faults 141.It re 142page reclaims (simulating reference bits) 143.\" .It at 144.\" pages attached (found in free list) 145.It pi 146pages paged in 147.It po 148pages paged out 149.It fr 150pages freed per second 151.\" .It de 152.\" anticipated short term memory shortfall 153.It sr 154pages scanned by clock algorithm, per-second 155.El 156.It disks 157Disk operations per second (this field is system dependent). 158Typically paging will be split across the available drives. 159The header of the field is the first character of the disk name and 160the unit number. 161If more than four disk drives are configured in the system, 162.Nm 163displays only the first four drives. 164To force 165.Nm 166to display specific drives, their names may be supplied on the command line. 167.It faults 168Trap/interrupt rate averages per second over last 5 seconds. 169.Pp 170.Bl -tag -width indent -compact 171.It in 172device interrupts per interval (including clock interrupts) 173.It sy 174system calls per interval 175.It cs 176cpu context switch rate (switches/interval) 177.El 178.It cpu 179Breakdown of percentage usage of CPU time. 180.Pp 181.Bl -tag -width indent -compact 182.It us 183user time for normal and low priority processes 184.It sy 185system time 186.It id 187cpu idle 188.El 189.El 190.Sh EXAMPLES 191The command: 192.Dl vmstat -w 5 193will print what the system is doing every five 194seconds; this is a good choice of printing interval since this is how often 195some of the statistics are sampled in the system. 196Others vary every second and running the output for a while will make it 197apparent which are recomputed every second. 198.Sh FILES 199.Bl -tag -width /dev/kmemxxx -compact 200.It Pa /kernel 201default kernel namelist 202.It Pa /dev/kmem 203default memory file 204.El 205.Sh SEE ALSO 206.Xr fstat 1 , 207.Xr netstat 1 , 208.Xr nfsstat 1 , 209.Xr ps 1 , 210.Xr systat 1 , 211.Xr iostat 8 , 212.Xr pstat 8 213.Pp 214The sections starting with ``Interpreting system activity'' in 215.%T "Installing and Operating 4.3BSD" . 216.Sh BUGS 217The 218.Fl c 219and 220.Fl w 221options are only available with the default output. 222