[mrtg] Comparing *.cfg files
fluhmann at vvm.com
fluhmann at vvm.com
Mon Mar 17 22:33:38 MET 2003
I'm trying to compare two config files: mrtg.cfg mrtg.old.
I want to:
1) Compare to see if any interfaces have been added or moved.
2) If any have been added, create a new *.rrd for them.
3) If any have been moved, try to find out what interface they are now.
(ex. xxx.xxx_12 changed to xxx.xxx_14)
4) Rename the old *.rrd to the new interface name.
(ex. xxx.xxx_12.rrd renamed to xxx.xxx_14.rrd)
5) If an *.rrd with the same name as the new one exists, add the
extension .tmp
(ex. xxx.xxx_14 already existed, then rename it to xxx.xxx_14.rrd.tmp)
I've tried using a perl script for this, but when I ran it, some things
went wrong.
You can look at my code here: http://www.vvm.com/~fluhmann/mrtg.txt
If anyone has any ideas of ways of doing this, please let me know.
Thank you so much.
Jeremy Fluhmann
McLane Information Systems Division
--
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