[ale] top and SWAP
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Fri Sep 7 14:56:39 EDT 2007
On Fri 2007-09-07 14:20:38 -0400, Stephen Leonard wrote:
> On Fri, Sep 07, 2007 at 03:50:54PM +0000, John Wells wrote:
>
>> The boxes we are interested in are headless servers...
>
> I think vmstat(8) has what you're looking for.
vmstat is great. do read the man page first, since the meaning of the
first output line is significantly different from the meanings of each
subsequent line. from man vmstat:
The first report produced gives averages since the last reboot.
Additional reports give information on a sampling period of
length delay.
So if i run "vmstat 2 5", the first line of output is a system-wide
average since last reboot, and the next 4 lines (printed every 2
seconds thereafter) are measurements of the current activity:
[0 dkg at squeak ~]$ vmstat 2 5
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 136816 32232 7808 156756 1 1 36 31 16 11 4 1 93 2
0 0 136816 32232 7816 156764 0 0 0 12 91 179 1 0 99 0
0 0 136816 32232 7816 156764 0 0 0 0 79 165 0 0 100 0
0 0 136816 32240 7820 156764 0 0 0 2 84 164 1 0 99 0
0 0 136816 32240 7820 156764 0 0 0 0 81 164 1 0 99 0
[0 dkg at squeak ~]$
It's a little hard to believe those counts for the initial line of the
swap column, though, since i know more than 1 page has been swapped
in/out since boot.
Anyway, this tool won't give you per-process details, though, which i
suspect is more what the OP was looking for. For per-process stuff, i
think sar (as mentioned earlier) or some other sysstat [0] utility is
the right way to go. In general, reading the documentation for
sysstat will give you many more ideas about how to understand what
goes on in a modern GNU/Linux system.
--dkg
[0] http://perso.orange.fr/sebastien.godard/index.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 826 bytes
Desc: not available
More information about the Ale
mailing list