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