[rrd-users] Re: trying to use PREV in a CDEF
Steen Linden
Steen.Linden at ebone.net
Fri Sep 15 13:50:58 MEST 2000
Hi Clarence,
PREV is accumulative, so you can't use it for a calculation just involving
the two latest DS values. PREV is suitable for producing sums for
e.g. volume based billing (CDEF:sum=PREV,UN,0,PREV,IF,n,+).
You can store the difference between the latest two samples by using an
exta DS of type DERIVE in addition to the GAUGE. It takes up extra space of
course.
Best wishes
Steen Linden
GTS Ebone
On Thu, 14 Sep 2000, Clarence Gardner wrote:
>
>
> I have a GAUGE data source that I need to graph two ways: one, just the
> normal data, and two, the difference between successive samples.
> E.g., for data 1000,1010,1050 I want abscissas of 1000,1010,1050 on the
> first graph and 10,40 on the second. Obviously a job for PREV, I thought.
>
> I tried
> CDEF:delta=n,PREV,-
> but got nothing on the graph. I'm thinking this is because the UNKNOWN
> value that it got the first time propagated to each value in turn. So
> then I tried
> CDEF:delta=n,PREV,UN,n,PREV,IF,-
> to get rid of the UNK at the beginning. This works once, and returns, e.g.,
> 10 as the difference between 1000 and 1010. Unfortunately, it also makes 10
> the value at that ordinate, thus the next cycle calculates 1050 - 10 rather
> than 1050 - 1010. This makes for a graph that oscillates wildly.
>
> Am I missing something here about how to use PREV? Thanks for any help.
>
> --
> Clarence Gardner
> Software Engineer
> NetLojix Communications
> clarence at netlojix.com
>
> --
> 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