Vmstat command is used to report virtual memory usage. It reports information about processes, memory, paging, block IO, traps, disks and cpu activity.
>> To use vmstat command, type the following
The output is as follows.
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
0 0 0 4 67468 247300 25040 0 0 1 1 5 1 0 0 4
Vmstat procs section
r field: Total number of runnable process
b field: Total number of blocked process
Swpd field: Used swap space
Free field: Available free RAM
Buff field: RAM used for buffers
Cache field: RAM used for filesystem cache
Si field: Amount of memory swapped from disk per second
So field: Amount of memory swapped to disk per second
Bi field: Blocks received from disk
Bo field: Blocks sent to disk.
In field: Number of interrupts per second.
Cs field: Number of context switches per second.
Us field: Time spend running user code. (non-kernel code)
Sy field: Time spent running kernel code.
Id field: Idle time.
Wa field: Time spent waiting for the IO
>> To run vmstat command 10 times with 5 seconds time between them.
Vmstat 5 10
>> Virtual memory is the hard-disk space which is utilized when the physical memory (RAM) gets utilized. It is not necessarily bad thing to use some virtual memory, in linux terms swap memory yet we should be careful that it does not go too high else the system performance will go down.
No related posts.