|
Posted by SP on April 21, 2006, 3:49 pm
Please log in for more thread options
When I run the perl code I get the following:
<<<< OUTPUT >>>>
Session: Net::SNMP=HASH(0x85123b4)
Error:
OID: 1.3.6.1.4.1.232.3.2.5.1.1.3.1.132
Disk Info: HASH(0x8143750)
I'm just starting to use the NET::SNMP module and i'm not sure what I'm
doing wrong.
Thanks for the help
Sal
#---------------------------------------------------
my ($session, $error);
if ($o_snmp_ver eq "2c")
{
# SNMPv2 Login
($session, $error) = Net::SNMP->session
(
-hostname => $o_host,
-version => 2,
-community => $o_community,
);
}
print "Session: ",$session,"\n","Error: ",$error,"\n";
#Build the OID string
$oid_to_get = $drive_model_trgt . "." . $o_ctrl_num . "." .
$o_disk_num;
#Get disk status
if (!defined($disk_info[1] = $session->get_request($oid_to_get)))
{
$error_msg=$session->error;
print "ERROR - Target: ",$o_host,"\n";
print "Community: ",$o_community,"\n";
print "OID: ",$oid_to_get,"\n";
print "Error: ",$error_msg,"\n";
$session->close;
}
$session->close;
print "OID: ", $oid_to_get, "\n";
print "Disk Info: ",$disk_info[1], "\n";
---------------------------------------------------------------------
|
| Similar Threads | Posted | | NET::SNMP | December 14, 2004, 12:32 am |
| NET::SNMP | December 14, 2004, 12:36 am |
| NET::SNMP | December 14, 2004, 12:39 am |
| net::snmp | November 5, 2006, 6:30 am |
| SNMP Set Request | July 26, 2004, 8:42 pm |
| Looking for SNMP-5.1.1/NetSNMP-5.1.1 | April 29, 2005, 3:48 pm |
| SNMP::Util | April 6, 2006, 10:32 am |
| Net::SNMP module | June 2, 2006, 10:29 am |
| please helpme: Net-SNMP-5.2.0 module | August 29, 2006, 11:47 am |
| Net::SNMP snmpv3 inform issues | May 17, 2005, 10:18 am |
|