Vmstat

From LinuxReviews
Jump to: navigation, search

Vmstat is a system monitoring tool which is essential in order to make good decisions about what is really going on regarding the load on a Unix-type system.

[edit] Official story

vmstat manpage story is that:

"vmstat reports information about processes, memory, paging, block IO, traps, and cpu activity.

The first report produced gives averages since the last reboot. Additional reports give information on a sampling period of length delay. The process and memory reports are instantaneous in either case."

vmstat manual page

[edit] Why you should be aware of vmstat

uptime gives you a nice line which shows the load average (just type "uptime"):

07:41:26 up 30 days, 10:11, 34 users,  load average: 4.58, 3.30, 2.58

You are seriously compromising your ability to make large, sustainable legal returns for the owners of your corporation if your load average is above 1. If it is the first obvious question is probalby WHY? WHY is it so high? vmstat can give you information which can help you understand what is going on.

vmstat's first argument is typically a number in seconds, for example, vmstat 10 makes it update every 10 seconds. An example of this is:

procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
 5  2 482160  42276  21960 428804    0    0     0     0   15     7 26 10 51 13
 7  0 482160  33356  22088 438228    0    0     0     0  489  1521 29 71  0  0
 9  2 482160  33684  23500 436580    0    0     0     0  418  1146 49 43  0  8
 6  1 482160  33732  24908 434892    0    0     0     0  331  1299 68 22  0 10
 4  0 482160  34000  25988 433876    0    0     0     0  345  1777 66 29  0  5
 5  1 482160  32592  27092 434132    0    0     0     0  280  1171 72 22  0  7

[edit] Disk monitoring

A very useful and little known option to vmstat is -p, which shows you the disc usage of a given partation. vmstat -p /dev/hda3 will show you the IO statistics for that partation.

System monitoring tools

Vmstat | Sysstat

Network monitoring tools

Bmon

Personal tools
hardware tests
Categories
Privacy policy
linux events
ipv6
Networking
IPv6

Search:

linux newz | random page | poetry | free blog