Vmstat 5
You can use Ctrl + C to stop vmstat. You can see that the output depends on the operating system used. Therefore, you may need to read the manual to interpret the report.
The value in the first line shows the average value since the sub-system was started. The second line shows what is happening now. The next line shows what happens every 5 seconds.
Procs ----------- memory ---------- --- swap -- ----- Io ---- System -- ----- CPU -----
R B SWPD free buff cache Si so Bi Bo in CS us Sy ID wa st
How many processes are waiting for CPU?
The number of processes in process B is non-disruptive sleep (usually means they are waiting for Io, such as disk, network, user input, and so on)
How many swapd blocks are swapped out to the disk (page switching)
Free
Buff is being used as a buffer
The cache is used as the system cache
Number of Si disks being swapped in (from disk) per second)
So how many are being swapped out (to disk) per second)
We like to see that Si and so are listed as 0, and we do not want to see more than 10 blocks per second.
I/O displays the number of blocks read from the device (BI) and write (BO), reflecting the hard disk I/O
In interruption per second
Number of CS context switches
Percentage of user code executed
Percentage of system code executed
Idle percentage
Percentage of I/O waiting
The percentage of stolen data from a Virtual Machine (if a virtual machine is in use, this column lists the time when the Virtual Machine wants to run but the system administrator wants to run its objects instead. If the virtual machine does not want to run any objects, however, the system administrator runs other objects, which is not counted as the stolen CPU time)
The number of memory, swap, and I/O segments instead of bytes. In gun/Linux, the block size is usually 1024 bytes.
Read vmstat (8)
High-performance MySQL 426 page