# [rrd-users] Getting Total Bytes from COUNTER Data Source

Chris Mason chris at noodles.org.uk
Wed Dec 28 19:28:10 CET 2011

```Actually, for data missing in the middle of a time period I would
prefer it to use averages - this makes sense.
The big problem I have is with missing data at the beginning of the
first step - a 24hr step RRA is always going to over estimate if you
start filling it sometime after midnight whereas the 5min step RRA
won't.

e.g.
if I create an RRD at 23:00 then I would always have 23 hours of over
estimated data.

/Chris

On 28 December 2011 18:17, Chris Mason <chris at noodles.org.uk> wrote:
>>>I am assuming the data that is missing at the beginning of the RRA
>>>would be considered UNKNOWN and I would expect the TOTAL function to
>>>ignore it?
>>
>> You may think that ...
>> It depends on how it's calculated - the obvious calculation is average * time.
>> The average function ignores unknown periods, so the average of
>> unkn,1,2,3 would be 2 (6/3), not 1.5 (6/4). If you then multiply that
>> by the period (4 samples in this case), it would give you 8 instead
>> of 6.
>
> It comes down to whether you want unknowns to be 0 or the average.
> As you say, it comes down to what the TOTAL function does:
>
> If I had 'U,1,2,3' then the average would be 2 but I would hope the
> TOTAL function would use 3*2 to find the TOTAL.
> But other people might want it to estimate the missing values using
> the average - my interpretation is that if a value isn't there, then
> you can't count it.
>
>> It's an interesting debate as to which is more accurate !
>>
>> NB - I don't know the actual calculation that's used. I'll leave
>> someone who knows the code to comment on that.

```