Ask a Question related to PERL Modules, Design and Development.
-
SP #1
Help with SNMP get_request
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";
---------------------------------------------------------------------
SP Guest
-
php-snmp
The function snmp_getnext() not exist in php-snmp, and I need it ! Could you help me ? Thanks, Tuxette -
SNMP.pm
Hi all, I' trying to get the IfType from my router with a script that uses the SNMP.pm module. It works fine, but he refuse to translate the ATM... -
Help Net::SNMP get_bulk_request
Hi there, Im working on a script that reads in a hostname, snmp community and numerous dotted decimal OID's per host for data gathering purposes.... -
ucd-snmp-4.1.2
hi I too have got the same problem installing the perl module for ucd snmp 4.1.2. I have been breaking my head to find out the solution.... -
UCD-SNMP / NET-SNMP config for hostmib AIX 4.3.3
Has anyone ever configured/used hostmib variables for AIX v4.3.3? I want to get hostmib statistics (RFC-1514) like storage/cpu and so on from a...



Reply With Quote

