> > From: Matt Simonsen[SMTP:[EMAIL PROTECTED]] > > > I have a script to monitor servers which is basically an infinate > loop that > sleeps and runs again. I start from a ssh session by the command: > > ssh -f $server "~/script &" > > It seems to be dieing on some of our busier servers. > > I'm guessing this is because I'm not doing it properly... but I'm not > sure > exactly what "proper" would be to do this.
I have used the following while (1){ Code goes here; } > > My best guess is I should have the script immediately fork a copy of > itself > then die while the forked copy still runs, but I haven't been able to > figure > out how to make that work. Any suggestions would be helpful, > especially a > sample loop like this that just forks a daemon to do something stupid > like > print "foo" ; forever. You can fork to your hearts content but you are still after a continously running program. Someone has mentioned Cron which is a good idea. I have no idea what you are using but if it was Linux I would use the start up files held in /etc/rcN.d directories. I imagine most nix's will have something similair. You can use this to start the process if it gets stopped for any reason but how to set this up is for another list. Harry __________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]