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