role: Vmstat means to display virtual memory status (Vsan Memor statics), but it can report on the overall operating state of the system, such as process, memory, I/O, etc.
Options:
-a
display active inside page
-F Displays the total number of processes created after startup-
m display slab information -
n header information only once -
s displays event counters and memory status in tabular format -
d report disk status
-P Displays the specified hard disk partition status
-S output information units
Parameters
Event Interval: status information refresh Interval
: Number of times the report was displayed
Instance:
Vmstat 3
procs-----------Memory-------------Swap-------io------System-------CPU-----
r b swpd free buff cache si so bi bo in CS us sy ID WA St
0 0 0 952092 10236 38704 0 0 3 0 0 © 0 0
0 0 0 952084 10236 38704 0 0 0 0 5 7 0 0 0 0
0 0 0 952084 10236 38704 0 0 0 0 5 6 0 0 0 0
0 0 0 952084 10236 38704 0 0 0 0 6 8 0 0 0 0
0 0 0 952084 10236 38704 0 0 0 0 5 6 0 0 0 0
Field Description
Proc (process)
*r: The number of processes in the running queue, which can also be used to determine if the CPU needs to be increased. (longer than 1)
*b: Number of processes waiting for IO
memory (RAM)
*SWPD: Using virtual memory size, if the value of SWPD is not 0, but Si, so has a long value of 0, does not affect system performance
*free: Free physical Memory size
*buff: The amount of memory used as a buffer
*cache: As the memory size of the cache, if the cache value is large, it indicates that the number of files in the cache, if the files are frequently accessed by the cache, then the disk IO bi will be very small
Swap
*si: Writes from the swap area to the memory size per second, and the disk is transferred into memory. Swapped in from disk
*so: The amount of memory written to the swap area per second, transferred from memory to disk swapped
io (now the size of the Linux version block is 1kb)
*bi: Number of blocks read per second block received from a block device
*bo: Number of blocks written per second block sent to a block device
when a random disk reads and writes, the larger the two values, the larger the CPU's IO wait value can be seen .
System
*in: Number of interrupts per second
*cs: Number of context switches per second
CPU
*us: Percentage of user Process execution time, when the value of us is higher, indicates that the user process consumes more CPU time, but if it is used over a long period of 50%, then the optimizer algorithm should be considered or accelerated
*sy: Percentage of kernel system Process execution times (System time)
when the value of SY is high, it indicates that the system kernel consumes more CPU resources and needs to check the cause
*wa:io wait Time percentage
when the value of WA is high, the IO Wait is more serious, possibly due to a large number of random accesses to the disk, or a disk bottleneck
*id: Percentage of idle time
File:
/proc/meminfo
/proc/stat
/proc/*/stat
Vmstat command Explanation