Re: minor note on APC devices with SNMP
"Dan Mahoney, System Admin" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 7 Dec 2006, Dave Shield wrote: > On 07/12/06, Dan Mahoney, System Admin <[email protected]> wrote: >> However, is there any way to set a delay and retry that will allow this >> command to be attempted every so many seconds in the event that this error >> IS returned? > > No. > The information retrieval commands will attempt to retry in the case > of failures (having removed the offending varbind from the list), but > not "snmpset". Automatic 'correction' of SET requests feels like > Trying To Be Too Helpful, and Probably a Bad Idea. > >> Or would I have to do that from the calling code? > > Yes > >> In that >> case, how do I evaluate the success or failure of the snmpset command >> (assume I'll be using a shell script). > > You could look at the exit code from snmpset. > If the assignment succeeds, this will return 0. > If there's a problem processing or sending the request, it returns 1. > 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", is there something more I could check for? 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. Grr. -D -- "That just erased my whole stereotype that british men are smart..." -SK, April 6, 2K, about 3PM --------Dan Mahoney-------- Techie, Sysadmin, WebGeek Gushi on efnet/undernet IRC ICQ: 13735144 AIM: LarpGM Site: http://www.gushi.org --------------------------- ------------------------------------------------------------------------- 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