# Vmstat

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Vmstat
> Markdown URL: https://mediated.wiki/source/Vmstat.md
> Source: https://en.wikipedia.org/wiki/Vmstat
> Source revision: 1353623327
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Computer system monitoring tool}}
{{Lowercase title}}
{{One source |date=March 2026}}

{{Infobox Software 
| name                   = vmstat
| logo                   = 
| screenshot             = 
| screenshot size        = 
| caption                = 
| author                 = 
| developer              = [AT&T Bell Laboratories](/source/AT%26T_Bell_Laboratories)
| released               = {{Start date and age|1985|2}}
| latest release version = 
| latest release date    = 
| operating system       = [Unix](/source/Unix) and [Unix-like](/source/Unix-like)
| genre                  = [Command](/source/Command_(computing))
| license                = 
| website                = 
}}
'''vmstat''' ('''''v'''irtual '''m'''emory '''stat'''istics'') is a computer [system monitor](/source/system_monitor)ing tool that collects and displays summary information about [operating system](/source/operating_system) memory, processes, interrupts, paging and block [I/O](/source/Input%2Foutput). Users of <code>vmstat</code> can specify a sampling interval which permits observing system activity in near-real time.<ref>{{Cite report
| last1 = Chatterjee
| first1 = Pooja
| last2 = Mukherjee
| first2 = Rohit
| last3 = Das
| first3 = Ishita
| last4 = Roy
| first4 = Tanmay
| year = 2021
| title = Real-time performance benchmarking using vmstat/iostat
| url = https://www.researchgate.net/publication/393509597_REAL-TIME_PERFORMANCE_BENCHMARKING_USING_VMSTATIOSTAT
| accessdate = 2026-03-22
}}</ref>

The vmstat tool is available on most [Unix](/source/Unix) and [Unix-like](/source/Unix-like) operating systems, such as [FreeBSD](/source/FreeBSD), [Linux](/source/Linux) or [Solaris](/source/Solaris_(operating_system)).

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

<syntaxhighlight lang="console">
# vmstat 2 6
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
 0  0   2536  21496 185684 1353000    0    0     0    14    1     2  0  0 100  0
 0  0   2536  21496 185684 1353000    0    0     0    28 1030   145  0  0 100  0
 0  0   2536  21496 185684 1353000    0    0     0     0 1026   132  0  0 100  0
 0  0   2536  21520 185684 1353000    0    0     0     0 1033   186  1  0 99  0
 0  0   2536  21520 185684 1353000    0    0     0     0 1024   141  0  0 100  0
 0  0   2536  21584 185684 1353000    0    0     0     0 1025   131  0  0 100  0
</syntaxhighlight>

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.

;<syntaxhighlight lang="console" inline># vmstat –s</syntaxhighlight>:     This option is used to get ''memory statistics''.

;<syntaxhighlight lang="console" inline># vmstat –d</syntaxhighlight>:     This option is used to get ''disk statistics''.

== See also ==
* [nmon](/source/nmon) &mdash; a system monitor tool for the AIX and Linux operating systems.
* [iostat](/source/iostat)
* [top](/source/top_(software))
* [sar](/source/sar_(Unix))

==References==
{{reflist}}

== External links ==
* {{man|8|vmstat|FreeBSD}}
* {{man|8|vmstat|Solaris}}
* {{man|8|vmstat|die.net|Report virtual memory statistics}}
* [http://www.softpanorama.org/Utilities/vmstat.shtml  Softpanorama vmstat page]

Category:Unix software
Category:System monitors

{{Unix-stub}}

---
Adapted from the Wikipedia article [Vmstat](https://en.wikipedia.org/wiki/Vmstat) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Vmstat?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
