Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Perl Net::SNMP returns 1 instead of the desired outcome

by VinsWorldcom (Prior)
on Oct 25, 2013 at 13:05 UTC ( [id://1059653]=note: print w/replies, xml ) Need Help??


in reply to Perl Net::SNMP returns 1 instead of the desired outcome

From the perldoc of Net::SNMP:

get_request() - send a SNMP get-request to the remote agent $result = $session->get_request( [-callback => sub {},] # non-blocking [-delay => $seconds,] # non-blocking [-contextengineid => $engine_id,] # v3 [-contextname => $name,] # v3 -varbindlist => \@oids, ); [...] A reference to a hash is returned in blocking mode which contains the contents of the VarBindList. In non-blocking mode, a true value is returned when no error has occurred. In either mode, the undefined value is returned when an error has occurred. The "error()" method may be used to determine the cause of the failure.

I see you're using 'nonblocking' mode in your call to session() so you're getting a "TRUE" value returned as per the documented operation. Try removing the '-nonblocking => 1' line from the call to session() and see what happens.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-23 11:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found