[rrd-users] Disk Usage per SNMP?

Hugo van der Kooij hvdkooij at vanderkooij.org
Sun Apr 6 22:01:44 MEST 2003


Hi,

I am trying to graph diskusage with RRDtools. (Finally changing from MRTG) 
but it seems it does not work to well.

I initialized the database with:

rrdtool create /etc/stats/aragorn.disk.usr.rrd  \
        DS:units:GAUGE:600:U:U  \
        DS:size:ABSOLUTE:600:U:U        \
        DS:used:ABSOLUTE:600:U:U        \
        RRA:AVERAGE:0.5:1:576           \
        RRA:AVERAGE:0.5:6:672           \
        RRA:AVERAGE:0.5:24:732          \
        RRA:AVERAGE:0.5:288:732         \
        RRA:MAX:0.5:1:576               \
        RRA:MAX:0.5:6:672               \
        RRA:MAX:0.5:24:732              \
        RRA:MAX:0.5:288:732

I read the vaules in with:

UNITS=`$SNMPGET -v1 -c mysnmpd aragorn 1.3.6.1.2.1.25.2.3.1.4.8|awk '{print $4}'`
SIZE=`$SNMPGET -v1 -c mysnmpd aragorn 1.3.6.1.2.1.25.2.3.1.5.8|awk '{print $4}'`
USED=`$SNMPGET -v1 -c mysnmpd aragorn 1.3.6.1.2.1.25.2.3.1.6.8|awk '{print $4}'`
rrdtool update $STATDIR/aragorn.disk.usr.rrd N:$UNITS:$SIZE:$USED

I checked the values with an additional echo command and the proper values 
are returned and fed to rrdtool.

But graphing them seem to be a bit harder.

I tried a simple version with:

rrdtool graph $GRAPHS/aragorn-disk-home.$PERIOD.gif --start -$LENGTH    \
        -t "aragorn DISK /home $TITEL"                          \
        DEF:units=$STATS/aragorn.disk.home.rrd:units:AVERAGE    \
        DEF:size=$STATS/aragorn.disk.home.rrd:size:AVERAGE      \
        DEF:used=$STATS/aragorn.disk.home.rrd:used:AVERAGE      \
        CDEF:disk=used,units,*                                  \
        AREA:normal#7EE600:"used"                               \
        GPRINT:disk:AVERAGE:"Gemiddeld\:%14.0lf B"              \
        GPRINT:disk:MAX:"Maximum\:%14.0lf B\n"

But the values shown are not what I would expect. The specific partition 
is rather large but I was under the impression the RRDtools could handle 
larger values (> 2^32). See also the df output:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/md7             111207864 103446296   2112320  98% /home

In the long run I would like to use a three color approach. (green for < 
80%; orange for 80-95%; red for > 95%)

Hugo.

-- 
 All email sent to me is bound to the rules described on my homepage.
    hvdkooij at vanderkooij.org		http://hvdkooij.xs4all.nl/
	    Don't meddle in the affairs of sysadmins,
	    for they are subtle and quick to anger.

--
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