[rrd-users] Re: bandwidth used this month

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Mon Nov 8 20:47:45 MET 1999


> *> Unfortunately, this doesn't work if the data collection started half way through
> *> the relevant period.
> *> 
> *> For example, If I want to find out how much each of my routers has transferred
> *> since the beginning of the month I can quite easily figure out the number of
> *> seconds since the start of the month and a PRINT can give me an average.
> *> However, if the router is only enabled, say on the 10th, the average that PRINT
> *> gives me seems to be calculated from the 10th to the end of the period so multiplying
> *> that by the number of seconds would overestimate (in some cases quite badly) the
> *> total amount of bandwidth used.
> 
> how about using CDEF and IF to have a variable which is 1 if the data is
> known and 0 if the data is unknown ... this will give you the percentage of
> time you have data for ...
> 

If you'd change the unknown into zero, wouldn't the average be okay?
Indeed a CDEF, but working on the original variable?  This alters the data,
not the time.

DEF:InRate=some.rrd:in:AVERAGE
CDEF:correctedInRate=InRate,0,InRate,UN,IF

Now calculate the average for correctedInRate over the total time.
the cdef is:  if (inrate==unknown) return(0) else return(inrate)

I'm not saying this works (didn't try it!) but I think it will.

Regards
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+

--
* To unsubscribe from the rrd-users mailing list, send a message with the
  subject: unsubscribe to rrd-users-request at list.ee.ethz.ch



More information about the rrd-users mailing list