[nmglug] RRD

jdavis jd at taproot.bz
Thu Feb 26 11:56:30 PST 2004


On Thu, 2004-02-26 at 12:16, Kevin P. Karns wrote:
> jdavis wrote:
> 
> >Hello,
> > So i am trying to graph shyt using rrd. I have made a few graphs, but I
> >dont really get it. Is anyone coming to the glug tonight who is versed
> >with rrd?
> >
> >  
> >
> i don't get it either ...
> i once donated to the GNU/rrdtools project  
> http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
> i'd like to learn more as well
> you're speaking perl with this, right?
yes, here is what im doing....

 I am trying to setup a simple rrd and then graph the data. My data
set is simple.. every 5 minutes my rrd is updated with a number between
1 - 500. I would like the graph to have values ranging from 1 - 500 on
the vertical axis. And the have a 24 hour period represented by the
horizontal axis. I am still pretty confused as how to do this. Here is
what Im trying....

rrdtool create test.rrd   \
--start 1077819500        \
DS:speed:ABSOLUTE:300:U:U \
RRA:AVERAGE:0.5:1:24

I think this is only for  2 hours, i will adjust to 24 hours when i
think i understand ...

then heres what updates the rrd...

#! /usr/bin/perl -w
$amount = 1;
@array = 1 .. 500;

while($amount){
        sleep(300);
        $index   = rand @array;
        $element = $array[$index];
        $date = `/bin/date +%s`;
        chomp($date);
        print "Date = $date - Element = $element\n";
        `rrdtool update test.rrd  $date:$element`;
}

the output i get from this is not what i expected to see..
on the vertical axis i get 1.0 to 1.4 not 1 to the highest value 
inserted. 

Could someone please help me understand. I just want a graph that tells
me what the number was that was entered into the rrd every 5 minutes. 

thanks,
jd

> 
> 
> 
> _______________________________________________
> nmglug mailing list
> nmglug at nmglug.org
> http://www.nmglug.org/mailman/listinfo/nmglug
-- 
jdavis <jd at taproot.bz>





More information about the nmglug mailing list