[mrtg] Files with extension .old
Holger van Koll
Holger-ml at vanKoll.de
Mon Aug 2 15:45:54 MEST 1999
I am using mrtg to monitor (among other things) a dialup-link with a
dynamically assigned ip-address.
This is a bit tricky, as mrtg creates its gif-files and logfiles depending
on the ip-address of the device. Can I change that to have a fix name?
As I think this is not possible, I done the following:
The shellscript that is called via cron checks if I am online. If not, only
eth0 is monitored. Fine so far.
If I am online, it does the following:
if test -f /usr/local/apache/htdocs/images/$OLDIP-day.gif
mv $OLDIP-day.gif $IP-day.gif
mv $OLDIP-month.gif $IP-month.gif
mv $OLDIP-week.gif $IP-week.gif
mv $OLDIP-year.gif $IP-year.gif
mv $OLDIP.html $IP.html
mv $OLDIP.log $IP.log
mv $OLDIP.old $IP.old
cp -f mrtg-o1.cfg mrtg-on.cfg #mrtg-o1.cfg is the first part of the
config-file containing workdir etc.
echo "Target[$IP]: 3:public at kserver" >>mrtg-on.cfg
echo "MaxBytes[$IP]: 8000" >>mrtg-on.cfg
echo "Title[$IP]: kserver.localdomain ($IP): ippp0" >>mrtg-on.cfg
echo "PageTop[$IP]: <H1>Traffic Analysis for ippp0" >>mrtg-on.cfg
That seems to work. However, sometimes I get the following message from
Rateup WARNING: .//rateup could not read the primary log file for
Rateup WARNING: .//rateup The backup log file for 184.108.40.206 was invalid
Rateup WARNING: .//rateup Can't remove 220.127.116.11.old updating log file
Rateup WARNING: .//rateup Can't rename 18.104.22.168.log to
22.214.171.124.old updating log file
and 15 min later:
mv: 126.96.36.199.old: No such file or directory
Rateup WARNING: .//rateup Can't remove 188.8.131.52.old updating log file
Whats so special about that .old-file? Is it created everytime mrtg runs?
* To unsubscribe from the mrtg mailing list, send a message with the
subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
More information about the mrtg