[mrtg] Re: FW: Re: mrtg log -1 error

Sjaak Nabuurs sjaak at vsm-hosting.nl
Fri Mar 8 11:35:32 MET 2002



> What is in your target parameter?

mrtg.cfg
#------------------------------------------------------------eth0
WorkDir: /var/www/html/vsmhosting/htdocs
Options[_]: growright,bits
refresh:600
Language: Dutch
WithPeak[eth0]: ymwd
Target[eth0]: `/usr/local/mrtg-2/bin/eth0.dat`
MaxBytes[eth0]: 1250000
Title[eth0]: Traffic Analysis for Interface eth0 (IP Traffic only)
PageTop[eth0]: <H1>Traffic Analysis for eth0 (IP Traffic only)</H1>
 <TABLE>
   <TR><TD>System:</TD><TD>vsm-hosting.nl</TD></TR>
   <TR><TD>Maintainer:</TD><TD>VSM Automatisering BV</TD></TR>
   <TR><TD>Interface:</TD><TD>Ethernet 0</TD></TR>
   <TR><TD>Max Speed:</TD>
       <TD>10 Mbits/s (ethernet)</TD></TR>
  </TABLE>
Directory[eth0]: eth0
#XSize[eth0]:400
#YSize[eth0]:120
Options[eth0]: unknaszero
Suppress[eth0]: y

eth0.dat
#!/bin/bash
V1=`/sbin/ipchains -vnxL input |grep eth0-in |awk '{print $2}'`
V2=`/sbin/ipchains -vnxL output |grep eth0-out |awk '{print $2}'`
UP=`/usr/local/mrtg-2/bin/uptime.sh`
HOST=vsm-hosting.nl
echo -e $V1 $V2 $UP $HOST

uptime.sh

#!/bin/bash
cat /proc/uptime | gawk '{
  d=($1/86400);
  u=(($1%86400)/3600);
  m=(($1%3600)/60);
  s=($1%60);
  printf ("%2d days, %2d:%d:%d\n",d,u,m,s)
}'

perl mrtg mrtg.cfg
Reatup WARNING :/var.......... found eth0's log file was corrupt or not in
sorted order

time 1015586511.


--
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