From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079058315809.tru64-unix-managers.marc@archive.invalid> From: dirk () iinet ! net ! au Date: Mon, 12 Jul 1999 09:35:44 +0000 To: tru64-unix-managers Subject: mrtg - recording swap and mem. with vmstat X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079058315809 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@iinet.net.au