updates 2001.05.13
Will Partain <[email protected]>
| Newsgroups | gmane.comp.sysutils.ark.devel |
|---|---|
| Message-ID | <[email protected]> |
Folks, as ever, a few things checked in; the highlight
follows... (If you want to know *exactly* what's flying
past, I suggest you subscribe to the ark-commits list.)
Two little scripts in sidai/gen-utils, cpustat and diskstat;
these are "site-at-a-time" versions of 'top' and 'df'
(essentially). I like 'em; you don't have to :-) Would be
nice to complete the set w/ a front-end to 'ntop' (network
top) [if it weren't a security-bug farm].
--help output first (below), then sample runs.
Will
% PYTHONPATH=$ark/ARK/arkbase ./cpustat --help
cpustat [options] <host1> [<host2...>]
--interval=n Refresh every n seconds; default 60
--count=n Run n times; default -1, meaning continuously
--per-host=n Show n top processes per host; default 5
--per-host=0 means 'all'.
--all Synonym for --per-host=0
--threshold=n Show processes with CPU usage above n%; default 30%
% PYTHONPATH=$ark/ARK/arkbase ./diskstat --help
diskstat [options] <host1> [<host2...>]
--interval=n Refresh every n seconds; default 60
--count=n Run n times; default -1, meaning continuously
--threshold=n Only show partitions above n% full; default 80%
--all Synonym for --threshold=0
% PYTHONPATH=$ark/ARK/arkbase ./cpustat --count=1 --all ALL
ignoring non-active host: clarence
HOST: PID USERNAME SIZE STATE TIME CPU COMMAND
... May 13 17:49:54 ..............................................
slicker: 9174 partain 5128K sleep 0:00 3.49% python
slicker: 9208 partain 1664K cpu 0:00 0.73% top
slicker: 3096 partain 29M sleep 19:21 0.69% xemacs-21.1.14
slicker: 22560 root 128M sleep 55:41 0.14% Xsun
slicker: 1 root 1352K sleep 1:15 0.06% init
slimy: 29501 partain 1664K cpu 0:00 0.78% top
slimy: 169 root 3376K sleep 26:36 0.15% automountd
slimy: 29499 root 2752K sleep 0:00 0.14% in.rshd
slimy: 29500 partain 928K sleep 0:00 0.09% sh
slimy: 145 root 2016K sleep 0:01 0.08% inetd
slinger: 12522 partain 1656K cpu 0:00 0.82% top
slinger: 12520 root 2752K sleep 0:00 0.29% in.rshd
slinger: 12521 partain 928K sleep 0:00 0.05% sh
slinger: 1 root 696K sleep 1:10 0.02% init
slinger: 296 root 1792K sleep 1:40 0.02% mibiisa
------------------------------------------------------------------
% PYTHONPATH=$ark/ARK/arkbase ./diskstat --count=1 --all ALL
ignoring non-active host: clarence
capacity used avail. %full host:partition
... May 13 17:50:16 ..............................................
39 18 18 50% slicker:/
492 191 252 44% slicker:/usr
492 47 397 11% slicker:/var
6,119 0 6,057 1% slicker:/._disc1
246 7 215 3% slicker:/opt
263 173 64 74% slicker:/usr/openwin
16,949 10,052 6,727 60% slicker:/._disc2
39 18 18 51% slimy:/
492 207 236 47% slimy:/usr
492 213 231 48% slimy:/var
263 173 64 74% slimy:/usr/openwin
246 7 215 3% slimy:/opt
6,118 1,681 4,376 28% slimy:/._disc1
16,949 13,359 3,421 80% slimy:/._disc2
40 18 18 50% slinger:/
492 208 235 47% slinger:/usr
492 76 367 18% slinger:/var
263 173 64 74% slinger:/usr/openwin
246 7 215 3% slinger:/opt
1,470 1,269 142 90% slinger:/._disc1
19,144 9,888 9,065 53% slinger:/._disc2
------------------------------------------------------------------