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 Fri, 8 Dec 2006, Dave Shield wrote:

> 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.

Aah, I haven't been playing with SNMP much as of now, so I wasn't aware of 
other times that error will pop, but I'll take your word for it, which 
makes that seemingly very broad error a bit more useful.

> 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?

That exact error, on either a get or a set.

> 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.

The other thing, of course is that with moving most of our operations over 
to SNMP, there is an decreased likelihood that someone will in fact be 
logged in: the point of moving to snmp in this particular case is to allow 
us to remove access :)

-Dan

--

"What's with the server farm down in the basement?"

-Spider, Three Skulls Commons at Selden House, 4/15/00

--------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
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.