Reentrancy from pass scripts
"Tackabury, Wayne" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <F26A9AA488D81043AD772F8CF14370AF272E710A@triton.mii-us.mirrorimage.net> |
Hi all/Dave/Wes: For all the pass scripts I've written in the past, I'm surprised I haven't run into this before, but I haven't. I'm writing a pass script which will effectively synthesize a gauge and string object, to effectively detect a condition worth trapping on via a snmpd.conf 'monitor' directive. So the point is, my pass scripts need to GET other object in the management scope to make dynamic and conditional decisions on to drive the value of the OID's that the pass scripts themselves expose. The problem is-I run the pass script no problem when directly invoking it with -g, and it works with the agent if I return static values without doing any snmp gets or get-nexts (in other words, the basic protocol through the pass script and its return is AOK). The problem is-if I actually do a snmpget from the pass script, it times out. Now as it turns out, the get I need is from my application proxy agent, listening at an alternate port, so I simply updated the pass script to explicitly target the get at localhost:<that_port>. and all works fine. So I have a workaround, but I'm trolling for a general understanding of how to fix this the "next" time or when part of what I need is from, say, the ucd-snmp MIB or something whose instrumentation is built into the agent. I'm suspecting the issue here is reentrancy. Now, there's a build option, which has had some reports of not working over the years, called "-enable-reentrant", which appears to affirmatively define (i.e., actually compile in) a fair degree of mutual exclusion primitive API code for the agent based upon what I can see from the #define hierarchy. On the other hand, I can't find in the code where this would actually affect reentry through the top of the GET PDU request processor. OK, that's a coding question. Either way, after a rebuild with "-enable-reentrancy" in my target environment, the timing out on GETs issued from within my own pass scripts still is happening. And along with that, what my real questions are (I'm doing this on Solaris 10, gcc compilation from the 5.4.2.1 distro, etc.): -- should the reentrancy support target the exact kind of thing I describe above, where a pass script servicing a GET request needs to issue another GET request for another item? -- is this some kind of Bad Thing for pass script usage anyways? If so, can you folks suggest an alternate strategy? Thanks in advance! Wayne Tackabury Mirror Image Internet ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ 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