Velocity Reviews - Computer Hardware Reviews

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

Thread Tools

set Bad variable type - SNMP::Util set

Posts: n/a
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.
HASH(0x9aadf0) : write access to the MIB not implemented

snmpset index 5 . 6

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

Here's a very short version of the script:

use SNMP::Util;

$h = "";
$c = "private";
$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 .
(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.


Reply With Quote

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) Java 0 04-16-2005 10:05 PM
24 Season 3 Bad Bad Bad (Spoiler) DVD Video 12 02-23-2005 03:28 AM
24 Season 3 Bad Bad Bad (Spoiler) DVD Video 0 02-19-2005 01:10 AM