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, but we recommend installing through YUM command.
Install Sysstat in Linux
- 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.
- Free – Amount of free/idle memory spaces.
- si – Swaped in every second from disk in Kilo Bytes.
- so – Swaped out every second to disk in Kilo Bytes.
Note: If you run vmstat without parameters it’ll displays summary report since system boot.
2. Execute vmstat ‘X’ seconds and (‘N’number of times)
With this command, vmstat execute every two seconds and stop automatically after executing six intervals.
3. Vmstat with timestamps
vmstat command with -t parameter shows timestamps with every line printed as shown below.
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
► Read more: http://adf.ly/1n5xHO
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
No comments:
Post a Comment