home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.shell:4746 comp.unix.programmer:5308
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sdd.hp.com!usc!nic.csu.net!gd!oleg
- Newsgroups: comp.unix.shell,comp.unix.programmer
- Subject: Re: Cron Script to check & auto-restart the died process periodically
- Message-ID: <1992Nov17.001048.3225@nic.csu.net>
- From: oleg@gd. (Oleg Kibirev)
- Date: 17 Nov 92 00:10:47 PST
- References: <1992Nov16.213830.25277@tamsun.tamu.edu>
- Organization: Computer Science Departement of California State University in Fresno
- Nntp-Posting-Host: gd.cs.csufresno.edu
- Lines: 18
-
- In article <1992Nov16.213830.25277@tamsun.tamu.edu> spatel@cs.tamu.edu (Samir K Patel) writes:
- >
- >
- > We have some system processes running in background to ingest the realtime
- > data from various ports. This processes are started at the boot time by
- > rc.local.
- >
- > Now some time this processes dies due to some errors in the data feed
- >
- > So we need to periodically check that this processes are running and
- > if not we need to restart the process. I think cron can do it but I don't
- > know exactly how to check that process is running or not.
- >
- Why not having the process write /etc/smth.pid so that a script started in
- crontab can do kill -0 PID to check if it's still alive?
-
- Oleg
-
-