home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: SysTools
/
SysTools.zip
/
procwd10.zip
/
PROCWD.DOC
< prev
next >
Wrap
Text File
|
1998-01-30
|
4KB
|
100 lines
---------------------------------
PROCESS WATCHDOG Version 1.0
(c) Copyright Ralf Christen 1998
---------------------------------
YOU MAY USE AND DISTRIBUTE THIS PROGRAM FREELY AS LONG AS YOU DON'T
MODIFY ANY OF ITS PARTS. THIS IS FREEWARE.
Introduction
------------
We're running a few internal and external servers in our office and many of
them are accessable through the Internet. There are all kinds of services
running on them (HTTP, FTP, SMTP, POP3 etc). Everything worked (almost)
pretty well. I just had one little problem: From time to time, the SMTP
server which processes incoming mail closed without any notification. This
happened about once a week and we never found out the problem because we
couldn't reproduce the problem. No logs, no messages, NOTHING.
The main problem was that this was an unattended server and nobody took
notice of the failing service. If this happened on friday night, the server
remained inactive until monday morning. I had to find a solution...
What this software does
-----------------------
This software uses the information of the OS/2 PSTAT utility to determine
wheter a certain program is still active or not. If the watchdog detects
a program which isn't active anymore, it will be restarted automatically.
I decided not to write a PM program because this utility must be as small
and slim as possible.
What you need
-------------
You need Warp V3 or Warp V4. Be sure to have the system utilities installed
because this software needs the OS/2 PSTAT command.
Configuration File
------------------
The Process Watchdog (PROCWD) needs a PROCWD.CFG configuration file. This
file contains all names of processes to be watched. Empty lines or lines
starting with a '#' character are ignored.
Every line in this file contains a process to be watched and every line
is made of 3 columns.
Column 1:
Contains the name of the process to be monitored as it appears in the output
data of the PSTAT command. This is usually the name of the .EXE program
to be monitored. Don't specify pathnames; just enter the program name.
Column 2:
This is the current directory of the process; in case we have to restart
the job.
Column 3:
This is the command to restart the job. This command will be executed in
the directory specified in column 2. Just must specify at least the name
of the program to be executed but you can add optional commandline
parameters. For special purposes, it is possible to use all options
of the OS/2 START command in the same order as they appear in the
START command. If you want to learn more about START, you can enter
HELP START in an OS/2 window.
The following example file restarts OS/2 SENDMAIL, an NTP client and
an OS/2 REXECD server automatically if they should fail:
# Example file
#
SENDMAIL.EXE C:\ SENDMAIL.EXE -af
NTP.EXE C:\NTP NTP.EXE bernina.ethz.ch
REXECD.EXE C:\TCPIP\BIN REXECD.EXE
How to start the program
------------------------
If you already have set up your configuration file PROCWD.CFG, you may
start the Process Watchdog with the following syntax:
PROCWD.EXE interval
where 'interval' is an interval in seconds. Process Watchdog 'sleeps' until
it reaches the specified interval time. After this, it checks if all jobs
declared in the PROCWD.CFG file are still up and running. If not, it restarts
the missing job(s).
You may also use this program to replace STARTUP.CMD or the startup folder.
Just put all important services you want to have started automatically into
the PROCWD.CFG file. and put PROCWD.EXE itself into the startup folder.
BTW: Restarted jobs are being logged in the PROCWD.LOG file.
News about this software
------------------------
You can get the latest release of this software at:
http://www.horgen.net/rem/software/
If you have questions or suggestions, mail to:
ralf.christen@ibm.net