home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / procwd10.zip / PROCWD.DOC < prev    next >
Text File  |  1998-01-30  |  4KB  |  100 lines

  1. ---------------------------------
  2. PROCESS WATCHDOG Version 1.0
  3. (c) Copyright Ralf Christen 1998
  4. ---------------------------------
  5.  
  6. YOU MAY USE AND DISTRIBUTE THIS PROGRAM FREELY AS LONG AS YOU DON'T
  7. MODIFY ANY OF ITS PARTS. THIS IS FREEWARE.
  8.  
  9.  
  10. Introduction
  11. ------------
  12. We're running a few internal and external servers in our office and many of
  13. them are accessable through the Internet. There are all kinds of services
  14. running on them (HTTP, FTP, SMTP, POP3 etc). Everything worked (almost)
  15. pretty well. I just had one little problem: From time to time, the SMTP
  16. server which processes incoming mail closed without any notification. This
  17. happened about once a week and we never found out the problem because we
  18. couldn't reproduce the problem. No logs, no messages, NOTHING.
  19. The main problem was that this was an unattended server and nobody took
  20. notice of the failing service. If this happened on friday night, the server
  21. remained inactive until monday morning. I had to find a solution...
  22.  
  23.  
  24. What this software does
  25. -----------------------
  26. This software uses the information of the OS/2 PSTAT utility to determine
  27. wheter a certain program is still active or not. If the watchdog detects
  28. a program which isn't active anymore, it will be restarted automatically.
  29. I decided not to write a PM program because this utility must be as small
  30. and slim as possible.
  31.  
  32.  
  33. What you need
  34. -------------
  35. You need Warp V3 or Warp V4. Be sure to have the system utilities installed
  36. because this software needs the OS/2 PSTAT command.
  37.  
  38.  
  39. Configuration File
  40. ------------------
  41. The Process Watchdog (PROCWD) needs a PROCWD.CFG configuration file. This
  42. file contains all names of processes to be watched. Empty lines or lines
  43. starting with a '#' character are ignored.
  44. Every line in this file contains a process to be watched and every line
  45. is made of 3 columns.
  46.  
  47. Column 1:
  48. Contains the name of the process to be monitored as it appears in the output
  49. data of the PSTAT command. This is usually the name of the .EXE program
  50. to be monitored. Don't specify pathnames; just enter the program name.
  51.  
  52. Column 2:
  53. This is the current directory of the process; in case we have to restart
  54. the job.
  55.  
  56. Column 3:
  57. This is the command to restart the job. This command will be executed in
  58. the directory specified in column 2. Just must specify at least the name
  59. of the program to be executed but you can add optional commandline
  60. parameters. For special purposes, it is possible to use all options
  61. of the OS/2 START command in the same order as they appear in the
  62. START command. If you want to learn more about START, you can enter
  63. HELP START in an OS/2 window.
  64.  
  65. The following example file restarts OS/2 SENDMAIL, an NTP client and
  66. an OS/2 REXECD server automatically if they should fail:
  67.  
  68. # Example file
  69. #
  70. SENDMAIL.EXE     C:\           SENDMAIL.EXE -af
  71. NTP.EXE          C:\NTP        NTP.EXE bernina.ethz.ch
  72. REXECD.EXE       C:\TCPIP\BIN  REXECD.EXE
  73.  
  74.  
  75. How to start the program
  76. ------------------------
  77. If you already have set up your configuration file PROCWD.CFG, you may
  78. start the Process Watchdog with the following syntax:
  79.  
  80. PROCWD.EXE interval
  81.  
  82. where 'interval' is an interval in seconds. Process Watchdog 'sleeps' until
  83. it reaches the specified interval time. After this, it checks if all jobs
  84. declared in the PROCWD.CFG file are still up and running. If not, it restarts
  85. the missing job(s).
  86. You may also use this program to replace STARTUP.CMD or the startup folder.
  87. Just put all important services you want to have started automatically into
  88. the PROCWD.CFG file. and put PROCWD.EXE itself into the startup folder.
  89.  
  90. BTW: Restarted jobs are being logged in the PROCWD.LOG file.
  91.  
  92.  
  93. News about this software
  94. ------------------------
  95. You can get the latest release of this software at:
  96. http://www.horgen.net/rem/software/
  97.  
  98. If you have questions or suggestions, mail to:
  99. ralf.christen@ibm.net
  100.