Debian Codegraph @

man/vmstat.8

raw
1 .\"
2 .\" Copyright (c) 2002-2024 Craig Small <[email protected]>
3 .\" Copyright (c) 2012-2023 Jim Warner <[email protected]>
4 .\" Copyright (c) 2011-2012 Sami Kerola <[email protected]>
5 .\" Copyright (c) 1994 Henry Ware <[email protected]>
6 .\"
7 .\" This program is free software; you can redistribute it and/or modify
8 .\" it under the terms of the GNU General Public License as published by
9 .\" the Free Software Foundation; either version 2 of the License, or
10 .\" (at your option) any later version.
11 .\"
12 .\"
13 .TH VMSTAT 8 2024-07-19 procps-ng
14 .SH NAME
15 vmstat \- Report virtual memory statistics
16 .SH SYNOPSIS
17 .B vmstat
18 .RI [ option " .\|.\|.\&]"
19 .RI [ delay " [" count ]]
20 .SH DESCRIPTION
21 .B vmstat
22 reports information about processes, memory, paging, block IO, traps, disks
23 and cpu activity.
24 .PP
25 The first report produced gives averages since the last reboot. Additional
26 reports give information on a sampling period of length
27 .IR delay .
28 The process and memory reports are instantaneous in either case.
29 .SH OPTIONS
30 .TP
31 .I delay
32 The
33 .I delay
34 between updates in seconds. If no
35 .I delay
36 is specified, only one report is printed with the average values since boot.
37 .TP
38 .I count
39 Number of updates. In absence of
40 .IR count ,
41 when
42 .I delay
43 is defined, default is infinite.
44 .TP
45 \fB\-a\fR, \fB\-\-active\fR
46 Display active and inactive memory, given a 2.5.41 kernel or better.
47 .TP
48 \fB\-f\fR, \fB\-\-forks\fR
49 The
50 .B \-f
51 switch displays the number of forks since boot. This includes the fork,
52 vfork, and clone system calls, and is equivalent to the total number of tasks
53 created. Each process is represented by one or more tasks, depending on
54 thread usage. This display does not repeat.
55 .TP
56 \fB\-m\fR, \fB\-\-slabs\fR
57 Displays slabinfo.
58 .TP
59 \fB\-n\fR, \fB\-\-one-header\fR
60 Display the header only once rather than periodically.
61 .TP
62 \fB\-s\fR, \fB\-\-stats\fR
63 Displays a table of various event counters and memory statistics. This
64 display does not repeat.
65 .TP
66 \fB\-d\fR, \fB\-\-disk\fR
67 Report disk statistics (2.5.70 or above required).
68 .TP
69 \fB\-D\fR, \fB\-\-disk-sum\fR
70 Report some summary statistics about disk activity.
71 .TP
72 \fB\-p\fR, \fB\-\-partition\fR \fIdevice\fR
73 Detailed statistics about partition (2.5.70 or above required).
74 .TP
75 \fB\-S\fR, \fB\-\-unit\fR \fIcharacter\fR
76 Switches outputs between 1000
77 .RI ( k ),
78 1024
79 .RI ( K ),
80 1000000
81 .RI ( m ),
82 or 1048576
83 .RI ( M )
84 bytes. Note this does not change the block (bi/bo) fields.
85 .TP
86 \fB\-t\fR, \fB\-\-timestamp\fR
87 Append timestamp to each line
88 .TP
89 \fB\-w\fR, \fB\-\-wide\fR
90 Wide output mode (useful for systems with higher amount of memory,
91 where the default output mode suffers from unwanted column breakage).
92 The output is wider than 80 characters per line.
93 .TP
94 \fB\-y\fR, \fB\-\-no-first\fR
95 Omits first report with statistics since system boot.
96 .TP
97 \fB\-V\fR, \fB\-\-version\fR
98 Display version information and exit.
99 .TP
100 \fB\-h\fR, \fB\-\-help\fR
101 Display help and exit.
102 .SH FIELD DESCRIPTION FOR VM MODE
103 .SS Procs
104 .nf
105 r: The number of runnable processes (running or waiting for run time).
106 b: The number of processes blocked waiting for I/O to complete.
107 .fi
108 .SS Memory
109 These are affected by the \fB\-\-unit\fR option.
110 .nf
111 swpd: the amount of swap memory used.
112 free: the amount of idle memory.
113 buff: the amount of memory used as buffers.
114 cache: the amount of memory used as cache.
115 inact: the amount of inactive memory. (\fB\-a\fR option)
116 active: the amount of active memory. (\fB\-a\fR option)
117 .fi
118 .SS Swap
119 These are affected by the \fB\-\-unit\fR option.
120 .nf
121 si: Amount of memory swapped in from disk (/s).
122 so: Amount of memory swapped to disk (/s).
123 .fi
124 .SS IO
125 .nf
126 bi: Kibibyte received from a block device (KiB/s).
127 bo: Kibibyte sent to a block device (KiB/s).
128 .fi
129 .SS System
130 .nf
131 in: The number of interrupts per second, including the clock.
132 cs: The number of context switches per second.
133 .fi
134 .SS 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 gu: Time spent running KVM guest code (guest time, including guest nice).
143 .fi
144 .SH FIELD DESCRIPTION FOR DISK MODE
145 .SS Reads
146 .nf
147 total: Total reads completed successfully
148 merged: grouped reads (resulting in one I/O)
149 sectors: Sectors read successfully
150 ms: milliseconds spent reading
151 .fi
152 .SS Writes
153 .nf
154 total: Total writes completed successfully
155 merged: grouped writes (resulting in one I/O)
156 sectors: Sectors written successfully
157 ms: milliseconds spent writing
158 .fi
159 .SS IO
160 .nf
161 cur: I/O in progress
162 s: seconds spent for I/O
163 .fi
164 .SH FIELD DESCRIPTION FOR DISK PARTITION MODE
165 .nf
166 reads: Total number of reads issued to this partition
167 read sectors: Total read sectors for partition
168 writes : Total number of writes issued to this partition
169 requested writes: Total number of write requests made for partition
170 .fi
171 .SH FIELD DESCRIPTION FOR SLAB MODE
172 Slab mode shows statistics per slab, for more information
173 about this information see
174 .BR slabinfo (5)
175 .PP
176 .nf
177 cache: Cache name
178 num: Number of currently active objects
179 total: Total number of available objects
180 size: Size of each object
181 pages: Number of pages with at least one active object
182 .fi
183 .SH NOTES
184 .B vmstat
185 requires read access to files under \fI/proc\fR. The \fB\-m\fR requires read
186 access to \fI/proc/slabinfo\fR which may not be available to standard users.
187 Mount options for \fI/proc\fR such as \fIsubset=pid\fR may also impact what
188 is visible.
189 .SH "SEE ALSO"
190 .BR free (1),
191 .BR iostat (1),
192 .BR mpstat (1),
193 .BR ps (1),
194 .BR sar (1),
195 .BR top (1),
196 .BR slabinfo (5)
197 .SH "REPORTING BUGS"
198 Please send bug reports to
199 .MT [email protected]
200 .ME .