1VMSTAT(8) Linux Administrator's Manual VMSTAT(8)
2
3
4
6 vmstat - Report virtual memory statistics
7
9 vmstat [-a] [-n] [delay [ count]]
10 vmstat [-f] [-s] [-m]
11 vmstat [-S unit]
12 vmstat [-d]
13 vmstat [-p disk partition]
14 vmstat [-V]
15
17 vmstat reports information about processes, memory, paging, block IO,
18 traps, and cpu activity.
19
20 The first report produced gives averages since the last reboot. Addi‐
21 tional reports give information on a sampling period of length delay.
22 The process and memory reports are instantaneous in either case.
23
24
25 Options
26 The -a switch displays active/inactive memory, given a 2.5.41 kernel or
27 better.
28
29 The -f switch displays the number of forks since boot. This includes
30 the fork, vfork, and clone system calls, and is equivalent to the total
31 number of tasks created. Each process is represented by one or more
32 tasks, depending on thread usage. This display does not repeat.
33
34 The -m displays slabinfo.
35
36 The -n switch causes the header to be displayed only once rather than
37 periodically.
38
39 The -s switch displays a table of various event counters and memory
40 statistics. This display does not repeat.
41
42 delay is the delay between updates in seconds. If no delay is speci‐
43 fied, only one report is printed with the average values since boot.
44
45 count is the number of updates. If no count is specified and delay is
46 defined, count defaults to infinity.
47
48 The -d reports disk statistics (2.5.70 or above required)
49
50 The -p followed by some partition name for detailed statistics (2.5.70
51 or above required)
52
53 The -S followed by k or K or m or M switches outputs between 1000,
54 1024, 1000000, or 1048576 bytes
55
56 The -V switch results in displaying version information.
57
59 Procs
60 r: The number of processes waiting for run time.
61 b: The number of processes in uninterruptible sleep.
62
63 Memory
64 swpd: the amount of virtual memory used.
65 free: the amount of idle memory.
66 buff: the amount of memory used as buffers.
67 cache: the amount of memory used as cache.
68 inact: the amount of inactive memory. (-a option)
69 active: the amount of active memory. (-a option)
70
71 Swap
72 si: Amount of memory swapped in from disk (/s).
73 so: Amount of memory swapped to disk (/s).
74
75 IO
76 bi: Blocks received from a block device (blocks/s).
77 bo: Blocks sent to a block device (blocks/s).
78
79 System
80 in: The number of interrupts per second, including the clock.
81 cs: The number of context switches per second.
82
83 CPU
84 These are percentages of total CPU time.
85 us: Time spent running non-kernel code. (user time, including nice time)
86 sy: Time spent running kernel code. (system time)
87 id: Time spent idle. Prior to Linux 2.5.41, this includes IO-wait time.
88 wa: Time spent waiting for IO. Prior to Linux 2.5.41, included in idle.
89 st: Time stolen from a virtual machine. Prior to Linux 2.6.11, unknown.
90
91
93 Reads
94 total: Total reads completed successfully
95 merged: grouped reads (resulting in one I/O)
96 sectors: Sectors read successfully
97 ms: milliseconds spent reading
98
99 Writes
100 total: Total writes completed successfully
101 merged: grouped writes (resulting in one I/O)
102 sectors: Sectors written successfully
103 ms: milliseconds spent writing
104
105 IO
106 cur: I/O in progress
107 s: seconds spent for I/O
108
109
111 reads: Total number of reads issued to this partition
112 read sectors: Total read sectors for partition
113 writes : Total number of writes issued to this partition
114 requested writes: Total number of write requests made for partition
115
116
117
119 cache: Cache name
120 num: Number of currently active objects
121 total: Total number of available objects
122 size: Size of each object
123 pages: Number of pages with at least one active object
124 totpages: Total number of allocated pages
125 pslab: Number of pages per slab
126
127
129 vmstat does not require special permissions.
130
131 These reports are intended to help identify system bottlenecks. Linux
132 vmstat does not count itself as a running process.
133
134 All linux blocks are currently 1024 bytes. Old kernels may report
135 blocks as 512 bytes, 2048 bytes, or 4096 bytes.
136
137 Since procps 3.1.9, vmstat lets you choose units (k, K, m, M) default
138 is K (1024 bytes) in the default mode
139
140 vmstat uses slabinfo 1.1 FIXME
141
143 /proc/meminfo
144 /proc/stat
145 /proc/*/stat
146
147
149 iostat(1), sar(1), mpstat(1), ps(1), top(1), free(1)
150
152 Does not tabulate the block io per device or count the number of system
153 calls.
154
156 Written by Henry Ware <al172@yfn.ysu.edu>.
157 Fabian Frédérick <ffrederick@users.sourceforge.net> (diskstat, slab, partitions...)
158
159
160
161Throatwobbler Ginkgo Labs 27 July 1994 VMSTAT(8)