[rrd-users] Monitor Xen VPS network usage using rrdtool

Nuno Pereira nunopereira at interacesso.pt
Thu Oct 30 16:09:07 CET 2008

> -----Mensagem original-----
> De: rrd-users-bounces at lists.oetiker.ch [mailto:rrd-users-
> bounces at lists.oetiker.ch] Em nome de David Nolan
> Enviada: quinta-feira, 30 de Outubro de 2008 13:42
> Para: rrd-users at lists.oetiker.ch
> Assunto: Re: [rrd-users] Monitor Xen VPS network usage using rrdtool
> On Thu, Oct 30, 2008 at 9:28 AM, Nuno Pereira
> <nunopereira at interacesso.pt> wrote:
> > I supose that you are using counters for storing bandwidth, reading
> the
> > current values.
> > In that case, when the counter goes 0, after rebooting or resetting
> the
> > values, the RRD thinks that the counter wrapped (passed the estimated
> > (2^32)-1  value of maximum for the counter) and uses the value 2^32 -
> 1 +
> > new_value - old_value for estimating the counter difference (instead
> of the
> > real difference), dividing it by the time between retrievals.
> >
> > The best thing to do is to set a maximum value for the bandwidth.
> > In that case, when the system reboots the value doesn't go that high.
> >
> My preferred solution to this is to use DERIVE instead of COUNTER,
> with a minimum value of zero.  For counters that never go backward
> this results in a single datapoint being thrown away anytime the
> counter is reset.   (Due to wrapping, power cycling, process restart,
> "clear counters" on a router, etc...)
> Functionally this is basically equivalent to setting a max and
> throwing away the data point when the value is too high.  But you
> don't have to calculate what max value you should use, and there are
> no edge cases where the last value was less then the max from the
> rollover value and a reset generates a counter difference of less then
> the max but still horribly inaccurate.
> -David

Well, it may dependo on the type of thing that you are monitoring.
That is another aproach, in fact, but if you have a counter that wraps very
often (maybe a few times a day), then you will have lots of gaps in your
graph, but with the COUNTER with max-limit aproach, then you would have no
problems with that (only if you have resets).

In resume, there are 2 options, and in the past this has been discussed a
few times.

Nuno Pereira

More information about the rrd-users mailing list