WatchDog
|
WatchDog is an application that can ‘watch’ other
applications to ensure they are actively running. If an application should
shutdown abnormally or become hung, WatchDog can restart this application. WatchDog is an optional purchase
item that can be associated with DAD, DropBox and Gateway.
|
|
Overview
WatchDog utilizes a heartbeat
between the target application and itself. If the target application cannot
‘respond’ to the heartbeat, WatchDog will restart the program. An example
would be if the target program were ‘Not Responding’.
WatchDog also monitors an EXIT
file. When the target application is exited normally, that program will create
an EXIT file. Presence of this file allows WatchDog to determine if the closure
of the program was intentional. If
the target application should exit from an error, the EXIT file is not created.
At this point, WatchDog will restart the program.
|
|
NOTE: WatchDog will not be able to
monitor any generic process. Currently only DAD, DropBox and Gateway can be
monitored. |
|
|
WatchDog
only monitors Target applications on the machine for which it is being
run. WatchDog will not monitor a process on another workstation. |
|
The WatchDog screen displays the
current status of all Target applications. Basic information such as Process
Name along with Process Pathname and working directory are shown. The current Status of the Process
is shown as either ‘Running’ or ‘Not Running’.
If the Target Process is
not supported on the Security key, ‘No Support for Process’ will be
displayed. |
|
An continually updated Heartbeat
will be displayed as Boom and BaBoom. If a Heartbeat is missed, it is
displayed with the number of attempts tried. When the number of misses equals
the number of maximum attempts defined by the WatchDog.INI file, WatchDog will
restart the program.
The number of times
the Target program has been restarted is also logged.
The Enabled / Disabled button allows on to Enable or Disable the heartbeat communications between WatchDog and the Target application. When Enabled, WatchDog will monitor the program, likewise, when Disabled WatchDog will cease to monitor the program.
To the right of the
screen are the Target applications being monitored. Selecting one of the Targets
will display its status information.
Logs
The following are examples of WatchDog log enties.
|
WatchDog
LOG entry |
Description
of entry |
|
01/27/05
15:32:16 Started WatchDog |
WatchDog
has been Started and Stopped |
|
01/27/05
15:33:56 w[1] WARNING: Process not running (DAD.exe) |
WatchDog
has detected that DAD is no longer running. When it is unable to
start <check> the process, it will restart the application. |
|
01/27/05
15:35:06 w[1] WARNING: Process not running (DAD.exe) |
WatchDog
has detected that DAD is no longer running. Here it detected that the
program was manually exited and shut down normally. |
|
01/27/05
15:38:32 w[1] WARNING: Unable to detect heartbeat (DAD.exe) |
This
message indicates that the heartbeat for the application can not be found.
|
|
01/27/05
15:38:51 w[2] |
WatchDog
is starting an application that was not running when WatchDog was started.
|
|
01/27/05
15:39:19 w[2] WARNING: Killing process (dropbox.exe) |
This
entry will be entered if WatchDog terminates a program because the process
is not responding to heartbeats. |
Setting WatchDog to monitor an application involves configuring an INI file for both WatchDog and the Target program.
WatchDog is configured via the C:\DAD\WatchDog.INI file. Target applications such as DAD, DropBox and Gateway/Dist also utilize an INI file to communicate with WatchDog.
This is done
via the WatchDAD.INI, WatchDrop.INI and WatchGate.INI files which can be found
within the C:\DAD, C:\DAD\DropBox and C:\Gateway directories respectively.
WatchDog.INI variables are
settings are defined as follows:
|
VARIABLE |
VALUE |
DESCRIPTION |
|
[Watch-1] |
|
First instance of WatchDog
Target application settings. |
|
Process Name |
DAD.EXE |
Target applications Process
name |
|
Process Full Pathname |
C:\DAD\DADNET.BAT |
Start path to the Target application
|
|
Process Working Directory |
C:\DAD |
Directory of Target application |
|
Heartbeat Period |
5000 |
Delay in milliseconds between
Heartbeat scans NOTE: This value must be greater than the Heartbeat Period time defined in the Programs INI file. For example, the WatchDAD.INI file should have a Heartbeat Period value of less than 5000. |
|
Heartbeat Delay |
2000 |
Delay
in milliseconds between checks of the Target applications heartbeat. |
|
Heartbeat Max |
3 |
Number of retry attempts of the
Heartbeat before restarting the Target application |
|
Watch Disabled |
FALSE |
True = Disables monitoring of
Target application False = Default mode |
|
[Watch-2] [Watch-3] |
|
Second and Third instance of
WatchDog Target application settings. NOTE: This all other Variable INI entries will be the
same with the Values being for the Second and Third Target application |
In addition to the WatchDog INI
file, DAD, DropBox and Gateway/Dist each use an INI file, which allow for
communication back to the WatchDog program. These INI files are WatchDAD,
WatchDrop and WatchGate respectively.
|
VARIABLE |
VALUE |
DESCRIPTION |
|
[Watch] |
|
|
|
Process Name |
WATCHDOG.EXE |
Process
name of WatchDog
|
|
Process Full Pathname |
C:\DAD\WATCHDOG.EXE |
Start path to the WatchDog
application When DAD starts and WatchDog is NOT running, DAD will automatically start the WatchDog program. |
|
Process Working Directory |
C:\DAD\WATCHDOG |
Directory of WatchDog |
|
Heartbeat Period |
1000 |
Heartbeat
response time in milliseconds NOTE: This value must be less than the Heartbeat Period time defined in the WatchDog INI file. For example, the WatchDog.INI file should have a Heartbeat Period value of greater than 1000. |