[mrtg] Re: Slowly incrementing Value

Alex van den Bogaerdt alex at ergens.op.HET.NET
Tue Jan 29 21:16:53 MET 2002


JACOB STEENHAGEN wrote:
>  
> (current_value - last_value) / time_elapsed
>  
> But my problem is that my counter increments quite slowly.  In the 5 minutes
> in-between readings, it may only increment by 1, which causes MRTG to read
> it as 1/5.  It appears that when MRTG reads a value this small, it doesn't
> record it.  I really want this to be recorded as 1, however.

The closest you can get without hacking the source is, AFAIK, to
get rid of "/time_elapsed".  Therefore you need to multiply by that
same "time_elapsed" and you'll end up with (curval - lstval).

Unfortunately this isn't possible.  You can however *guess* that
the time lapsed is 300.  This is close, hopefully close enough.

So:   ((current_value - last_value) / time_elapsed)*time_elapsed
where "(current_value - last_value) / time_elapsed" is done by
the mrtg counter type of target and the other time_elapsed is
estimated to be 300.

The target should thus be:   Target[xyz]: 1:public at host * 300


Another path to follow while trying to take this hurdle:
Try multiplying the target by a thousand, followed by some
magic involving kMG and/or Factor et cetera.

Last but not least: consider using rrdtool as the back end for
mrtg.  It should just work fine with numbers like 0.0333


Be aware whatever solution you choose to try/use, you *will*
eventually "suffer" from consolidation so you will have fractions.

HTH
-- 
   __________________________________________________________________
 / 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 |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list