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

Nuno Pereira nunopereira at interacesso.pt
Thu Oct 30 14:28:59 CET 2008

> -----Mensagem original-----
> De: rrd-users-bounces at lists.oetiker.ch [mailto:rrd-users-
> bounces at lists.oetiker.ch] Em nome de Zu
> Enviada: quinta-feira, 30 de Outubro de 2008 09:32
> Para: rrd-users at lists.oetiker.ch
> Assunto: [rrd-users] Monitor Xen VPS network usage using rrdtool
> Hi,
Hello too,

> I wrote a program to monitor the bandwidth usage. This program runs on
> the Xen host, monitors the network interfaces of Xen VPS. The program
> read rx/tx data from /proc/net/dev and store the data into rrd files.
> rrdtool is used to generate the PNG file. Normally the program works
> fine.
> But if VPS reboots, the result in the PNG file is not correct. At the
> time of rebooting, the rate in the PNG file is very high( 20M/s ).
> Other time the rate is about 20k/s I guess. Because 20M is too high,
> in the PNG file, I can not find other rates.
> Do you have any solutions?

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.

> Regards,
> Zu
Nuno Pereira

More information about the rrd-users mailing list