Pigoga has asked for the wisdom of the Perl Monks concerning the following question:
When I try to use it with one of my device, ADSL modem Connexant(other devices, like Cisco, unixbox works good) $session->get_table of this code make the following error : "OBJECT IDENTIFIER length equal to zero" After debuging of the Net::SNMP I have found out that error happens with OID .1.3.6.1.2.1.2.2.1.22.1(my $session, $error) = Net::SNMP->session( -version => $snmp_version, -hostname => $host, -community => $community, -port => $port ); if (!defined($session)) { print "[" . &logger_time . "] ERROR: $error.\n"; $error=1; } my $result = $session->get_table( -baseoid => $OID_tree, ); if (!defined($result)) { print "[" . &logger_time . "] ERROR: $host $OID_tree " .$sessi +on->error. "\n"; $session->close; $error=1; }
How can I make my code, that use Net::SNMP, work with no errors, like snmpwalk?# snmpwalk -v2c -c public 82.179.195.37 .1.3.6.1.2.1.2.2.1.22.1 interfaces.ifTable.ifEntry.ifSpecific.1 = OID: .ccitt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::SNMP Empty OID problem
by spadacciniweb (Curate) on Nov 19, 2009 at 10:58 UTC |