×


Linux vmstat Command



vmstat command is used for performance monitoring of the system in Linux. It basically lists all the information such as processes, memory, swap, io, CPU, and system. Because of these functions, the vmstat command is also known as a virtual memory statistics report.

The values ​​reported by the command are the average for each statistic since the computer was last restarted. These figures are not current values.

Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related Linux system commands.

In this context, we shall look into how to use the vmstat command in Linux.


What is the syntax of vmstat Command ?

vmstat Command syntax takes the following form:

$ vmstat [options][delay [count]]

As per the output, the following should be noted: 

  • delay: is the interval between 2 updates. If you use the command without delay, it will print the average value since startup.
  • count: is the number of updates printed after each interval (sampling interval). If you use the command without count, the count value will be infinite.
  • free: show free memory.
  • si: virtual memory swapped.
  • so: virtual memory swapped out.


vmstat Command options is explained below:

-a show active and inactive memory of the running system and its command is:

$ vmstat -a

-f shows the number of forks with the command:

$ vmstat -f

-m show Slabinfo with the below command:

$ vmstat -m

-s memory statistics and show event counter with the below command:

$ vmstat -s

-d show drive statistics with the below command:

$ vmstat -d


[Need assistance in fixing Linux Software issues ? We can help you. ]


Conclusion

This article covers how to use the vmstat command in Linux. In fact, vmstat command in Linux/Unix is a performance monitoring command of the system as it gives the information about processes, memory, paging, block IO, disk, and CPU scheduling. All these functionalities makes the command vmstat also known as virtual memory statistic reporter.


More Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on IbmiMedia.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com