[mrtg] snmp/perl problem
Michael J. Freeman
mfreeman at harvard.net
Tue Apr 18 20:18:28 MEST 2000
Hello,
I realize this might not be the best place to ask this question, but I
really don't know where else to ask it. I am trying to use the
SNMP_Session perl module, and do a simple snmpget like this:
my $oid = "interfaces.ifNumber.0";
my @response = &snmpget("$rcommunity\@$switch", $oid);
foreach my $i (@response) {
print "Response: $response[$i]\n";
}
When I run this script, I get lots of errors saying :
SNMPGET Problem for interfaces.ifNumber.0 on heehaw at 198.137.240.92
Response:
SNMP Error:
Received SNMP response with error code
error status: noSuchName
index 1 (OID: 1.3.6.1.2.1.2.1.0.0)
SNMPv1_Session (remote host: "198.137.240.91" [198.137.240.91].161
community: "heehaw"
request ID: 2041879422
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
If I do this with the snmpget utility on the command line, everything
works fine:
[rabbit][/]% snmpget 198.137.240.92 heehaw interfaces.ifNumber.0
interfaces.ifNumber.0 = 32
[rabbit][/]%
Any ideas?
Thanks,
MikeF
--
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
More information about the mrtg
mailing list