Re: minor note on APC devices with SNMP
"Dave Shield" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On 08/12/06, Dan Mahoney, System Admin <[email protected]> wrote: > > You could look at the exit code from snmpset. > > If the remote agent indicates failure, it returns 2. > > > > But this wouldn't distinguish between different reasons > > *why* the request failed. For that, you'd need to catch > > the textual error message, and match against that. > > Which I didn't get much of here, the error is very "general", But that's potentially informative in itself. This isn't the sort of error that would tend to result from "normal" failures. So you could reasonably assume that a 'genError' implies someone is logged in. Check for that particular text in the error message, and use that to trigger your delay-and-retry approach. > Sadly, since the box disables snmp when you log in, I can't even pre-check > via SNMP to tell if someone IS logged in. What happens if you try to query the box with someone logged in? You you get an error back, or simply a timeout? In either case, you could use that as a pre-check. Try a trivial SNMP get request, and wait until that succeeds before sending the SET request. Dave ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ 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