[rrd-users] Re: Disk Usage per SNMP?
Erik de Mare
erik at oezie.org
Sun Apr 6 22:34:32 MEST 2003
Hugo van der Kooij wrote:
>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.
>
>
>
hi,
I tried that also, and wrote a script for that to monitor each drive on
the computers in my network.
It uses the Net::SNMP and the RRDs modules for perl, als stores the
"used" and "total" data in the rrd file.
Erik
attached are 3 sample images and the script
-- Attached file removed by Ecartis and put at URL below --
-- Type: text/plain
-- Size: 7k (8181 bytes)
-- URL : http://www.ee.ethz.ch/~slist/pantomime/hd.pl
-- Attached file removed by Ecartis and put at URL below --
-- Type: image/png
-- Size: 2k (2802 bytes)
-- URL : http://www.ee.ethz.ch/~slist/pantomime/jachtluipaard-2.png
-- Attached file removed by Ecartis and put at URL below --
-- Type: image/png
-- Size: 2k (2817 bytes)
-- URL : http://www.ee.ethz.ch/~slist/pantomime/jachtluipaard-3.png
-- Attached file removed by Ecartis and put at URL below --
-- Type: image/png
-- Size: 2k (2846 bytes)
-- URL : http://www.ee.ethz.ch/~slist/pantomime/jachtluipaard-4.png
--
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