[rrd-developers] Re: VDEF vs CDEF

Alex van den Bogaerdt alex at ergens.op.het.net
Mon Mar 13 14:52:36 MET 2006

On Mon, Mar 13, 2006 at 11:15:35AM +0100, Daniel Abramowicz wrote:

> However, I'm confused with VDEFs. What is the difference between a CDEF
> and a VDEF?

At some point in processing, rrdtool has gathered an array of rates
ready to display.

CDEF works on such an array.  Example: "CDEF:new=ds0,8,*" would multiply
each of the array members by 8 (probably transforming bytes into bits).
The result is an array containing the new values.

VDEF also works on such an array but in a different way.  Example:
"VDEF:max=ds0,MAXIMUM" would scan each of the array members and
remember the highest value.  The result is one value.

> When do I use a CDEF instead of a VDEF?

You use a VDEF if you want "max(1,5,3,2,4)" to return 5.  You use
a CDEF if you want "times8(1,2,3,4,5)" to return (8,16,24,32,40).

Alex van den Bogaerdt

Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-developers
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

More information about the rrd-developers mailing list