This is our on-going series of commands and performance monitoring in **Linux**. **Vmstat** and **Iostat** both commands are available on all major **Unix-like (Linux/Unix/FreeBSD/Solaris)** Operating Systems.
If **vmstat** and **iostat** commands are not available on your box, please install **sysstat** package. The **vmstat**, **sar** and **iostat** commands are the collection of package included in **sysstat**– the system monitoring tools. The iostat generates reports of **CPU**& all device statistics. You may download and install **sysstat** using source tarball from link [sysstat][1], but we recommend installing through **YUM** command.
![Linux Performance Monitoring with Vmstat and Iostat](http://www.tecmint.com/wp-content/uploads/2012/09/Linux-VmStat-Iostat-Commands.png)
Linux Performance Monitoring with Vmstat and Iostat
### Install Sysstat in Linux ###
# yum -y install sysstat
- **vmstat** – Summary information of Memory, Processes, Paging etc.
- **iostat** – Central Processing Unit (CPU) statistics and input/output statistics for devices and partitions.
### 6 Vmstat Command Examples in Linux ###
#### 1. List Active and Inactive Memory ####
In the below example, there are six columns. The significant of the columns are explained in man page of **vmstat** in details. Most important fields are **free** under memory and **si**, **so** under swap column.
The **vmstat** displays in **Megabytes** with parameters **-S** and **M**(Uppercase & megabytes). By default **vmstat** displays statistics in kilobytes.
#### 10. Shows I/O statistics only of a single device. ####
By default it displays statistics of all partitions, with **-p** and device name arguments displays only disks **I/O** statistics for specific device only as shown.
[root@tecmint ~]# iostat -p sda
Linux 2.6.32-279.el6.i686 (tecmint.com) 09/03/2012 _i686_ (1 CPU)
With **-V** (Uppercase) parameter displays version of **iostat** as shown.
[root@tecmint ~]# iostat -V
sysstat version 9.0.4
(C) Sebastien Godard (sysstat orange.fr)
**Note**: **vmstat** and **iostat** contains number of columns and flags which may not possible to explain in details. If you want to know more about it you may refer man page of **vmstat** and **iostat**. Please share it if you find this article is useful through our comment box below.