Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Net::SNMP Query Returns Error: No response from remote host

by Khen1950fx (Canon)
on Jul 30, 2010 at 21:58 UTC ( [id://852179]=note: print w/replies, xml ) Need Help??


in reply to Net::SNMP Query Returns Error: No response from remote host

Try adding debugging. For example:
#!/usr/bin/perl use strict; use warnings; use Data::Dump::Streamer; use Net::SNMP qw(DEBUG_ALL SNMP_TRAP_PORT); my $OID = '1.3.6.1.4.1.9.9.513.1.1.1.1.2.0.23.223.167.189.192'; my ( $session, $error ) = Net::SNMP->session( -hostname => shift || 'localhost', -community => shift || 'private', -version => 'snmpv2c', -port => SNMP_TRAP_PORT, -nonblocking => 1, -debug => DEBUG_ALL, ); if ( !defined $session ) { printf "ERROR: %s.\n", $error; exit 1; } my $result = $session->get_request( -varbindlist => [$OID], ); if ( !defined $result ) { printf "ERROR: %s.\n", $session->error(); $session->close(); exit 1; } $session->close(); exit 0;

Replies are listed 'Best First'.
Re^2: Net::SNMP Query Returns Error: No response from remote host
by spickles (Scribe) on Jul 31, 2010 at 00:58 UTC
    Khen -
    Thanks! I'll give that a try.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://852179]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (1)
As of 2024-05-27 10:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found