file reorg, pathnames.h, paths.h
[unix-history] / usr / src / usr.bin / vmstat / vmstat.8
CommitLineData
01c8685d
KB
1.\" Copyright (c) 1980 The Regents of the University of California.
2.\" All rights reserved.
a5a04f92 3.\"
01c8685d
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15.\"
16.\" @(#)vmstat.8 6.5 (Berkeley) %G%
a5a04f92 17.\"
6a2866ad 18.TH VMSTAT 1 ""
a5a04f92
KM
19.UC 4
20.de s1
21.if n .sp
22.if t .sp .1i
23..
24.de t1
25.if n .ta 5n
26.if t .ta 1i
27..
28.SH NAME
29vmstat \- report virtual memory statistics
30.SH SYNOPSIS
31.B vmstat
32[
c2a5bd01 33.B \-fsim
a5a04f92 34]
6a2866ad 35[ drives ]
a5a04f92
KM
36[ interval [ count ] ]
37.SH DESCRIPTION
38.I Vmstat
39delves into the system and normally reports certain statistics kept about
40process, virtual memory, disk, trap and cpu activity.
41If given a
42.B \-f
43argument, it instead reports on the number of
44.I forks
45and
46.I vforks
47since system startup and the number of pages of virtual memory involved in each
48kind of fork.
49If given a
50.B \-s
51argument, it instead prints the contents
52of the
53.I sum
54structure, giving the total number of several kinds of paging related
55events which have occurred since boot.
6a2866ad
KM
56If given a
57.B \-i
58argument, it instead reports on the number of
59.I interrupts
60taken by each device since system startup.
c2a5bd01
KM
61If given a
62.B \-m
63argument, it instead reports on the usage of
64kernel dynamic memory listed first by
65.I size
66of allocation and then by
67.I type
68of usage.
a5a04f92
KM
69.PP
70If none of these options are given,
71.I vmstat
7d8111ac
KM
72will report in the first line a summary of the virtual memory activity
73since the system has been booted.
74If
a5a04f92 75.I interval
7d8111ac 76is specified, then successive lines are summaries over the last
a5a04f92 77.I interval
7d8111ac 78seconds.
a5a04f92
KM
79``vmstat 5'' will print what the system is doing every five seconds;
80this is a good choice of printing interval since this is how often
81some of the statistics are sampled in the system; others vary every
82second, running the output for a while will make it apparent which
83are recomputed every second.
84If a
85.I count
86is given, the statistics are repeated
87.I count
88times.
89The format fields are:
90.PP
91Procs: information about numbers of processes in various states.
92.s1
93.t1
94.nf
95r in run queue
96b blocked for resources (i/o, paging, etc.)
97w runnable or short sleeper (< 20 secs) but swapped
98.fi
99.s1
100Memory: information about the usage of virtual and real memory.
101Virtual pages are considered active if they belong to processes which
102are running or have run in the last 20 seconds.
103A ``page'' here is 1024 bytes.
104.s1
105.t1
106.nf
107avm active virtual pages
108fre size of the free list
109.fi
110.s1
111Page: information about page faults and paging activity.
112These are averaged each five seconds, and given in units per second.
113.s1
114.t1
115.nf
116re page reclaims (simulating reference bits)
6a2866ad 117at pages attached (found in free list)
a5a04f92
KM
118pi pages paged in
119po pages paged out
120fr pages freed per second
121de anticipated short term memory shortfall
122sr pages scanned by clock algorithm, per-second
123.fi
124.s1
6a2866ad 125up/hp/rk/ra: Disk operations per second (this field is system dependent).
a5a04f92
KM
126Typically paging will be split across several of the available drives.
127The number under each of these is the unit number.
128.s1
129Faults: trap/interrupt rate averages per second over last 5 seconds.
130.s1
131.t1
132.nf
133in (non clock) device interrupts per second
134sy system calls per second
135cs cpu context switch rate (switches/sec)
136.fi
137.s1
138Cpu: breakdown of percentage usage of CPU time
139.s1
140.nf
141us user time for normal and low priority processes
142sy system time
143id cpu idle
e6c2ef59 144.fi
6a2866ad
KM
145.PP
146If more than 4 disk drives are configured in the system,
147.I vmstat
148displays only the first 4 drives, with priority given
149to Massbus disk drives (i.e. if both Unibus and Massbus
150drives are present and the total number of drives exceeds
1514, then some number of Unibus drives will not be displayed
152in favor of the Massbus drives). To force
153.I vmstat
154to display specific drives, their names may be supplied on
155the command line.
a5a04f92
KM
156.SH FILES
157/dev/kmem, /vmunix
158.SH SEE ALSO
6a2866ad 159.IR systat (1),
14f78fe4 160.IR iostat (1)
6a2866ad 161.PP
a5a04f92 162The sections starting with ``Interpreting system activity'' in
7d8111ac 163.IR "Installing and Operating 4.2bsd" .