Re: minor note on APC devices with SNMP

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
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.

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.