[rrd-users] Re: Stop it creating averages of the values...

Alex van den Bogaerdt alex at ergens.op.het.net
Wed Oct 26 13:56:23 MEST 2005


On Wed, Oct 26, 2005 at 11:19:59AM +0100, Michael Ditum wrote:

> I've created a script where every 2 minutes it increases the number of
> errors by 4 and I'm using rrdtool dump to view the data.

You are inputting your error counter like this:
  timestamp+0min   0
  timestamp+1min   0
  timestamp+2min   0
  timestamp+3min   4
  timestamp+4min   4
  timestamp+5min   8

not like this:
  timestamp+0min   0
  timestamp+1min   0
  timestamp+2min   0
  timestamp+3min   4
  timestamp+4min   0
  timestamp+5min   4

Correct?  I think that is just fine.

In the first case, COUNTER is the right type to use. In the second case,
you need to use GAUGE.  In the second case, you would be storing wrong
values in RRDtool by the way, you should store (4/60) in that case.  So,
you still would end up with 6.67e-2 should you do it right.

> Now 6.6666666667e-02 is 4 / 60 so it seems to be taking an average of
> the value passed in... I assume its due to the AVERAGE in the
> following line... "RRA:AVERAGE:0.5:1:3000" but I can't work out what I
> should change it to.

It is not an average that is in your way. It is "per second" vs. "per minute"
that you confuse.  You have "per second" and want "per minute".

RRDtool processes everything as <something> per second.  You could multiply
your input by 60, but a better approach IMHO is to do this at graph time,
by multiplying the rates by 60.  That's what CDEF can do for you:
CDEF:errorsperminute=errorspersecond,60,*

-- 
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/

--
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://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list