Bump to procps-ng 3.3.17
[platform/upstream/procps-ng.git] / vmstat.8
1 .\"  This page Copyright (C) 1994 Henry Ware <al172@yfn.ysu.edu>
2 .\"  Distributed under the GPL, Copyleft 1994.
3 .TH VMSTAT 8 "2020-06-04" "procps-ng" "System Administration"
4 .SH NAME
5 vmstat \- Report virtual memory statistics
6 .SH SYNOPSIS
7 .B vmstat
8 [options]
9 .RI [ delay " [" count ]]
10 .SH DESCRIPTION
11 .B vmstat
12 reports information about processes, memory, paging, block IO, traps, disks
13 and cpu activity.
14 .PP
15 The first report produced gives averages since the last reboot.  Additional
16 reports give information on a sampling period of length
17 .IR delay .
18 The process and memory reports are instantaneous in either case.
19 .SH OPTIONS
20 .TP
21 .I delay
22 The
23 .I delay
24 between updates in seconds.  If no
25 .I delay
26 is specified, only one report is printed with the average values since boot.
27 .TP
28 .I count
29 Number of updates.  In absence of
30 .IR count ,
31 when
32 .I delay
33 is defined, default is infinite.
34 .TP
35 \fB\-a\fR, \fB\-\-active\fR
36 Display active and  inactive memory, given a 2.5.41 kernel or better.
37 .TP
38 \fB\-f\fR, \fB\-\-forks\fR
39 The
40 .B \-f
41 switch displays the number of forks since boot.  This includes the fork,
42 vfork, and clone system calls, and is equivalent to the total number of tasks
43 created.  Each process is represented by one or more tasks, depending on
44 thread usage.  This display does not repeat.
45 .TP
46 \fB\-m\fR, \fB\-\-slabs\fR
47 Displays slabinfo.
48 .TP
49 \fB\-n\fR, \fB\-\-one-header\fR
50 Display the header only once rather than periodically.
51 .TP
52 \fB\-s\fR, \fB\-\-stats\fR
53 Displays a table of various event counters and memory statistics.  This
54 display does not repeat.
55 .TP
56 \fB\-d\fR, \fB\-\-disk\fR
57 Report disk statistics (2.5.70 or above required).
58 .TP
59 \fB\-D\fR, \fB\-\-disk-sum\fR
60 Report some summary statistics about disk activity.
61 .TP
62 \fB\-p\fR, \fB\-\-partition\fR \fIdevice\fR
63 Detailed statistics about partition (2.5.70 or above required).
64 .TP
65 \fB\-S\fR, \fB\-\-unit\fR \fIcharacter\fR
66 Switches outputs between 1000
67 .RI ( k ),
68 1024
69 .RI ( K ),
70 1000000
71 .RI ( m ),
72 or 1048576
73 .RI ( M )
74 bytes.  Note this does not change the block (bi/bo) fields, which are always
75 measured in blocks.
76 .TP
77 \fB\-t\fR, \fB\-\-timestamp\fR
78 Append timestamp to each line
79 .TP
80 \fB\-w\fR, \fB\-\-wide\fR
81 Wide output mode (useful for systems with higher amount of memory,
82 where the default output mode suffers from unwanted column breakage).
83 The output is wider than 80 characters per line.
84 .TP
85 \fB\-V\fR, \fB\-\-version\fR
86 Display version information and exit.
87 .TP
88 \fB\-h\fR, \fB\-\-help\fR
89 Display help and exit.
90 .PD
91 .SH "FIELD DESCRIPTION FOR VM MODE"
92 .SS
93 .B "Procs"
94 .nf
95 r: The number of runnable processes (running or waiting for run time).
96 b: The number of processes blocked waiting for I/O to complete.
97 .fi
98 .PP
99 .SS
100 .B "Memory"
101 These are affected by the \fB\-\-unit\fR option.
102 .nf
103 swpd: the amount of swap memory used.
104 free: the amount of idle memory.
105 buff: the amount of memory used as buffers.
106 cache: the amount of memory used as cache.
107 inact: the amount of inactive memory.  (\fB\-a\fR option)
108 active: the amount of active memory.  (\fB\-a\fR option)
109 .fi
110 .PP
111 .SS
112 .B "Swap"
113 These are affected by the \fB\-\-unit\fR option.
114 .nf
115 si: Amount of memory swapped in from disk (/s).
116 so: Amount of memory swapped to disk (/s).
117 .fi
118 .PP
119 .SS
120 .B "IO"
121 .nf
122 bi: Blocks received from a block device (blocks/s).
123 bo: Blocks sent to a block device (blocks/s).
124 .fi
125 .PP
126 .SS
127 .B "System"
128 .nf
129 in: The number of interrupts per second, including the clock.
130 cs: The number of context switches per second.
131 .fi
132 .PP
133 .SS
134 .B "CPU"
135 These are percentages of total CPU time.
136 .nf
137 us: Time spent running non\-kernel code.  (user time, including nice time)
138 sy: Time spent running kernel code.  (system time)
139 id: Time spent idle.  Prior to Linux 2.5.41, this includes IO\-wait time.
140 wa: Time spent waiting for IO.  Prior to Linux 2.5.41, included in idle.
141 st: Time stolen from a virtual machine.  Prior to Linux 2.6.11, unknown.
142 .fi
143 .PP
144 .SH "FIELD DESCRIPTION FOR DISK MODE"
145 .SS
146 .B "Reads"
147 .nf
148 total: Total reads completed successfully
149 merged: grouped reads (resulting in one I/O)
150 sectors: Sectors read successfully
151 ms: milliseconds spent reading
152 .fi
153 .PP
154 .SS
155 .B "Writes"
156 .nf
157 total: Total writes completed successfully
158 merged: grouped writes (resulting in one I/O)
159 sectors: Sectors written successfully
160 ms: milliseconds spent writing
161 .fi
162 .PP
163 .SS
164 .B "IO"
165 .nf
166 cur: I/O in progress
167 s: seconds spent for I/O
168 .fi
169 .PP
170 .SH "FIELD DESCRIPTION FOR DISK PARTITION MODE"
171 .nf
172 reads: Total number of reads issued to this partition
173 read sectors: Total read sectors for partition
174 writes : Total number of writes issued to this partition
175 requested writes: Total number of write requests made for partition
176 .fi
177 .PP
178 .SH "FIELD DESCRIPTION FOR SLAB MODE"
179 .nf
180 cache: Cache name
181 num: Number of currently active objects
182 total: Total number of available objects
183 size: Size of each object
184 pages: Number of pages with at least one active object
185 .fi
186 .SH NOTES
187 .B vmstat
188 does not require special permissions.
189 .PP
190 These reports are intended to help identify system bottlenecks.  Linux
191 .B vmstat
192 does not count itself as a running process.
193 .PP
194 All linux blocks are currently 1024 bytes.  Old kernels may report blocks as
195 512 bytes, 2048 bytes, or 4096 bytes.
196 .PP
197 Since procps 3.1.9, vmstat lets you choose units (k, K, m, M).  Default is K
198 (1024 bytes) in the default mode.
199 .PP
200 vmstat uses slabinfo 1.1
201 .SH FILES
202 .ta
203 .nf
204 /proc/meminfo
205 /proc/stat
206 /proc/*/stat
207 .fi
208 .SH "SEE ALSO"
209 .BR free (1),
210 .BR iostat (1),
211 .BR mpstat (1),
212 .BR ps (1),
213 .BR sar (1),
214 .BR top (1)
215 .PP
216 .SH BUGS
217 Does not tabulate the block io per device or count the number of system calls.
218 .SH AUTHORS
219 Written by
220 .UR al172@yfn.\:ysu.\:edu
221 Henry Ware
222 .UE .
223 .br
224 .UR ffrederick@users.\:sourceforge.\:net
225 Fabian Fr\('ed\('erick
226 .UE
227 (diskstat, slab, partitions...)
228 .SH "REPORTING BUGS"
229 Please send bug reports to
230 .UR procps@freelists.org
231 .UE