in reply to Help with SIGINT
the above will try only once and wait only one second for the reply. there are equvalent settings for the Perl SNMP modules. i've only seen this in commands that tweak the interface config like 10/100/full/half/auto settings (reply lost during negotiation), change of IP address, and when sending a 'reboot' command.$ snmpset -r 1 -t 1 -c $COMM $host $oid $type $val
# something like this $rc = $sess->set( [ $oid, $type, $val ], { retries => 1, timeout => 1 +} ); if ( $rc != OK ) { if ( $rc != TIMEOUT ) { # some real error happened, do something } else { # probably worked but we got no response like we expected } } else { # wow, it worked and we got a response... }
|
|---|