On Thu, 25 Sep 2003, Johnny Fulcrum wrote: > On Thu, 25 Sep 2003 12:15:38 -0500, Lansing, Dan > <Dan.Lansing at AndersenCorp.com> wrote: > > >I have written a small ugly script to restart some services which > >occasionally quit for unknown reasons...is there a way I can write a > >script to check if the services are running and run my restart script if > >they die? > > > > yes! write a script to check if the process is running and restart if > need be. Then run a that script though cron and at your desired frequncey. > > you could use ps -ef and grep for the process pid if you know it - or the > process name... if there's only one running... > The only thing to watch out for is hung processes. Sometimes a process shows up in ps -ef, but isn't responding. Just something to be aware of. There's a debian package called restartd that does exactly what you are looking for. I haven't used it, so I don't know what advantages it has over a simple shell script in cron. _______________________________________________ TCLUG Mailing List - Minneapolis/St. Paul, Minnesota http://www.mn-linux.org tclug-list at mn-linux.org https://mailman.real-time.com/mailman/listinfo/tclug-list