vmstat Linux Commands
What is Linux vmstat Command?
Explanation
vmstat COMMAND:vmstat command monitor and report the information of system virtual memory usage, swap and disk input output devices. Vmstat 3 (3 represents 3 seconds) displays the usage of resources for every 3 seconds. Press Ctrl+c to quit.
SYNTAX :
vmstat
OPTIONS:
-a |
Display active/inactive memory, given a 2.5.41 kernel or better. |
-f |
Display the number of forks since boot. |
-m |
Displays slabinfo. |
-n |
Cause the header to be displayed only once rather than periodically. |
-s |
Display a table of various event counters and memory statistics. |
delay |
The delay between updates in seconds. |
count |
The number of updates. |
-d |
Report disk statistics (2.5.70 or above required). |
-p |
followed by some partition name for detailed statistics (2.5.70 or above required) |
-V |
Display version information. |
EXAMPLE:
-
vmstat
Output:
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
r b
swpd
free
buff cache
si
so
bi
bo
in
cs us sy id wa st
3 0 372600 57852 11512 366612
15
19
130
44 399 901 13 6 78 3 0
Using vmstat monitoring report one can determine the root cause of performance and issues related to memory usage.