Sep 5, 2008

vmstat

vmstat gives average server figures, but gives a good look at disk, memory, swapping, faults, paging and cpu activity. Use other commands to delve deeper into the problem.

The vmstat -S option gives you swapping details

report the number of threads in the following state:

ccpsd:/home/oracle> vmstat
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr m0 m1 m3 m4 in sy cs us sy id
2 0 0 2272968 550664 92 292 1862 22 24 0 12 7 1 3 3 226 418 155 39 13 49

r - in run queue
b - blocked for resources etc
w - swapped

swap - amount of swap space currently available (kbyte)
free - amount of free swap space (kbyte)

info about paging faults / activity (per second)
re - page reclaims
mf - minor faults
pi - kbyte paged in
po - kbyte paged out
fr - kbytes freed
de - anticipated short-term memory shortfall (kbyte)
sr - pages scanned by clock algorithm

disk - number of disk operations / second. refer to other commands for further information.

faults - report the trap/interrupt rates (per second)
in - interrupts
sy - system calls
cs - CPU context switches

cpu - avg of all cpu's
us - user time
sy - system time
id - idle time