[mrtg] snmp/perl problem

Michael J. Freeman mfreeman at harvard.net
Tue Apr 18 20:18:28 MEST 2000


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
SNMP Error:
Received SNMP response with error code
  error status: noSuchName           
  index 1 (OID:
SNMPv1_Session (remote host: "" [].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 heehaw interfaces.ifNumber.0
interfaces.ifNumber.0 = 32

Any ideas?


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