[mrtg] Ifinoctet problem

Schahzad Z. Choudhry ahmiq at brain.net.pk
Wed Jul 9 06:03:37 MEST 2003


Hi folks
I have a situation here ,where i need to query the ifinoctet through perl snmp-> get of three diffrent devices and then add the total and draw the graph.which ll let me know how much of total bandwidth our three diffrent nodes are using.
$IP = "192.168.0.1";
$community =  "Public";
 $snmp = new SNMP::Util(-device => $IP,
                       -community => $community,
                       -timeout => 5,
                       -retry => 0,
                       -poll => 'on',
                       -poll_timeout => 5,
                       -verbose => 'off',
                       -errmode => 'return',
                       -delimiter => ' ',
                      );

     $uptime = $snmp->get('v','.1.3.6.1.2.1.2.2.1.10.4');

my $tot =$uptime ;
print $tot,"\n",$tot,"\n\n";

THis is perl script i am using , it output what it supposed to do .Next is mrtg.cfg which run this script and draw the graph.

Target[sms1]: `perl  /soft/mon/perlsoft/abc.pl`
MaxBytes[sms1]: 200000
Options[sms1]:bits
Title[sms1]: System load
PageTop[sms1]: <h1> Total Bandwidth </h1>


but this thing is not working. the default mrtg graph shows tha exact bandwidth of single node.while in above method , perl script give the exact value but when mrtg calculate it do something wrong.Can some one plz tell what i am doing wrong or how mrtg calculate ethernet interface utilization through OID 1.3.6.1.2.1.2.2.1.10

Regards.

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