Hi everyone,
I'm currently setting up mrtg to collect system stats on our Alpha 2100,
4.0D.
I've got cpu and load averages without any trouble, but I'm getting a bit
bogged down trying to collect free memory and swap.
I've got the cpu (total cpu , and total user % cpu)...
vmstat 5 2 | tail +5 | awk '{ print (100-$(NF)) "\n" $(NF-2) } '
uptime | awk '{ print $3 " " $4 }' | cut -f1 -d","
Also got system load (5 second and 60 second average)....
uptime | awk '{ print $(NF) "\n" $(NF-2); print $3 " " $4; }' \
| cut -f1 -d"," | cut -f1 -d"."
But I'm having trouble comming up with a decent script to pull out free
memory and swap with vmstat - Not really too sure what the best fields are
to use, and converting everything to Mb to display it.
Has anyone got a sample config script lying around that returns this type
of information? I know it's pretty simple, but I just can't quite get it
right.
Thanks in advance,
reg.
Dirk
dirk_at_iinet.net.au
Received on Mon Jul 12 1999 - 09:38:36 NZST