[rrd-users] Re: Question on rrdtool graph

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Sat Mar 17 10:56:17 MET 2001

Chang-Ping Hsiao wrote:

>     I am having a question on the rrdtool graph output for I don't know how
> to select an RRA for the output.  I hope I can get some help from here, and
> it is much appreciated.

You don't select the correct RRA, let rrdtool do this for you.

>     I am having different RRAs for an RRD.  All RRAs are using CF AVERAGE as
> you can see below.  In the document for rrdtool graph, in the DEF: section,
> it says "... The DEF call automatically chooses an RRA which contains CF
> consolidated data in a resolution appropriate for the size of the graph to
> be drawn."  Since I don't have enough data yet, I would have no way of
> telling where or not I can retrieve data in the range at my will.

1st of all, an RRA must have the same CF properties.  In your case
there's not much to choose from as you only have AVERAGE RRAs.
Normally, you can fetch maximum values from the MAX RRA and average
values from the AVERAGE RRA.  Which CF to use is selected by DEF.

Then, the closest match is found on the time frame you selected.

> sub create_rrd {        # create an RRD for a production box
>         my $start = "--start $time_s";
>         my $step  = "--step 3600";

Step time == 3600 --> one hour per PDP (primary data point)

>         my $rra1  = "RRA:AVERAGE:0.5:1:8784";   # daily

One PDP per CDP (consolidated data point, row) in this RRA
and 8784 rows.  This makes a total of 366 days, or: a year.

>         my $rra2  = "RRA:AVERAGE:0.5:3:2928";   # weekly

Three PDPs per CDP, totalling 2928 rows.  This is thus 2928
rows of 3 hours per row = the same amount of time as the
previous RRA. (I don't think this one gets used often...)

>         my $rra3  = "RRA:AVERAGE:0.5:6:1464";   # monthly
>         my $rra4  = "RRA:AVERAGE:0.5:12:732";   # quarterly
>         my $rra5  = "RRA:AVERAGE:0.5:24:366";   # yearly

The purpose of having multiple RRAs is that you can store
data for a longer time, with a lower resolution.  There's
nothing agains having such a long "daily" RRA but it makes
no sense to have the "yearly" RRA with the same amount of
data.  It may speed up graphing a bit but I don't think
this is noticeable.

However, you can run rrdtool fetch with different resolution
settings and see what consolidation does with your data.
Do, for instance:
rrdtool fetch --resolution 3600 --start '00:00' --end start+6h
rrdtool fetch --resolution 10800 --start '00:00' --end start+6h

on the same RRD so see the differences.

 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
| Technical questions sent directly to me will be nuked. Use the list. | 
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |

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