Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > set Bad variable type - SNMP::Util set

Reply
Thread Tools

set Bad variable type - SNMP::Util set

 
 
J.Cottingim
Guest
Posts: n/a
 
      07-03-2007
I'm writing a Perl script that will set several MIB variables.
When I run the script I get the following error messages:

STORE(SNMP::MIB=HASH(0x996ce74) enterprises.9.9.96.1.1.1.1.14
HASH(0x9aadf0) : write access to the MIB not implemented

snmpset 10.10.1.1 index 5 .1.3.6.1.4.1.9.9.96.1.1.1.1.14 6

set Bad variable type (Sub-id not found: (top) -> enterprises)


Here's a very short version of the script:
---------------------------
#!/usr/bin/perl

use SNMP::Util;

$h = "10.10.1.1";
$c = "private";
$oid=".1.3.6.1.4.1.9.9.96.1.1.1.1.14";
$ix = "5";
$value="6"; #destroy

$session = new SNMP::Util(-device => $h,
-community => $c,
-timeout => 2);
$session->set(index => $ix,$oid => $value)
---------------------------

If I change the OID to something like .1.3.6.1.2.1.2.2.7
(ifAdminStatus) along with an appropriate index, the script runs fine.
The problem I think might have something do to with the fact that the
OID's index does not exist until the set operation is performed.
However, there are no snmp packets (of any sort) sent when the script
fails - so I know it's not doing a get operation prior to the set.
(verified with Wireshark)

Any thoughts/ideas would be greatly appreciated.

Thanks
JC

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
integer >= 1 == True and integer.0 == False is bad, bad, bad!!! rantingrick Python 44 07-13-2010 06:33 PM
Bad media, bad files or bad Nero? John Computer Information 23 01-08-2008 09:17 PM
ActiveX apologetic Larry Seltzer... "Sun paid for malicious ActiveX code, and Firefox is bad, bad bad baad. please use ActiveX, it's secure and nice!" (ok, the last part is irony on my part) fernando.cassia@gmail.com Java 0 04-16-2005 10:05 PM
24 Season 3 Bad Bad Bad (Spoiler) nospam@nospam.com DVD Video 12 02-23-2005 03:28 AM
24 Season 3 Bad Bad Bad (Spoiler) nospam@nospam.com DVD Video 0 02-19-2005 01:10 AM



Advertisments