[rrd-users] newbie: rrd tutorial problem (real world example)

John-Paul Delaney John-Paul.Delaney at wfp.org
Wed Dec 18 09:29:42 MET 2002


Content-Type: text/plain; charset="US-ASCII"

Hello List...

I'm a newbie to mrtg/rrd/perl, and am having problems with the realworld 
example  of the rrd tutorial: 
(http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/tutorial/rrdtutorial.html)

---> According to the doc I created an rrd:

rrdtool create /home/mrtg/rras/10_11_42_1.rrd \
            DS:input:COUNTER:600:U:U   \
            DS:output:COUNTER:600:U:U  \
            RRA:AVERAGE:0.5:1:600      \
            RRA:AVERAGE:0.5:6:700      \
            RRA:AVERAGE:0.5:24:775     \
            RRA:AVERAGE:0.5:288:797    \
            RRA:MAX:0.5:1:600          \
            RRA:MAX:0.5:6:700          \
            RRA:MAX:0.5:24:775         \
            RRA:MAX:0.5:288:797


---> I update the rrd with the following script:

#! /usr/bin/perl -w

$in = `snmpget -c public 10.11.42.1 1.3.6.1.2.1.2.2.1.10.3`;
$out = `snmpget -c public 10.11.42.1 1.3.6.1.2.1.2.2.1.16.3`;

$inSpace= (index $in, ": ")+2;
$outSpace = (index $out, ": ")+2;

$inBytes = substr($in, $inSpace);
$outBytes = substr($out, $outSpace);

chomp($inBytes);
chomp($outBytes);

system("/usr/local/rrdtool-1.0.40/bin/rrdtool update 
/home/mrtg/rras/10_11_42_1.rrd N:$inBytes:$outBytes");


---> After running for >17hours, I generate the graph with the following 
(again taken from the docs).
---> The resulting gif is attached.

/usr/local/rrdtool-1.0.40/bin/rrdtool graph
/var/www/html/mrtg/10_11_42_1.gif --start -86400
DEF:inoctets=/home/mrtg/rras/10_11_42_1.rrd:input:AVERAGE
DEF:outoctets=/home/mrtg/rras/10_11_42_1.rrd:output:AVERAGE
AREA:inoctets#00FF00:"In traffic" LINE1:outoctets#0000FF:"Out traffic"




---> If I do an "rrdtool dump" to an xml file, there is data in the file, 
for example: 

<!-- 2002-12-17 13:30:00 GMT+1 / 1040135400 -->
<row><v> 3.2336765017e+06 </v><v> 2.9610353944e+06 </v></row>
<!-- 2002-12-17 14:00:00 GMT+1 / 1040137200 -->
<row><v> 1.4217670000e+04 </v><v> 9.9994894444e+03 </v></row>
<!-- 2002-12-17 14:30:00 GMT+1 / 1040139000 --><row>
<v> 1.3060485795e+04 </v><v> 9.0714542913e+03 </v></row>
<!-- 2002-12-17 15:00:00 GMT+1 / 1040140800 -->
<row><v> 9.5253486489e+03 </v><v> 5.2754329310e+03 </v></row>


---> Furthermore, the command "rrdtool last" gives me a correct time for 
the last update of the rrd file.


---> My problem is that there is little or no data showing up in the 
graph.

If anyone has any ideas - I'd be grateful for your help.
thanks
/j-p.



-- Attached file removed by Ecartis and put at URL below --
-- Type: image/gif
-- Size: 12k (12793 bytes)
-- URL : http://www.ee.ethz.ch/~slist/pantomime/10_11_42_1.gif


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