Detailed explanation of vmstat usage of Linux performance diagnostic tool

1. vmstat basic command

1.1 Example of basic operation

vmstat 6 6 [Sampling 6 times in 6 seconds]

The result is as follows:

1.2 Detailed explanation of the meaning of each field of the output result

Composition of vmstat field meaning
process r The number of processes in the run queue
b number of blocked processes
Memory swpd Use virtual memory size
free Available memory size
buff The memory size used by the buffer
cache The amount of memory used by the file system cache
exchange and The size written from the swap area to memory per second
so The memory size written to the swap area per second
IO bi Number of blocks read from disk
bo The number of blocks written to disk
system in System interrupts, interrupts per second
cs Process context switches, the number of context switches per second
CPU us User process execution time, user mode
and System process execution time, kernel mode
of wait for IO time
id free time

 

2. vmstat [+option] command

 

usage Detailed explanation storage location
vmstat -a Show active and inactive memory  
vmstat -f Displays the number of forks since the system was started Obtained from the processes field in /proc/stat
vmstat -s Displays memory-related statistics and various system activity quantities /proc/meminfo,/proc/stat和/proc/vmstat
vmstat -d View disk read and write /proc/diskstats
vmstat -p Display the specified disk partition statistics /proc/diskstats
vmstat -m View system slab information /proc/slabinfo
vmstat -S Display using specified units. The parameters are k , K , m , M  
vmstat -V Display vmstat version information  

 

References:

1. Detailed Explanation of Linux vmstat Command

2. (Summary) Linux monitoring tool vmstat command detailed explanation (ha97.com)

Guess you like

Origin blog.csdn.net/woshisunyizhen/article/details/112602265