I have a simple perl test script which does a snmpwalk of all the
objects in the mib and then uses those objects to create an snmpget
request starting with a single object and then increasing the number of
sub requests by one after every response. What I observed was when the
agent couldn't handle the request I would see:

Timeout: No Response from 10.10.10.10.

As I increased the sub request count, I would eventually get:

Error in packet
Reason: resourceUnavailable (This is likely a out-of-memory failure
within the agent)

As I have mentioned, we do have an embedded system with limited
resources and it would be interesting to know how unix-style agents cope
with the same sort of test.

> -----Original Message-----
> From: Robert Story [mailto:[email protected]]
> Sent: Wednesday, August 10, 2011 2:50 PM
> To: Lewis Adam-VNQM87
> Cc: [email protected]
> Subject: Re: consistent response handling for running out of resources
> 
> On Thu, 4 Aug 2011 13:08:50 +0100 Lewis wrote:
> LAV> We are trying to provide a consistent response if a manager
> attempts to
> LAV> send too many sub-requests within a single request. We have
finite
> LAV> resources and so at some point a malloc will fail and depending
> where it
> LAV> does, the net-snmp engine will either time out or send an error
> LAV> response.
> 
> Hmm.. If a memory error is causing a time out, that's a bug. Can you
> provide
> more details on that scenario?
> 
> LAV> As an 'easy' fix, we were proposing to a add a check so that if
> the
> LAV> number of sub requests exceeds a pre-determined figure, return a
> LAV> SNMP_ERR_RESOURCEUNAVAILABLE response. Does this sound sensible,
> if so,
> LAV> where's the best place to implement it? I'm guessing we could
> modify
> LAV> snmp_pdu_parse() to check the count as it runs through the
varbind
> list.
> 
> The sensible thing, of course, would be to make sure out of memory is
> handled
> properly. resourceUnavailable should only be returned for a set
> request, so if
> they problem is with get request as well, then tooBig is a better
> choice for
> the error.

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. 
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to