[mrtg] Re: Merging Log Files

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Tue May 15 01:26:25 MEST 2001


Brent McCrackin wrote:

> So I have two logfiles, one that is current, and one that stopped being
> updated several months ago.  How do I merge these logfiles together without
> MRTG rejecting them with invalid data?  I found a merge script on the MRTG
> contributions page, but it seems to assume that both logfiles are updated at
> the same timestamps.

If you try to combine two logfiles that are not updated recently,
you will have to do several calculations on the data.  This process
is something you don't want to do.  However, rateup is specialized
in doing just that.  Rateup is the program that is called from MRTG
to do the calculations.

So, to make your life more easy, you just update the old file one
more time.  The current data in that old file will make no sense.
This doesn't hurt as you don't want that part anyway.  It is the
older data that you want to copy.  This needs to be in the correct
part of the log file so you can replace the values in the new logfile
with those from the old logfile. Again, rateup will do so for you.

I don't know the script however it shouldn't do much more than just
take the first few lines of one log file, skip the same amount of
lines from the second logfile and append those lines to form the new
logfile.  Mix together with some sanity checking et al.

Is there any reason why you don't want to update the old logfile?

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