1.\" $OpenBSD: vmstat.8,v 1.37 2016/03/30 06:58:06 jmc Exp $ 2.\" $NetBSD: vmstat.8,v 1.12 1996/05/10 23:19:30 thorpej Exp $ 3.\" 4.\" Copyright (c) 1986, 1993 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 3. Neither the name of the University nor the names of its contributors 16.\" may be used to endorse or promote products derived from this software 17.\" without specific prior written permission. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" 31.\" @(#)vmstat.8 8.1 (Berkeley) 6/6/93 32.\" 33.Dd $Mdocdate: March 30 2016 $ 34.Dt VMSTAT 8 35.Os 36.Sh NAME 37.Nm vmstat 38.Nd report statistics about kernel activities 39.Sh SYNOPSIS 40.Nm vmstat 41.Op Fl fimstvz 42.Nm vmstat 43.Op Fl c Ar count 44.Op Fl M Ar core 45.Op Fl N Ar system 46.Op Fl w Ar wait 47.Op Ar disk ... 48.Sh DESCRIPTION 49.Nm 50reports certain kernel statistics kept about process, virtual memory, 51disk, trap, and CPU activity. 52The default behavior is to print a one-line summary of these statistics. 53The 54.Fl c 55and 56.Fl w 57flags may be used to continually report summaries. 58.Pp 59The options are as follows: 60.Bl -tag -width Ds 61.It Fl c Ar count 62Repeat the display 63.Ar count 64times. 65The first display is for the time since a reboot and each subsequent report 66is for the time period since the last display. 67If no 68.Ar wait 69interval is specified, the default is 1 second. 70.It Fl f 71Report on the number of 72.Xr fork 2 , 73.Xr __tfork 3 , 74and 75.Xr vfork 2 76system calls as well as kernel thread creations since system startup, 77and the number of pages of virtual memory involved in each. 78.It Fl i 79Report on the number of interrupts taken by each device since system 80startup. 81.It Fl M Ar core 82Extract values associated with the name list from the specified core 83instead of the running kernel. 84.It Fl m 85Report on the usage of kernel dynamic memory listed first by size of 86allocation and then by type of usage. 87.It Fl N Ar system 88Extract the name list from the specified system instead of the running kernel. 89.It Fl s 90Display the contents of the 91.Va uvmexp 92structure (see 93.Xr uvm 9 ) , 94giving the total number of several kinds of paging related 95events which have occurred since system startup. 96.It Fl t 97Report on the number of page in and page reclaims since system startup, 98and the amount of time required by each. 99.It Fl v 100Print more verbose information. 101.It Fl w Ar wait 102Pause 103.Ar wait 104seconds between each display. 105If no repeat 106.Ar count 107is specified, the default is infinity. 108.It Fl z 109When used with 110.Fl i , 111also list devices which have not yet generated an interrupt. 112.El 113.Pp 114By default, 115.Nm 116displays the following information just once: 117.Bl -tag -width Ds 118.It Li procs 119Information about the numbers of processes in various states. 120.Pp 121.Bl -tag -width 4n -compact 122.It Li r 123in run queue 124.It Li b 125blocked for resources (I/O, paging, etc.) 126.It Li w 127runnable or short sleeper (< 20 secs) but swapped 128.El 129.It Li memory 130Information about the usage of virtual and real memory. 131Virtual pages 132(reported in units of 1024 bytes) are considered active if they belong 133to processes which are running or have run in the last 20 seconds. 134.Pp 135.Bl -tag -width 4n -compact 136.It Li avm 137active virtual pages 138.It Li fre 139size of the free list 140.El 141.It Li page 142Information about page faults and paging activity. 143These are averaged each five seconds, and given in units per second. 144.Pp 145.Bl -tag -width 4n -compact 146.It Li flt 147page faults 148.It Li re 149page reclaims (simulating reference bits) 150.It Li at 151pages attached (found in free list) 152.It Li pi 153pages paged in 154.It Li po 155pages paged out 156.It Li fr 157pages freed 158.It Li sr 159pages scanned by clock algorithm 160.El 161.It Li disks 162Disk transfers per second. 163Typically paging will be split across the available drives. 164The header of the field is the first character of the disk name and 165the unit number. 166If more than two disk drives are configured in the system, 167.Nm 168displays only the first two drives. 169To force 170.Nm 171to display specific drives, their names may be supplied on the command line. 172.It Li traps 173Trap/interrupt rate averages per second over last 5 seconds. 174.Pp 175.Bl -tag -width 4n -compact 176.It Li int 177device interrupts per interval (including clock interrupts) 178.It Li sys 179system calls per interval 180.It Li cs 181CPU context switch rate (switches/interval) 182.El 183.It Li cpu 184Breakdown of percentage usage of CPU time. 185.Pp 186.Bl -tag -width 4n -compact 187.It Li us 188user time for normal and low priority processes 189.It Li sy 190system time 191.It Li id 192CPU idle 193.El 194.El 195.Sh FILES 196.Bl -tag -width Pa -compact 197.It Pa /bsd 198default kernel image 199.It Pa /dev/kmem 200default memory file 201.El 202.Sh EXAMPLES 203The command 204.Ic vmstat -w 5 205will print what the system is doing every five 206seconds; this is a good choice of printing interval since this is how often 207some of the statistics are sampled in the system. 208Others vary every second and running the output for a while will make it 209apparent which are recomputed every second. 210.Sh SEE ALSO 211.Xr fstat 1 , 212.Xr netstat 1 , 213.Xr nfsstat 1 , 214.Xr procmap 1 , 215.Xr ps 1 , 216.Xr systat 1 , 217.Xr top 1 , 218.Xr iostat 8 , 219.Xr pstat 8 , 220.Xr uvm 9 221.Sh BUGS 222The 223.Fl c 224and 225.Fl w 226options are only available with the default output. 227.Pp 228This manual page lacks an incredible amount of detail. 229