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

  1. Xref: sparky comp.unix.shell:4784 comp.unix.programmer:5351
  2. Newsgroups: comp.unix.shell,comp.unix.programmer
  3. Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!orchard.la.locus.com!prodnet.la.locus.com!locus.com!mjl
  4. From: mjl@bos.locus.com (Mike Leibensperger)
  5. Subject: Re: Cron Script to check & auto-restart the died process periodically
  6. In-Reply-To: spatel@cs.tamu.edu's message of Mon, 16 Nov 1992 21: 38:30 GMT
  7. Message-ID: <MJL.92Nov18104614@rigel.bos.locus.com>
  8. Sender: news@locus.com (Netnews)
  9. Organization: Locus Computing Corp., Boston Massachusetts USA.
  10. References: <1992Nov16.213830.25277@tamsun.tamu.edu>
  11. Date: Wed, 18 Nov 1992 15:46:14 GMT
  12. Lines: 31
  13.  
  14. In article <1992Nov16.213830.25277@tamsun.tamu.edu> spatel@cs.tamu.edu
  15. (Samir K Patel) writes:
  16.  
  17. >    We have some system processes running in background to ingest the realtime
  18. >    data from various ports. This processes are started at the boot time by
  19. >    rc.local. 
  20. >
  21. >    Now some time this processes dies due to some errors in the data feed
  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. Mach has a program called nanny that is used to start daemons and
  27. restart 'em when they croak.  Perhaps you could ftp the source from
  28. C-MU and port it.  If restarting the processes *immediately* is not a
  29. bit concern, you could ``kill -0 pid'' from a cron job as someone else
  30. suggested.
  31.  
  32. >    Samir ( spatel@photon.cs.tamu.edu )
  33.  
  34.     yr obdnt svnt,    
  35.     mjl
  36.  
  37.  
  38.  
  39. --
  40. Michael J. Leibensperger      "Rats and roaches live by competition under the
  41. Locus Computing/Boston         laws of supply and demand; it is the privilege
  42. 25 Mall Road; Burlington MA         of human beings to live under the laws of
  43. 01803 (617)229-4980 mjl@locus.com       justice and mercy."  -- Wendell Berry
  44. Member of the League for Programming Freedom --- write league@prep.ai.mit.edu
  45.