in reply to snmpwalk problem
my $baseoid = ".1.3.6.1.2.1.2.2"; # ifTable my $thisoid = $baseoid; while ( 1 ) { $val = $sess->getnext($thisoid); last if ( $thisoid !~ m/^$baseoid\./ ); last if ( $sess->{ErrorNum} ); print( "@{$thisoid}\n" ); }
Update: I always use Net::SNMP, too. Why? Because it's pure Perl, unlike SNMP which relies on the UCD tools. The latest Net::SNMP, however, does some tricky SNMPv3 stuff that requires a recent version of Perl, making it not that useful for running on old installations of 5.005.. in which case getting an older copy of Net::SNMP isn't a bad idea.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: snmpwalk problem
by Anonymous Monk on Jun 20, 2005 at 14:20 UTC | |
|