Re: exec question

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 20/09/06, danny zhong <[email protected]> wrote:
> since the daemon program is in the remote site computer, and i don't want
> the daemon program start when the remote computer start. i only want the
> daemon program start when i "triggered" it.

Fair enough.
I'd still recommend that you write a simple init.d-style script to
start/stop the daemon.
This wouldn't have to be activated automatically on boot-up (though it
would give you that option in the future, if you decided to change the
way you worked).
  But that would allow you to tackle the two development tasks separately:

a)  starting (or stopping) the daemon cleanly
       (which you could do manually until you got it working cleanly)
b)  triggering this via SNMP
       (invoking the script developed in a))


>                                                                   Actually, in my project, there
> are more daemon program need to be "triggered" in the same remote computer
> and other remote computer as well. and some of these daemon program need to
> be "trigger" in order.

Which is something that the "init.d" script could look after.


>                            For easer to manage, i want a snmp agent can do it for me.

See b) above.


> how about if i develop an agent by using the API, which only need to
> "trigger" the daemon programs, and then will return a packet without
> waitting for the "finish" of daemon program like your "exec".

I'd actually suggest that you don't use "exec" at all.
This feels much more appropriate for the "proc/procfix" directives.
"proc" could be used to check whether the daemon is currently running or not.
"procfix" could be used to invoke the startup script if necessary.

Dave

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