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