[mrtg] Re: help with "counter" mode running for External scripts

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Tue Mar 27 00:34:59 MEST 2001


Robert Schwartz wrote:

> Target[auths]: `perl -e 'print time . "\n" . (time + 10) .
> "\nsometime\ndev1.com\n";'`

This prints:

    <current time>
    <current time>+10
    sometime
    dev1.com

> Here is the top few lines in the auth.log:
>  
> [~/fpgraph]more html/auths.log 
> 985636719 985636719 985636729

   ^^^         ^^^        ^^^   correct.

So, the script is working, MRTG is working and the numbers
get inserted in the log file.  Nothing wrong.

Now, run this 300 seconds apart.

First time:  985636719 985636719 985636729
Second time: 985637019 985637019 985637029

The rate is: ( <value2>-<value1> ) / ( <time2>-<time1> )
which is   (985637019-985636719) / (985637019-985636719)
which is   300 / 300
which is   1

> 985636719 1 1 1 1

Check.

[...]
> 985635600 0 0 1 1

Rounding occured.  This is normal for MRTG, 0.999999999 is
rounded down to 0.  1.00000001 (the next run) is rounded down
to 1.

> Can anyone help???

I hope this makes it clear.

cheers,
-- 
   __________________________________________________________________
 / 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