thanks for your reply. so what i need to do is just put all the starting and 
stoping script in the /etc/init.h/ and then use the procfix with setting the 
prErrFix to 1, in order to call the starting or stoping script? am i 
correct? just for making sure, will the "procfix" only do "trigger", or it 
will wait for the "triggered process" finished.






////////////////////////////


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



>From: "danny zhong" <[EMAIL PROTECTED]>
>To: net-snmp-users@lists.sourceforge.net
>Subject: Re: exec question
>Date: Thu, 21 Sep 2006 00:20:54 +1000
>
>
>
>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. 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.  For easer to manage, i want a snmp agent can do it
>for me.
>
>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". if it is
>possible, then can you just tell me what kind of api function i can use or
>need to modify??
>
>
>
>
>
>
>////////////////////////////////////////////////////////////////
>
>what i am trying to do at the moment is to run a remote site daemon 
>program.
>this daemon program is used to receive video metadata from other computer.
>
>
>OK.
>Starting/Stopping that daemon is best handled by something other than
>"exec".
>You don't say what O/S you're using - but if this is a Unix-like
>system, then I'd suggest you write a simple "/etc/init.d/videodaemon"
>script to start/stop the daemon.
>   That would give you much more flexible control than a purely
>SNMP-based approach.
>
>Use the existing startup scripts as a template.
>
>     also i want to use net snmp to monitor this program is running 
>properly.
>
>
>That's different from actually starting the problem.
>
>     Could you please give me some hints.
>
>
>Have a look at the 'proc' directive (in snmpd.conf(5)).
>This will report whether a particular process is running or not.
>
>Dave
>
>
> >From: "Dave Shield" <[EMAIL PROTECTED]>
> >To: "danny zhong" <[EMAIL PROTECTED]>
> >CC: net-snmp-users@lists.sourceforge.net
> >Subject: Re: exec question
> >Date: Wed, 20 Sep 2006 09:04:52 +0100
> >
> >On 20/09/06, danny zhong <[EMAIL PROTECTED]> wrote:
> > > int main(void){
> > > while(1){
> > >
> > > }
> > > }
> > >
> > > and i put the execution command of this file in  a script file called
> > > run.sh, in the snmpd.conf, i add
> > >
> > > exec .1.3.6.1.4.1.2021.53 run /bin/sh /home/danny/run.sh
> >
> >No - that won't work.
> >"exec" is designed to run a command to completion, and report the 
>results.
> >If you've got a long-running program, then you can't use the
> >simplistic "exec" approach.
> >
> >Take a step backwards - what exactly are you trying to do?
> >
> >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
> >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
> >
>
>_________________________________________________________________
>Nothing but cars & over 100,000 of them at carsales.com.au
>http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldwide%2Ecom%2Fcgi%2Dbin%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801577%2Fpi%5F1005244%2Fai%5F836752&_t=12345&_r=emailtagline_tig_over100k&_m=EXT
>
>
>-------------------------------------------------------------------------
>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
>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

_________________________________________________________________
Want $250 of std talk, text & more for $49 a month? Go to  
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fadsfac%2Enet%2Flink%2Easp%3Fcc%3DTEL217%2E31371%2E0%26clk%3D1%26creativeID%3D44933&_t=758220942&_r=emailtaglinetelstra&_m=EXT


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

Reply via email to