Re: get api perl and snmpget don't work ?
Thomas Anders <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote: > use SNMP > > $sess = new SNMP::Session(DestHost => "192.5.60.120",Community => "public"); > $val = $sess->get('.1.3.4.1.55.1.9'); > > print "result $val\n"; How about a little error handling? SNMP::Session() seems to fail for you and you don't handle this at all in your code. > In the subroutine get I try simple or double quote and begin OID with point or > not anywhere anywhere I have the same error with : > > snmpget -c public 192.5.60.120 .13.4.1.55.1.9 What exact error message do you get here? If it's "snmpget: Timeout" or somesuch, you may want to check the FAQ: http://www.net-snmp.org/docs/FAQ.html#Requests_always_seem_to_timeout__and_don_t_give_me_anything_back___Why_ +Thomas -- Thomas Anders (thomas.anders at blue-cable.de) ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users