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

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Sun May 9 00:24:15 CEST 2010


----- Original Message ----- 
From: "Matt Chung" <itsmemattchung at gmail.com>
To: "Alex van den Bogaerdt" <alex at vandenbogaerdt.nl>
Cc: <rrd-users at lists.oetiker.ch>
Sent: Saturday, May 08, 2010 8:55 PM
Subject: Re: [rrd-users] CDEF:a=TIME throws error


> Awesome that worked!
>
> Thank you for the thorough explanation, I really appreciate it.
> Essentially, if I understand your example correctly,
> "CDEF:time=var,POP,TIME" translates to
> "Set $time equal to that array, grab the top element from the array, grab
> the time from that element using TIME".  It then does that for each index 
> in
> the array.

I think you got it. Just to be sure:

The keywords here: "for each index in the array".

When "var" goes on the stack, an array is created and filled with data.
When the "pop" command is given, the data is removed again. The (properties 
of the) array stays behind.

No array means no resulting CDEF. There simply is nothing to return into var 
"time".

HTH
Alex



More information about the rrd-users mailing list