[mrtg] MRTG running on two different hosts with different html output
Lars Braeuer
lbraeuer at mpex.net
Wed Mar 24 17:05:54 MET 2004
hi everyone!
I'm running mrtg 2.10.13 (rateup) on two different hosts. the mrtg on the first host is run every 5
miuntes via crontab (i.e. 09:05). the second mrtg on the other host is also executed every 5
minutes, but one minute after the first mrtg (i.e. 09:06).
both mrtg's are supplied with *exactly* the same incoming/outgoing byte values by a script.
so effectively both are run at exactly the same intervals (300 seconds = 5 minutes) with exactly the
same values.
now my problem: the final html pages display slightly different values for the max/average/latest
counters. this is even happening when I start both mrtg's cleanly without any old logfiles present.
shouldn't the values produced by rateup be exactly the same on both machines, because the interval
is the same on both machines? or will there always be a difference since the second one is called a
minute after the first mrtg, although *all* other values are identically?
I tried to debug rateup.c by outputting some values on stderr, but I can't find a clue why this is
happening.
here's some rateup output of the second run after removing all logfiles:
FIRST MACHINE----------------------------
IN update() LINE 1041
INTERVAL 0
PERIOD 300
NOW 1080143706
LAST.TIME 1080143406
IN image() line 364
ROUTER xxx.xxx.xxx.xxx
INR 0
OUTR 0
AVIN 516452
AVOUT 107259
LATESTIN 516452
LATESTOUT 107259
INTERVAL 6
----------------------
SECOND MACHINE----------------------------
IN update() LINE 1041
INTERVAL 0
PERIOD 300
NOW 1080143760
LAST.TIME 1080143460
IN image() line 364
ROUTER xxx.xxx.xxx.xxx
INR 0
OUTR 0
AVIN 421593
AVOUT 87558
LATESTIN 421593
LATESTOUT 87558
INTERVAL 60
----------------------
the first line (values after last run) of the logfile for this router is on *both* hosts identical:
1080143760 19762163 4104178
shouldn't this lead to exactly the same html/image output on both machines???
----
a short explanation why I'm running the second mrtg 1 minute after the first one:
the first one is invoked by a script that also reads the iptables counters. so these values are then
feed to a mysql database. so the second mrtg has to run a minute later, since the traffic values are
not present, when the first one is run.
finally I want to move all mrtg stats from the first host (which is our firewall) to the second one.
but I only want to do that if I get exactly the same values as on the first one.
thanks for your help. if you need some more output, let me know.
regards,
lars
--
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