In article <[email protected]>, Simon Hobson <[email protected]> wrote: > Tony Mountifield wrote: > >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. > > No, how can you be sure that the rate didn't change a microsecond after you > read it ?
My point is regarding values that are *not* rates. > >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. > > Correct I got this working, and it looks much saner now. > >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? > > The way it's doing it now is not incorrect, just not what you want. I know it's not incorrect, *iff* the supplied gauge values indicate rates since the time of the previous value. I guess my point is that RRD would be enhanced if it was able to store values that don't indicate rates, but rather the last known value of a scalar quantity, and the time of that value (implying "until further notice"). > If you > sample at t=0 and t=10, then you only know the values at t=0 and t=10 - > you don't know the values at t=1, t=2, ... t=9. At t=10, you only know > (when using RRD for it's primary task) that the *AVERAGE* between t=0 and > t=10 was <something>. RRD correctly shows the value stored at t=10 as > applying between t=0 and t=10, not as predicting the future between t=10 > and t=20. Gauge values don't change that, they are really just a fudge to > store numbers in place of rates. I'm not trying to predict the future, I just want a mode where storing such a value at t=10 implies that the previous value was valid until t=9, which would be the case for scalar values rather than rates. But anyway, at least I have a workaround. Cheers Tony -- Tony Mountifield Work: [email protected] - http://www.softins.co.uk Play: [email protected] - http://tony.mountifield.org _______________________________________________ rrd-users mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
