Vmstat

vmstat (virtual memory statistics) is a computer system monitoring tool that collects and displays summary information about operating system memory, processes, interrupts, paging and block I/O. Users of  can specify a sampling interval which permits observing system activity in near-real time.

The vmstat tool is available on most Unix and Unix-like operating systems, such as FreeBSD, Linux or Solaris.

Syntax
The syntax and output of vmstat often differs slightly between different operating systems.

In the above example the tool reports every two seconds for six iterations.

We can get the customized or required outputs by using various options with the vmstat command.


 * :    This option is used to get memory statistics.


 * :    This option is used to get disk statistics.