[rrd-users] CDEF / VDEF / PRINT / GRPRINT limitations & workarounds
Alex van den Bogaerdt
alex at ergens.op.het.net
Mon Jul 7 00:12:46 CEST 2008
On Sun, Jul 06, 2008 at 06:26:18PM +0200, Karl Fischer wrote:
> > You do not seem to know what a CDEF actually is. It is an array
> > of numbers, where the index is on the time scale. In your example,
> > there is no time component thus no array thus no CDEF.
>
> I guess you're right - my understanding was different:
> I thougt that a CDEF is a function that get's executed on every DP,
> rather than an array along the time scale ...
Well... in its simplest form, CDEF just copies a DEF:
CDEF:copy=original
with no function. But of course you can perform a function:
CDEF:copy=original,8,*
The trick is: CDEF makes a new series of rates, and it needs to know
how large its 'buckets' need to be. It determines this from the DEF(s)
or CDEF(s) on the right hand side of the equal sign. If there aren't
any, it cannot do this.
Many problems users have boil down to the lack of understanding that
it's not just about rates in rrdtool, it's also about time intervals
during which these rates are valid.
DEF and CDEF aren't a series of numbers. They are a series of
{rate,duration,timestamp}, altough each duration in one DEF or CDEF
is the same.
VDEF is different. It returns one {number,timestamp}. When used
elsewhere, either the number is used, or the timestamp (which also
is a number). This means you can use a VDEF vname everywhere in a
CDEF where a number would be valid.
CDEF:something=10,8,-
is invalid, thus so is
CDEF:something=vdef1,vdef2,-
HTH
--
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/
More information about the rrd-users
mailing list