[rrd-users] Re: Using RRDTool & SNMP to graph CPU usage

Alex van den Bogaerdt alex at ergens.op.het.net
Tue Nov 18 09:15:41 MET 2003

On Tue, Nov 18, 2003 at 09:24:23AM +0200, Graeme Donaldson wrote:

> Hi again
> I've managed to get it working quite nicely.  The only thing that concerns
> me is that CPU usage sometimes jumps over 100%.  Surely that can't happen?

This may have to do with timing problems.

Consider the following situation:

The script collects the current statistics (time T1) ...
... and generates a timestamp (time T1 + n1) ...
... then updates the database (time T1 + n2)

5 minutes later:

The script collects the current statistics (time T2) ...
... and generates a timestamp (time T2 + n3) ...
... then updates the database (time T2 + n4)

Suppose that "n1" is rather large and "n3" is relatively small.
You have measured the interval between "T1" and "T2" yet the
script will enter this into the database as an interval between
"T1+n1" to "T2+n3".  T2-T1 is 300 seconds, (T2+n3)-(T1+n1) is
290 seconds.  If "user" increments by 300, the rate should have
been "300/300=1.0000" but is measured as "300/290=1.0345"

Similar problems but even worse occur if no timestamp is generated
and "N" is used in stead.  In that case the interval is "T1+n2"
to "T2+n4" with even larger opportunity for errors.


Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the rrd-users mailing list