[rrd-users] Re: Avoiding pitfalls when using GAUGE with some kind of data

Serge Maandag serge.maandag at staff.zeelandnet.nl
Sun Aug 22 02:19:51 MEST 2004


Christian,

These would only be pifalls if your conception of rrdtool is:
- it waits to collect all updates within an interval.
- it then will pick the maximum of all updates for the MAX RRA
- it will calculate the average of all values within the step
  and will transport that value to the AVERAGE RRA, and so on.

This is a misconception though.
Rrdtool is is a rate calculating, storing and graphing tool.

I would yield very strange results if it would work your way.
Most people update rrdtool databases from scripts running as
A cron-job. What if one update was 1 second late and the next
One was 1 second early? Your database would say (NaN), 
(number without useful meaning) i.s.o. 2 very useful, but 
slightly corrected Values (time shifted and interpolated to 
the step interval).

To get back at your previous MAX problem, compare the output of:

rrdtool create test.rrd --start 1093110000 --step 600
DS:people:GAUGE:1200:U:U RRA:MAX:0.5:1:6
rrdtool update test.rrd 1093110600:10
rrdtool update test.rrd 1093110750:20
rrdtool update test.rrd 1093111199:300
rrdtool update test.rrd 1093111201:10
rrdtool fetch test.rrd MAX --start 1093110000 --end 1093112400

With the output of:

rm test.rrd
rrdtool create test.rrd --start 1093110000 --step 1
DS:people:GAUGE:1200:U:U RRA:MAX:0.5:600:6
rrdtool update test.rrd 1093110600:10
rrdtool update test.rrd 1093110750:20
rrdtool update test.rrd 1093111199:300
rrdtool update test.rrd 1093111201:10
rrdtool fetch test.rrd MAX --start 1093110000 --end 1093112400

Setting the step size to 1 second will give you the output you want.
Aligning your updates to the step interval will do that too

Serge.

-------------
Op de inhoud van dit e-mailbericht en de daaraan gehechte bijlagen is de inhoud van de volgende disclaimer van toepassing: http://www.zeelandnet.nl/disclaimer.php

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