[rrd-users] unexpected behavior of GPRINT and DEFS with start= args
Martin Sperl
rrdtool at martin.sperl.org
Thu Jun 30 20:08:13 CEST 2011
OK, the solution I found was to Use 2 DEFS:
* one without the start parameter (say avg)
* one with the start parameter (say avgext)
and then calculate the prediction using avgext
and calculating the difference between the (extended) PREDICTION and the unextended value.
The subtraction will become NAN for those values that only exist in "avgext" and thus are not included in the MIN/AVERAGE/MAX calculation of GPRINT.
So with this I get the expected value of 8.6 and not the value 0.28.
Still the question is: is this expected behavior for GPRINT?
Ciao,
Martin
On 30.06.2011, at 19:54, Martin Sperl wrote:
> Hi!
>
> I have a unexpected behavior with a graph that is created similar to this (simplified):
> ...
> --start=1309282387 \
> --end=1309285987 \
> 'DEF:avg=test.rrd:value:AVERAGE:start=1308677587' \
> 'LINE1:avg:average' \
> 'GPRINT:avg:MIN:(%9.2lf' \
> 'GPRINT:avg:AVERAGE:/%9.2lf' \
> 'GPRINT:avg:MAX:/%9.2lf' \
> 'GPRINT:avg:LAST:/%9.2lf)\l'
>
> I was assuming that the GPRINT would only be calculating the min/max/average/last for the area really graphed (3600 seconds).
> But it seems it is calculating it for the whole 7 days and 1 hour (=608400 seconds) that got loaded in DEF.
>
> Is this "expected" and/or "intended" behavior?
>
> If it is, is there an easy means to get what I really need - just the values for what I graph.
>
> You may ask why I use "start=" in the DEF in the first place.
>
> The explanation is that I essentially need it for predictions using the PREDICT CDEF function.
> And it came as a surprise when I was trying to estimate the AVERAGE of a graph zoomed in on an "outage", which showed the difference between the average and the prediction (using "CDEF:delta=avg,604800,604800,518400,432000,345600,259200,172800,86400,8,1800,avg,PREDICT,-")
> I was expecting an average of -8 as the average but got 0.28, which would be realistic for the whole 7 days.
>
> Thanks,
> Martin
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
More information about the rrd-users
mailing list