[rrd-users] Re: rate of change
Aaron Spiegel
spiegela at birch.net
Tue Nov 4 05:40:17 MET 2003
Alternatively, you could just store another value as a counter. That
would give you the delta current and previous datapoint.
For more accurate "rate of change" you can fetch the data out of the
rrd (into perl for example), and use the perl Math::Interpolate module
to get a best fit function from the points with time being the x values
and y being the disk space usage, and then use Math::Derivative to get
the second derivative of that function. The second derivative of a
function is by definition the rate of change.
I haven't done it yet, but am planning on it for a Nagios plugin... If
anyone else has suggestions, I'm certainly open.
Aaron Spiegel
On Oct 30, 2003, at 3:30 AM, Stephan Harren wrote:
> How about using PREV?
>
> You can CDEF:oldvalue=actualvalue, oldtime=TIME. Then you can use
> CDEF:roc=actualvalue,PREV(oldvalue),-,TIME,PREV(oldtime),-,/
>
> Best regards and HTH,
>
> Stephan
>
>> assumption: ROC = (y1 - y0) / (x1 - x0)
>>
>> my rrd is a gauge of disk space used in bytes.
>> i assume all I need is to keep the first byte value (y0)
>> and first timestamp (x0), then cdef it like this:
>>
>> CDEF:roc=y1,y0,-,TIME,x0-,/
>>
>> but howto save first values (time = x0, bytes = y0)?
>> this doesnt work:
>>
>> CDEF:y0=y0,UN,used,y0,IF
>> CDEF:x0=x0,UN,TIME,x0,IF
>>
>> Howto save first values?
>> any other suggestions for ROC calculation?
> --
> Stephan Harren
> Manager Site Operations
> AboveNet Deutschland GmbH
> -------------------------------
> Phone +49 69 90554 153
> Fax +49 69 90554 111
> Cell +49 173 7011126
>
> --
> 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
>
--
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