[mrtg] Solaris interface monitoring problems

Brett Dikeman brett at artelsoft.com
Wed Jan 12 18:19:29 MET 2000


We're trying to use the following script on a Solaris machine:

#!/usr/local/bin/perl

$output = `/usr/ucb/netstat -k le0`;

$output =~ /rbytes (\d*) obytes (\d*)/;
$rbytes = $1;
$obytes = $2;

open(LOAD, "/usr/bin/w -u|");

$load = <LOAD>;
chop $load;

$uptime = $load;
$uptime =~ s/^.*up ([^,]*, [^,]*),.*$/\1/;


print $rbytes, "\n";
print $obytes, "\n";
print "$uptime\n";
print "xxx\n";

(the uptime code should look very familiar, it's stolen from gl.)

Which spits out:

2089612758
1974719783
18 day(s),  3:48
network load

and on a second run:

2089652223
1974902247
18 day(s),  3:49
network load



Now, MRTG gets ahold of this via a config file that looks like this:

WorkDir: /home/xxx/public_html/
Refresh: 300
Interval: 5
WithPeak[traffic]: ymwd
XSize[traffic]: 500
YSize[traffic]: 235
Target[traffic]: `xxx/scripts/traffic`
Options[traffic]: growright, absolute
MaxBytes[traffic]: 14000
Title[traffic]: Traffic on xxx connection
PageTop[traffic]: <H1>Traffic on xxx's connection
  </H1>
  <TABLE>
    <TR><TD>System:</TD><TD>www.xxx.com</TD></TR>
    <TR><TD>Maintainer:</TD><TD>xxx at xxx.com</TD></TR>
   </TABLE>
YLegend[traffic]: Traffic
ShortLegend[traffic]: Bytes


(hostnames+paths are xxx'd out)

Now here's the problem: the graph is a flatliner.  What am I missing? 
We're monitoring a 112k ISDN line(which, if I calculated right, 
equals the above 14000 bytes), or, more specifically, we're 
monitoring the ethernet interface which it is attached to.

Brett
----
Brett Dikeman				Network/System Admin
Artel Software				617-451-9900
381 Congress Street				617-451-9916(fax)
Boston, MA 02210				http://www.borisfx.com

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg



More information about the mrtg mailing list