BSD 4_3_Tahoe release
[unix-history] / usr / src / man / man1 / vmstat.1
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.\"
ca67e7b4 5.\" @(#)vmstat.1 6.4 (Berkeley) 2/27/88
a5a04f92 6.\"
ca67e7b4 7.TH VMSTAT 1 "February 27, 1988"
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[
c2a5bd01 22.B \-fsim
a5a04f92 23]
6a2866ad 24[ drives ]
a5a04f92
KM
25[ interval [ count ] ]
26.SH DESCRIPTION
27.I Vmstat
28delves into the system and normally reports certain statistics kept about
29process, virtual memory, disk, trap and cpu activity.
30If given a
31.B \-f
32argument, it instead reports on the number of
33.I forks
34and
35.I vforks
36since system startup and the number of pages of virtual memory involved in each
37kind of fork.
38If given a
39.B \-s
40argument, it instead prints the contents
41of the
42.I sum
43structure, giving the total number of several kinds of paging related
44events which have occurred since boot.
6a2866ad
KM
45If given a
46.B \-i
47argument, it instead reports on the number of
48.I interrupts
49taken by each device since system startup.
c2a5bd01
KM
50If given a
51.B \-m
52argument, it instead reports on the usage of
53kernel dynamic memory listed first by
54.I size
55of allocation and then by
56.I type
57of usage.
a5a04f92
KM
58.PP
59If none of these options are given,
60.I vmstat
7d8111ac
KM
61will report in the first line a summary of the virtual memory activity
62since the system has been booted.
63If
a5a04f92 64.I interval
7d8111ac 65is specified, then successive lines are summaries over the last
a5a04f92 66.I interval
7d8111ac 67seconds.
a5a04f92
KM
68``vmstat 5'' will print what the system is doing every five seconds;
69this is a good choice of printing interval since this is how often
70some of the statistics are sampled in the system; others vary every
71second, running the output for a while will make it apparent which
72are recomputed every second.
73If a
74.I count
75is given, the statistics are repeated
76.I count
77times.
78The format fields are:
79.PP
80Procs: information about numbers of processes in various states.
81.s1
82.t1
83.nf
84r in run queue
85b blocked for resources (i/o, paging, etc.)
86w runnable or short sleeper (< 20 secs) but swapped
87.fi
88.s1
89Memory: information about the usage of virtual and real memory.
90Virtual pages are considered active if they belong to processes which
91are running or have run in the last 20 seconds.
92A ``page'' here is 1024 bytes.
93.s1
94.t1
95.nf
96avm active virtual pages
97fre size of the free list
98.fi
99.s1
100Page: information about page faults and paging activity.
101These are averaged each five seconds, and given in units per second.
102.s1
103.t1
104.nf
105re page reclaims (simulating reference bits)
6a2866ad 106at pages attached (found in free list)
a5a04f92
KM
107pi pages paged in
108po pages paged out
109fr pages freed per second
110de anticipated short term memory shortfall
111sr pages scanned by clock algorithm, per-second
112.fi
113.s1
6a2866ad 114up/hp/rk/ra: Disk operations per second (this field is system dependent).
a5a04f92
KM
115Typically paging will be split across several of the available drives.
116The number under each of these is the unit number.
117.s1
118Faults: trap/interrupt rate averages per second over last 5 seconds.
119.s1
120.t1
121.nf
122in (non clock) device interrupts per second
123sy system calls per second
124cs cpu context switch rate (switches/sec)
125.fi
126.s1
127Cpu: breakdown of percentage usage of CPU time
128.s1
129.nf
130us user time for normal and low priority processes
131sy system time
132id cpu idle
e6c2ef59 133.fi
6a2866ad
KM
134.PP
135If more than 4 disk drives are configured in the system,
136.I vmstat
137displays only the first 4 drives, with priority given
138to Massbus disk drives (i.e. if both Unibus and Massbus
139drives are present and the total number of drives exceeds
1404, then some number of Unibus drives will not be displayed
141in favor of the Massbus drives). To force
142.I vmstat
143to display specific drives, their names may be supplied on
144the command line.
a5a04f92
KM
145.SH FILES
146/dev/kmem, /vmunix
147.SH SEE ALSO
6a2866ad 148.IR systat (1),
14f78fe4 149.IR iostat (1)
6a2866ad 150.PP
a5a04f92 151The sections starting with ``Interpreting system activity'' in
7d8111ac 152.IR "Installing and Operating 4.2bsd" .