CongoGrey has asked for the wisdom of the Perl Monks concerning the following question:
I do a SNMP walk on my router and I get the following:Net::SNMP=HASH(0x246bdc)
Here is the script so far:ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.1.1.1 : INTEGER: 1 ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.1.1.2 : INTEGER: 42 ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.1.1.3 : INTEGER: 0 ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.1.1.4 : INTEGER: 47
Any help would be great!!#!/usr/local/bin/perl -w use strict; use Net::SNMP; my @vars; my $snmp; $snmp = Net::SNMP->session( -hostname => '192.3.3.1' +, -community => 'public', -port => '16 +2', ); @vars = $snmp->get_next_request( -varbindlist => '.1.3.6.1.2.1.4.20.1.2 +', ); $snmp->close; print @vars;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Storing SNMP Next Request into a Hash or Array
by Mr. Muskrat (Canon) on May 13, 2003 at 13:46 UTC | |
by CongoGrey (Sexton) on May 13, 2003 at 16:30 UTC | |
by CongoGrey (Sexton) on May 13, 2003 at 18:13 UTC | |
by Mr. Muskrat (Canon) on May 13, 2003 at 18:28 UTC | |
|
Re: Storing SNMP Next Request into a Hash or Array
by zby (Vicar) on May 13, 2003 at 13:41 UTC |