|
I have been trying to get the gettable method working with
no success (sort of). I am trying to get at a table in the Cisco class based qos
mib using gettable with no success. All I get is the following error… C:\Perl>perl testthis.pl Cannot find module: At line 1 in (none) STORE(SNMP::MIB=HASH(0x19fb740) enterprises.9.9.166.1.1.1
HASH(0x1a4c44c)) : write access to the MIB not implemented Modification of non-creatable array value attempted,
subscript -1 at C:/Perl/site/lib/SNMP.pm line 694. The code is simple and basically straight from the man page #!/usr/bin/perl use SNMP; use Data::Dumper; use strict; #my $mib='CISCO-CLASS-BASED-QOS-MIB'; my $mibs='ALL'; &SNMP::loadModules(my $mibs); my $hostname="xxx.xxx.xxx.xxx"; my $comm="somename"; my $port="161"; my $sess = new SNMP::Session( 'DestHost' =>
$hostname,
'Community' =>
$comm, 'RemotePort' =>
$port,
'Timeout'
=> 5000000,
'Version' =>
'2',); die "Cannot create session:
${SNMP::ErrorStr}\n" unless defined $sess; print
Dumper($sess->gettable('1.3.6.1.4.1.9.9.166.1.1.1')); If I substitute the above oid for “ifTable” or its
oid, the results are as expected. If I use the command line “SNMPTABLE” on the
same device and oid, the results are as I would expect. Is it my poor code or gettable/SNMP.PM ? Thanks in advance Peter Fitz |
- gettable method broken or limited ? Fitzgerald, Peter N
- gettable method broken or limited ? Peter Fitzgerald
