Virtual Memory Statistics: Vmstat
In layman's words, virtual memory:
Now the operating system is multi-channel batch processing, that is, there are many tasks in memory, then there is a problem, memory enough? Certainly not enough, according to the local principle, only the part of the program loaded into memory, run to the required code is to go to the disk to replace the memory, this is the virtual memory. Probably say the process, the operating system to execute an instruction, according to the address of this directive in a table to see this instruction in the memory, if in memory to calculate the real memory address, if not in memory in the table to obtain the external memory block of this instruction and to move this command to memory (interrupt), and then And then you can happily execute the program.
Let's start with a command.
Chunking to introduce
Procs
R: Number of processes in the running queue (I don't know why we add this here)
B: Number of processes waiting for IO
Memory
SWPD: Use virtual memory size, if more than 0 means memory is not enough, this time to see if there is a memory leak or to see if you want to upgrade the memory
Free: idle physical memory size
Buff: The amount of memory used as a buffer
Cache: The amount of memory used as a buffer
Swap:
Si: Writes from swap to memory size per second, disk into memory
So: Memory size per second written to swap, with memory tuned to disk
If these two values are greater than 1, the memory is not enough
Io:
BI: Number of blocks read per second
Bo: Number of blocks written per second
The larger these two values are, the greater the value of the IO, and so on.
System:
In: Number of interrupts per second, including clock interrupts
CS: Number of context switches per second
These two values indicate how long the kernel consumes the CPU
Cpu:
US: User space
SY: Kernel space
ID: Idle
Wa:io wait
Linux system Monitoring