in reply to Net::SNMP vs SNMP, and MIBs
Later I'm using the following methods from each package:use SNMP; #pretty much only used for Mib translations use Net::SNMP qw(snmp_dispatcher ticks_to_time);
So, from that, either I got what I wanted from each package and was to stuborn to try to learn if one or the other was enough, or they were complementary, and I couldn't do what I wanted from only one. My tuits are missing today or I'd have looked it up by now...$sysUpTime = SNMP::translateObj('sysUpTime.0'); # Create a session for this host my ($session, $error) = Net::SNMP->session( -hostname => $box{ipadd}, -community => $community_string, -port => 161, -nonblocking => 0x1, # Create non-blocking object +s -translate => [ -timeticks => 0x0 # Turn off so sysUpTi +me is numeric ] ); if (!defined($session)) { $err++; logit $DBG, sprintf("ERROR: %s.\n", $error); return 0; }
-Scott
|
|---|