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
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users