[rrd-users] How to get MAX/MIN of non-rates?

Tony Mountifield tony at mountifield.org
Wed Apr 3 14:24:31 CEST 2013

Further to my previous query, I have been experimenting with using step=1
and having one of my RRAs contain an hour's worth of 1-second values.

This has shown up another issue which is related to the "everything is a rate"
philosophy of RRD. I am using a RRD GAUGE DS to log values which are not rates,
but rather instantaneous values (e.g. disk space, channel usage, temperature).

Let's say I log a value of 20 at time x. The input data changes to 25 at time
y, so I log it at that time. I want the graph to show 20 from time x to time y
and 25 from time y onwards.

However, RRD is taking those values to be pre-derived *rates since the
previous update*. So it is assuming the 25 means the average rate of
something between time x and time y. So the graph is always one update
adrift of the true change in values.

The only way around this that I can think of is to remember the old value,
and write it to the immediately preceding time. So in the above example,
at time y I would write the old value of 20 to time y-1 and then the new
value of 25 to time y.

I'm using 1.0.49, just in case that is relevant.

Is there any way, in that version or a newer version, to properly handle
values that are instantaneous quantities rather than rates, without having
to resort to the dual-write kludge I mentioned above?


Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org

More information about the rrd-users mailing list