[rrd-users] Re: Cumulative totals

Ollie Maitland ollie at byng-systems.com
Tue Dec 5 15:48:21 MET 2006


Awesome. Thank you to both you and Rene!
I have this working now :)

Alex van den Bogaerdt wrote:
> On Tue, Dec 05, 2006 at 11:39:57AM +0000, Ollie Maitland wrote:
>
>
>   
>> DS:Registrations2007:GAUGE:86400:0:1000
>> DS:TotalReg:COMPUTE:Registrations2007,PREV(TotalReg),+
>>     
>
> This isn't right.
>
>   
>> I have also tried:
>>
>> CDEF:TotalReg=TotalReg,PREV(Registrations2007),+
>>     
>
> This is closer.  However, you fail to see that
> PREV(Registrations2007) starts out as an unknown (the first
> time it is run refers to data outside the interval). Because
> <something>+<unknown> equals <unknown>, you end up adding
> unknowns each time.
>
> You don't need PREV(...), you can use PREV  (without the brackets)
> to find the previous value.
>
> Try changing unknown into zero; something like
>
> PREV,UN,0,PREV,IF
>
> This results in:
>   if the previous value was unknown
>      push zero on the stack
>   else
>      push the previous value on the stack
>
> Then add the current value of Registrations2007:
> PREV,UN,0,PREV,IF,Registrations2007,+
>
> This will reset to zero each time Registrations2007 was unknown
> in the previous round.  If you don't want this, alter unknowns
> for Registrations2007 into zero as well.
>
>   

-- 
Byng Systems is now trading as Byng Systems LLP

Byng Systems LLP (Partnership No. OC317960)

Mobile: +44 (0)797 467 8882
Office: +44 (0)207 395 5790

This email is confidential and intended solely for the use of the individual or entity to whom they are addressed.  
Any views or opinions presented are solely those of the author and do not necessarily reflect those of Byng Systems LLP.



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



More information about the rrd-users mailing list