[rrd-users] rrdtool doesn't detect integer overflow

Oleg Derevenetz oleg at vsi.ru
Wed Aug 22 14:10:55 CEST 2007


>> But is there any way to say rrdupdate that there is no wrap ? For example, if I getting counters from network device interface, 
>> and
>> I really know that device was rebooted recently, is there any way to say rrdupdate that only THIS counter value should not be
>> wrapped, but all subsequent values should be wrapped when necessary ?
>
> What do you know?
>
> 1: you know the most recent update (this is already in RRDtool)
> 2: you know a reboot has occured
> 3: you know the counter starts at zero when a reboot occurs
>
> In step 2, you probably also know (or can know) the exact time when
> this reboot occured.
>
> What do you NOT know?
>
> 1: the interval between the most recent update and the reboot
> 2: the countervalue at time of reboot
> 3: as a result of 1 and 2: the resulting rate is unknown
>
> if you do not know the exact time of the reboot:
> 4: the interval between the reboot and the first regular update
> 5: as a result, you can't compute a rate and neither can RRDtool
>
> So, there are two distinct cases:
>
> a) you do know the exact reboot time
> b) you don't
>
>
> Some variables to be able to talk:
> n   countervalue at first poll after reboot
> Tf  time of first poll after reboot
> Tl  time of last poll before reboot
> Tr  time of reset
>
> In case (a):
> Update your database at time Tr-1 with value U
> Update your database at time Tr with value 0
> Update your database at time Tf with value n
>
> Result:
> Time Tl to Tr has an unknown rate.
> Time Tr to Tf has a known rate of n/Tf
>
> In case (b):
> Update your database at time Tf-1 with value U
> Update your database at time Tf with value n
>
> Result:
> Time Tl to Tr has an unknown rate.
> Time Tr to Tf has an unknown rate as well.

Aha, so updating with value U at T-1 will not cause wrap when updating with value 0 at T. Really I guess something like that. 
Thanks.

--
Oleg Derevenetz <oleg at vsi.ru> OOD3-RIPE
Phone: +7 4732 539880
Fax:   +7 4732 531415         http://www.vsi.ru
CenterTelecom Voronezh ISP    http://isp.vsi.ru



More information about the rrd-users mailing list