[mrtg] Re: Total Utilization of Serial Lines

Ron Lyman ron at attglobal.net
Wed Mar 1 23:04:00 MET 2000

----- Original Message -----
From: "Strange, Wes" <WStrange at IKON.com>
To: "Mrtg Mailing List (E-mail)" <mrtg at list.ee.ethz.ch>
Sent: Wednesday, March 01, 2000 2:12 PM
Subject: [mrtg] Total Utilization of Serial Lines

> I must be missing something.  I've scanned the manuals and message board
> I'm still puzzled.  I've got a T-1 with multiple PVCs.  MRTG graphs them
> great, but I'm trying to figure out a total usage from the In/Out bytes.
> understanding is that the Max In/Max Out numbers are independent of each
> other for serial lines, in that you cannot just add the numbers up and
> that's the total.  Is there another way?


Maybe this will work for you.  I use this as a target perl script to
generate an In + Out graph on our ISDN WAN link.  I looks to me like this
should work fine on any independant interfaces, providing they have the same
type of data (i.e. both are expressing number of octets) and are related
enough to provide relevant data.

Names have been changes to protect the innocent.

Ron Lyman


$in_str = `/usr/bin/snmpget router.mydomain.ca public
$out_str = `/usr/bin/snmpget router.mydomain.ca public
# now $in_str looks like:
# interfaces.ifTable.ifEntry.ifInOctets.4 = 2168355677

# let's keep only the value of the query
$in_bytes = (split(/\=/,$in_str))[1];
$out_bytes = (split(/\=/,$out_str))[1];
# now $val looks like " 2168355677";

$val = $in_bytes + $out_bytes;

# now return $val along with 3 other zero lines so MRTG is happy.
print "$val\n";
print "0\n";
print "0\n";
print "0\n";

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