--- Robert Story <[EMAIL PROTECTED]> wrote: > On Tue, 1 Mar 2005 18:10:33 +0000 (GMT) Dave wrote: > D> So my python script handles the get() and getnext() by talking back to the > D> agent and filtering out unwanted OIDs, then returning the result back to > the > D> calling agent (snmpd) > D> > D> This seemed to work fine - and in fact does work fine when I run from the > D> command-line. However when I make the call via snmpd (using snmpwalk, for > D> example) the call back into the agent fails [...] > > The problem is that the agent is single threaded. so the agent calls your > script, then blocks while waiting for your answer. so it can't answer the > query > from your script, because it's waiting for your script to finish. catch-22. > [snip] > > If you want to monitor specific processes, there are two other ideas I can > think of. One is the proc token, which is specifically for monitoring whether > or not a process is running. The other is to not use snmp in your script, and > instead only use command-line tools/scripts (like ps) to get the data you > want.
Actually, I don't think I really want to go back to SNMPD to get process information. After all, it probably is just looking up the process table - and as you point out I can do that in my "pass" script by rooting around in /proc or using "ps". Plus, snmpd doesn't have all the process information that I want (number and status of threads in use, for example). So the threading thing is probably a diversion. If there were only a standard MIB to do this ... there's a defunct working group at the IETF [http://www.ietf.cnri.reston.va.us/proceedings/95dec/charters/applmib-charter.html] but I haven't found anything ... > In theory, this could work if the pass mechanism was updated to use the > delegated flag, and allow other requests to be processed while a script is > running. But nobody has gotten around to doing this yet. I've forgotten how to write in C, otherwise I'd give it a go! I wonder if the embedded perl could helpful here? Thanks for the reply! dave Send instant messages to your online friends http://uk.messenger.yahoo.com ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users