[rrd-users] CDEF:a=TIME throws error

Tobias Oetiker tobi at oetiker.ch
Mon May 10 13:56:26 CEST 2010


Hi Alex,

sorry must have slipped by ... I have fixed it in trunk and the 1.4
branche ...

cheers
tobi


Saturday Alex van den Bogaerdt wrote:

> ----- Original Message -----
> From: "itsmemattchung" <itsmemattchung at gmail.com>
> To: <rrd-users at lists.oetiker.ch>
> Sent: Saturday, May 08, 2010 6:35 PM
> Subject: [rrd-users] CDEF:a=TIME throws error
>
>
>
> > I have followed the documentation
> > http://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html
> > in order to calculate the derivative by using
> > CDEF:a=TIME
> > CDEF:b=PREV(a)
>
> Which is, unfortunately, incorrect.
>
> My name is still on the tutorial, but the data filtering was not written by
> me. Nevertheless, sorry for the confusion.
>
> I have no idea who made that contribution, hopefully Tobi can tell and ask
> him/her for a fix.
>
> > "rrdtool.error: rpn expressions without DEF or CDEF variables are not
> > supported "
> > After searching around on google and through existing tickets, I ran
> > across
> > http://oss.oetiker.ch/rrdtool-trac/ticket/182 which states exactly what I
> > am
> > experiencing.
> >
> > Unfortunately, I am having a hard time interpreting what oetiker posted
>
> Think of DEF and CDEF as working on arrays. Each array member is an interval
> of time combined with a rate valid during that interval.  The array members
> are better known as "steps", or "intervals", or CDPs (Consolidated Data
> Points).
>
> What TIME does, is to take the timestamp of such an interval.  You can then
> do whatever it is you need to do. But, in order for RRDtool to find the
> timestamp of such an interval, it first needs the array of intervals.  In
> "CDEF:time=TIME" there is no data thus no array thus no interval thus no
> timestamp.
>
> Quick fix is to put DEF "var" on the stack and remove it again:
> CDEF:time=var,POP,TIME
> I haven't verified that this will make the example work, but try it.
>
> > When would the syntax from the tutorial (CDEF:a=TIME) be appropriate? If
> > possible, can someone please elaborate on why that doesn't work, or point
> > be
> > in the right direction so I can better understand?
>
> I hope this helped.
> cheers,
> Alex
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-users mailing list