home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / shell / 4746 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.2 KB

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