[rrd-developers] [SPAM] Re: How to create a new Data Type and Consolidation Function?

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Wed Apr 13 00:50:18 CEST 2011


----- Original Message ----- 
From: "Dan Cech" <dcech at phpwerx.net>
To: "Long V" <long_at_work at yahoo.ca>
Cc: "rrd-developers rrdtool" <rrd-developers at lists.oetiker.ch>
Sent: Tuesday, April 12, 2011 9:25 PM
Subject: Re: [rrd-developers] [SPAM] Re: How to create a new Data Type and 
Consolidation Function?


> On 4/12/2011 3:06 PM, Long V wrote:
>> Example: assume resolution 1 we keep 4 PDP. Resolution 2 we keep 4 CDP. 
>> Then if
>> our zoom time range is time 5 to 8 then it'll trigger res_1 so we have to
>> multiply by 60. If our zoom time range is time 1 to 8 then it'll trigger 
>> res_2
>> and we have to know it's res_2 so we have to multiply by 120 instead of 
>> 60.
>
> I haven't tried it myself but I suspect you could do this using TIME:
>
> DEF:res=rrdfile.rrd:res:AVERAGE
> CDEF:ts=res,POP,TIME
> CDEF:res_mult=res,POP,ts,PREV(ts),-
> CDEF:res_delta=res,res_mult,*
>
> The "res,POP" construct above is just to get around the requirement that
> a CDEF reference at least one DEF.
>
> Would that get the job done?


Isn't this just a complicated way to re-implement TOTAL ?



More information about the rrd-developers mailing list