2008/5/15 Zack Little <[EMAIL PROTECTED]>: > 1) Can the program on the pass_persist line already be running or does it > have to be kicked off by snmpd?
It's kicked off by snmpd. > 2) If snmpd kicks it off then what happens when the second request comes > in? If the program is still running does snmpd launch another instance of > it or does it send the request the program already running? It sends the request to the program that is already running. > 3) The man page says that pass and pass_persist block until they return. If > the point of pass_persist it to have the program continue to run after the > request is answered how does this work if snmpd is paused waiting for the > pass_persist program to return? The agent will send a request to the pass_persist (or pass) program, and then wait until it receives a response. Then it will continue with the next varbind. This holds whether the program is persisent or not. (although the way that the request is passed over is different between the two). The difference lies in what happens *before* and *after* the request/response dialogue. With "pass", the agent must start the program before sending the request, and the program exits afterwards. With "pass_persist", the program is running all the time. But it both cases, the agent sends the request, and then waits for a response. > 3) The example in the package uses a Perl script. I only have a rudimentary > knowledge of Perl. I will need to write C program for what I want to do. > From what I can tell the Perl script loops until there is nothing else left > to be read on standard input. I tried to mimc the Perl script's logic in a > C program but I get no response when I try a getnext to my custom MIB. Read the snmpd.conf(5) man page for a description of what the pass (persist) program must do to accept the request. Dave ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
