[rrd-users] Using rrd for traffic counting.
don.baarda at baesystems.com
Thu Jul 20 02:22:42 MEST 2000
I'm thinking of using rrd for recording traffic for billing purposes. For
this we ultimately want total bytes received each month, not average
bytes/sec. I know that this can be calculated by multiplying the average
bytes/sec by the seconds in the time period, but I'm worried about loss of
accuracy, and wondering about the best way to get this info out of rrd.
In particular, I'm worried about the affects of data re-sampling and
Unknowns. In our case, I'd want unknowns to be treated as zero when
consolidating data (we don't want to over-bill). We also don't want to miss
any traffic we know was there just because we couldn't get one sample.
Because byte counters just count bytes, it should be possible to interpolate
the missing sample from the samples before and after. Does rrd do this?
We want to get total bytes transferred, not the average byte rate. The man
page tauntingly hints at a 'total' CF, but the rest of the documentation and
a brief glance at the code suggests it doesn't exist. I'm concerned that the
'average' CF will introduce inaccuracies because of the way it accumulates
rates that have been re-sampled and handles Unknowns. I know that you can
tune the 'xff' setting for Unknowns, but it only allows you mark the whole
accumulated value as unknown (set xff=0.0, or calculates an average
excluding the unknown samples. This means I'd either exclude the known
traffic when consolidating with an unknown (under account), or assume that
the unknown was at the average rate of the other known samples for that
consolidation period (possibly over account).
I'm thinking that I might need to use 'average' as my CF, and then use a
fancy front end that massages the SNMP to account for unknowns and
re-sampling to ensure I get what I want. I'd rather not implement something
like this if rrd's existing re-sampling and unknown handling can be
convinced to do what I want.
Now, assuming I can get the data in and accumulating in a way that works,
what is the best way to get out the monthly total bytes transferred? It
looks like using 'graph' with 'print' and some fancy CDEF would be the best
way, but I'm interested in hints as to the best method.
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
More information about the rrd-users