[mrtg] still problems with log -1

sjaak nabuurs sjaaknabuurs at citytower.com
Sat Mar 9 15:59:40 MET 2002


After one day searching if have still the same problem

Why mrtg produce a -1 in my eth0.log

like this

1015520046 1484772 8259280 -1
1015520046 2059 0 2059 0
1015519325 19947 0 31091 0
1015519200 1350 0 1350 0
1015518900 1350 0 1350 0
1015518600 1350 0 1350 0
1015518300 1350 0 1350 0
1015518000 1350 0 1350 0
1015517700 1350 0 1350 0
1015517400 1350 0 1350 0
1015517100 1350 0 1350 0
[cut]


 
> 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



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