[rrd-users] Re: OID for Solaris
allan mayerbacher
allan at wopr.topnet.de
Thu Mar 6 14:57:33 MET 2003
Hi,
+ Marek Dohojda schrieb:
> The things I want to monitor are:
> CPU utilization
> Memory Utilization
> Hard disk utilization.
On Solaris 2.6 - should also work on Solaris 9
o free space per partition on hard disk
df=`df -k|awk '/c0t3d0s0/ {printf ""$5}
/c0t3d0s6/ {printf ":"$5}
/c0t3d0s7/ {printf ":"$5}
/swap/ {printf ":"$5}'|tr -d '%' ''`
o used swap | free memory
memtmp=`vmstat 1 3|tail -1|while read i
do
case "$i" in
[0-9]*) set -- $i; echo $4" "$5;;
esac
done`
set -- $memtmp
mem=`expr $swaptotal - $1`":"$2
o cpu in user mode, system mode, idle mode
cpu=`vmstat 1 3|tail -1|awk '{print $20":"$21":"$22}'`
o and maybe load in 1, 5, 15 minutes
load=`uptime|sed \
-e 's/.*load average:\(.*\)/\1/' \
-e 's/,//g' \
-e 's/ *\([0-9]*\) *\([0-9]*\) *\([0-9]*\)/\1\2\3/'| \
tr ' ' ':'`
regards
Allan
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list