[rrd-users] Newbie help with rrdtool

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Sun Sep 18 01:43:05 CEST 2011


> Hi all,
> i admit to be in trouble with rrdtool.
>
> I have a database of apache aggregated request logs with timestamps and
> bytes
> summarized in blocks of 300secs (to minimize IO on the datase), es:
> 10.00am: 300 bytes
> 10.05am: 250 bytes
> 10.10am: 350 bytes
> etc...

First thing to consider: did you log 300 bytes between 10.00am and
10.05am, or between 09.55am and 10.00am ?
For things to work as expected in RRDtool, you need to count bytes until
10.00am and then enter at 10.00am. In other words: what you log at 10.00am
is the data between 09.55am and 10.00am.

> What I need is to track bytes/hour and total bytes per month/week... but i
> cant
> find a way to do this.

A month is a month is a month. A month can be 28 days, 29 days, 30 days,
31 days, 30 days plus or minus one hour, 31 days plus or minus one hour,
and probably some other amounts of time subtracted/added to a month.

If you need to track per month, no matter how long that month is, then you
are looking at the wrong tool. You need a graphing tool to visualize your
database output.

If you want to visualize your data per fixed amount of time maybe
approaching a month, then continue with rrdtool.

> For testing I tried something like this:
>
> # rrdtool create test.rrd  --start 920808200  DS:bytes:ABSOLUTE:300:U:U
> RRA:AVERAGE:0.5:1:500

920808200  cannot be divided by 300 (without remainder) so maybe it is not
what you expect. Or maybe it is just a typo?
The rest of your timestamps are okay (albeit very old) so I will assume
it's a typo for now.

> # rrdtool update test.rrd  920808600:130 920808900:115 920809200:150
> 920809500:170
>
> # rrdtool graph speed.png      --start 920808300 --end 920809800
> DEF:cbytes=test.rrd:bytes:AVERAGE  LINE1:cbytes#FF0000
>
> But without expected results,
> do someone have some idea/suggestion or an ready to use example?

What do you expect, what do you get?

Read the tutorials. Try the examples. Find the bug.
Also see the documentation, and see my site for more in depth explanation
of how it works: http://rrdtool.vandenbogaerdt.nl/

HTH
Alex




More information about the rrd-users mailing list