manual page distributed with 4.2BSD
[unix-history] / usr / src / usr.bin / vmstat / vmstat.8
CommitLineData
a5a04f92
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
7d8111ac 5.\" @(#)vmstat.8 5.1 (Berkeley) %G%
a5a04f92 6.\"
7d8111ac 7.TH VMSTAT 1 "26 April 1981"
a5a04f92
KM
8.UC 4
9.de s1
10.if n .sp
11.if t .sp .1i
12..
13.de t1
14.if n .ta 5n
15.if t .ta 1i
16..
17.SH NAME
18vmstat \- report virtual memory statistics
19.SH SYNOPSIS
20.B vmstat
21[
22.B \-fs
23]
24[ interval [ count ] ]
25.SH DESCRIPTION
26.I Vmstat
27delves into the system and normally reports certain statistics kept about
28process, virtual memory, disk, trap and cpu activity.
29If given a
30.B \-f
31argument, it instead reports on the number of
32.I forks
33and
34.I vforks
35since system startup and the number of pages of virtual memory involved in each
36kind of fork.
37If given a
38.B \-s
39argument, it instead prints the contents
40of the
41.I sum
42structure, giving the total number of several kinds of paging related
43events which have occurred since boot.
44.PP
45If none of these options are given,
46.I vmstat
7d8111ac
KM
47will report in the first line a summary of the virtual memory activity
48since the system has been booted.
49If
a5a04f92 50.I interval
7d8111ac 51is specified, then successive lines are summaries over the last
a5a04f92 52.I interval
7d8111ac 53seconds.
a5a04f92
KM
54``vmstat 5'' will print what the system is doing every five seconds;
55this is a good choice of printing interval since this is how often
56some of the statistics are sampled in the system; others vary every
57second, running the output for a while will make it apparent which
58are recomputed every second.
59If a
60.I count
61is given, the statistics are repeated
62.I count
63times.
64The format fields are:
65.PP
66Procs: information about numbers of processes in various states.
67.s1
68.t1
69.nf
70r in run queue
71b blocked for resources (i/o, paging, etc.)
72w runnable or short sleeper (< 20 secs) but swapped
73.fi
74.s1
75Memory: information about the usage of virtual and real memory.
76Virtual pages are considered active if they belong to processes which
77are running or have run in the last 20 seconds.
78A ``page'' here is 1024 bytes.
79.s1
80.t1
81.nf
82avm active virtual pages
83fre size of the free list
84.fi
85.s1
86Page: information about page faults and paging activity.
87These are averaged each five seconds, and given in units per second.
88.s1
89.t1
90.nf
91re page reclaims (simulating reference bits)
92pi pages paged in
93po pages paged out
94fr pages freed per second
95de anticipated short term memory shortfall
96sr pages scanned by clock algorithm, per-second
97.fi
98.s1
99up/hp/rk: Disk operations per second (this field is system dependent).
100Typically paging will be split across several of the available drives.
101The number under each of these is the unit number.
102.s1
103Faults: trap/interrupt rate averages per second over last 5 seconds.
104.s1
105.t1
106.nf
107in (non clock) device interrupts per second
108sy system calls per second
109cs cpu context switch rate (switches/sec)
110.fi
111.s1
112Cpu: breakdown of percentage usage of CPU time
113.s1
114.nf
115us user time for normal and low priority processes
116sy system time
117id cpu idle
118.SH FILES
119/dev/kmem, /vmunix
120.SH SEE ALSO
121The sections starting with ``Interpreting system activity'' in
7d8111ac 122.IR "Installing and Operating 4.2bsd" .
a5a04f92
KM
123.SH AUTHORS
124William Joy and Ozalp Babaoglu
125.SH BUGS
126There should be a screen oriented program which combines
127.I vmstat
128and
129.IR ps (1)
130in real time
131as well as reporting on other system activity.