Dec 262017
 
A new version of the WatchDog utility -- handy for BBS SysOps.

Full Description of File


WatchDog 1.20 is a resident utility designed
for BBS'es and other remote operated compu-
ters. It monitors the Carrier on a COM port,
and also detects hanging programs (e.g.
faulty doorways). If carrier is lost or a
program hangs, the computer is rebooted.
Reboot may be delayed to allow lazy-write
caches flush their data to disk.
NEW: reboot at a specific ring count.
Zero-Registration Shareware 07-27-92


File WATCHDG.ZIP from The Programmer’s Corner in
Category BBS Files
A new version of the WatchDog utility — handy for BBS SysOps.
File Name File Size Zip Size Zip Type
DESC.SDI 424 287 deflated
FILE_ID.DIZ 424 287 deflated
READ.ME 11770 4519 deflated
WATCHDOG.COM 6046 3582 deflated

Download File WATCHDG.ZIP Here

Contents of the READ.ME file


WatchDog 1.20 is a resident utility designed
for BBS'es and other remote operated compu-
ters. It monitors the Carrier on a COM port,
and also detects hanging programs (e.g.
faulty doorways). If carrier is lost or a
program hangs, the computer is rebooted.
Reboot may be delayed to allow lazy-write
caches flush their data to disk.
NEW: reboot at a specific ring count.
Zero-Registration Shareware 07-27-92
WatchDog v.1.20
(c) 1992 Ernest Vogelsinger

Package Contents
----------------

The WTCHDG.ZIP archive contains the following files:
o WATCHDOG.COM the WatchDog program
o READ.ME you're currently reading this file, thank you!
o FILE_ID.DIZ description for automatic extraction by BBS'es
o DESC.SDI description for automatic extraction by BBS'es


General
-------

WatchDog is a resident utility program monitoring the activity status of
a COM port (carrier) and DOS (Dos and Kbd calls).

Its main use is with remote BBS software that hands control to e.g. a
shell program. When the shell program hangs (Dos watch) or carrier loss
is detected (COM watch) the serial port DTR is dropped (hangup) and the
machine is rebooted.

VERSION 1.20 - NEW FEATURE
By popular demand, a ring count watch has been added. This is to allow
reboot when the BBS program fails to go off-hook, by what reason ever.
The ring watch can be customized to any needed ring count and can also
be disabled.
After a certain time without a ring indicated by the modem, WatchDog will
assume ringing has stopped, and reset the ring counter. This no-ring time
can also be customized.


Main features of WatchDog
-------------------------

o Needs only 800 bytes of memory.
o Can be activated, deactivated, and reconfigured as often as needed,
and it can also be unloaded.
o Monitoring is lightning fast so no data loss should occur with
high speed serial communications.
o Detects carrier loss by monitoring COM 1, 2, 3 or 4.
The COM port can be selected from the command line, or carrier monitor
can be completely switched off.
o Built-in ring counter to reboot when the BBS fails to go off-hook.
Reboot counter can freely be specified or disabled.
o Detects a hanging program by monitoring "DOS" activity.
WatchDog accepts Int16 (keyboard), Int21 (DOS), and Int28 (DOS Idle)
as "DOS" activity. The "DOS" timeout seconds can be selected from the
command line, or "DOS" monitoring can be completely switched off.
o The reboot method can be selected from "Bios" (the usual jump to
bios location FFFF:0), and "Hardware", where the CPU is rebooted
via a command to the keyboard controller. This is often necessary with
protected mode DOS extenders.
o Reboot can be delayed to allow lazy write cache programs write their
data back. The delay time can be selected from the command line.

WatchDog can be tailored to meet individual requirements with command line
arguments. It may be executed multiple times, without being reloaded.
A secondary copy always modifies the settings of the resident watchdog.


WatchDog Command Line
---------------------

You load (and reconfigure) WatchDog by specifying

WATCHDOG [/option=value] ...

on the command line, or in a batch file.

WatchDog recognizes the following parameters:

/COM=n
n - A value between 0 and 4, specifying the COM port to monitor.
Specifying 0, or a non-existent port, will disable
carrier monitoring and ring counting.
NOTE: different to version 1.11, the /COM parameter doesn't
enable or disable carrier watch, since the ring count
feature has been added. To enable or disable carrier
monitoring, use the following parameter.

** 1.20 NEW **
/CARRIER=ss
ss - A string specifying carrier monitoring activity. You may specify
ON - enable carrier monitor
OFF - disable arrier monitor

/DOS=nn
nn - A value between 0 and 65535, specifying the number of seconds
that DOS may be inactive before WatchDog reboots.
Specifying 0 will disable DOS monitoring.

** 1.20 NEW **
/RING=nn
nn - A value between 0 and 65535, specifying the number of rings that
will be allowed for rebooting.
Specifying 0 will disable the ring monitor.
NOTE: if the modem is online (carrier active), the ring monitor
is automatically disabled, regardless of the carrier
monitor status.

** 1.20 NEW **
/NORING=nn
nn - A value between 0 and 65535. After this time is elapsed without
a ring to occur, WatchDog determines that ringing has stopped,
and resets the ring counter.

/MPX=xx
xx - A (hexadecimal) value between C0 and FF, specifying the ID byte
for the Multiplexer communication (see note on MPX below).
The default value is C0, or the first free ID byte found.

/BOOT=ss
ss - A string specifying the boot method. You may specify
BIOS - boot by passing control to the bios location FFFF:0
HARDWARE - boot by resetting the CPU via keyboard controller
or HW (see note on booting below).

/WAIT=nn
nn - A value between 0 and 65535, specifying the number of seconds
that WatchDog will wait for DOS to become idle before rebooting
(see note on delayed boot below).

/DELAY=nn
nn - A value between 0 and 65535, specifying the number of seconds
that WatchDog will delay before rebooting (see note on delayed
boot below).

/WATCH=ss
ss - A string specifying WatchDog activity. You may specify
ON - enable WatchDog
OFF - disable WatchDog
This en- and disables the overall WatchDog activity. If either
carrier detect or DOS monitor is disabled, specifying ON will
not change these values.

/UNLOAD
Unloads the resident WatchDog if possible. If another program
has hooked one of the interrupts WatchDog uses, it will display
a message and disable itself.

/STATUS
Displays the current WatchDog status.

/?, /HELP
Displays a descriptive help text.

/DEFAULT
Displays the built-in default values.

/QUIET
Suppresses all output messages.


The Multiplexer Interface
-------------------------

The Multiplexer interrupt (Int2F) is a mechanism for programs to communicate.
WatchDog uses this mechanism to communicate between the transient program
(the loader) and the (smaller) part that stays resident in memory.

The defined interface protocol is very simple. An ID byte is specified in
the AH register, and the function code is put in the AL register. Then the
interrupt is called. The ID bytes C0 .. FF are reserved for "user programs".

WatchDog tries to find a free ID value between C0 and FF and will use this.
Sometimes it is necessary to avoid certain ID values to allow other programs
that do not scan for a free byte to run. This is the reason why the Mpx ID
can be specified on the command line. Usually you will not need to change
this.


Booting The Machine
-------------------

Generally, there are two ways to reboot a (DOS) computer via software. The
method used most is to pass control to the code at FFFF:0. While this works
in most cases where "DOS only" is loaded, it might cause problems with
certain types of protected mode DOS extender software. The machine might
endlessly hang, and not reboot. One example I personally know is Soft-ICE,
a protected mode debugger software. I have heard rumours that QEMM or EMM386
might react similar in some cases.

If you encounter that problem, add /BOOT=HW to the command line to enable
hardware CPU reset.

WatchDog resets the CPU by sending a special command to the keyboard
controller. The keyboard controller (port 64h) understands a lot of commands.
The command we need here is Fx, that pulses bits of the output port low
for 6 s. Bits 0-3 of command indicate which bits should be pulsed:
0=pulse, 1=don't pulse. Pulsing bit 0 (command FE) results in CPU reset
since it is connected to system reset line.

There are some PS/2 computers where this method will not work (I think it's
PS/2 model 80).


Modem Hang Up
-------------

If a COM port is specified, and WatchDog is about to reboot, it drops
the DTR (Data Terminal Ready) and RTS (Ready To Send) lines on the modem,
causing the modem to hang up and the serial port to be reset.
While this might not be necessary with carrier loss, it is a must if reboot
is caused by DOS timeout.


Delayed Boot
------------

A very special feature is WatchDogs Delayed Boot opportunity.
Whenever you're using a lazy-write cache program (like SMARTDRV etc) you'll
loose data when rebooting, if the cache software couldn't finish writing
your data back.

The first thing WatchDog does after resetting the modem is to wait for DOS
to become available. Since the cache software needs DOS to write the data
to disk, it will not do disk writes if DOS is busy. The time how long
WatchDog should wait for DOS to become available is specified with the
/WAIT=nn command line parameter.

After DOS is available, WatchDog waits for the time specified in the
/DELAY=nn parameter. While waiting, it repeatedly issues Int28, thus
pretending that DOS is idle on the command line.

Both actions together (wait for DOS to become available, and then loop for
a couple of seconds) allows lazy write caches to finish their write activity.

However, if DOS will not become available (e.g. if some DOS structure has
been corrupted, and DOS itself is hanging), WatchDog will reboot the machine
without being able to give time to background programs. In these cases,
data loss will occur and cannot be avoided.


The Legal Department
--------------------

Users of WatchDog must accept the following disclaimer of warranty:

THIS COPYRIGHTED SOFTWARE AND ITS DOCUMENTATION IS PROVIDED ON AN "AS IS"
BASIS. THE AUTHOR MAKES NO WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED,
INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY AND/OR
FITNESS FOR A PARTICULAR PURPOSE.

THE USER ASSUMES ALL RISKS OF THE USE OF THIS SOFTWARE. THE AUTHOR ASSUMES
NO LIABILITY FOR DAMAGES, DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT FROM THE
USE OR MISUSE OF WATCHDOG.

As it cannot be guaranteed that loss of data will not occur, WatchDog should
be tested with non-critical data. As always, judicious backups are a wise
and necessary continuing precaution.


Zero-Registration Shareware, Distribution Policy
------------------------------------------------

Now that the necessary legal issues are out of the way:

WatchDog is a program I wrote because I was missing a lot of features in
the watchdog program I have got (it was written in '84, and therefore
heavily aged out).

WatchDog v.1.20 is "zero-registration" shareware. that means, you may use it
freely, without notifying me or anyone else, and without paying one cent. I
sincerely hope it will satisfy you.

You may freely distribute WatchDog, as long as the archive file remains
unmodified. I expressly forbid to add any files, or any comments to the
archive.


WatchDog Source Code
--------------------

The source code for WatchDog can be obtained by contacting me at the
CompuServe address mentioned below. The fee for the source code is
US$ 150.--. For more information, please contact me.


Contacting The Author
---------------------

If you have questions or ideas for future enhancements of WatchDog, I'd be
glad if you would contact me via CompuServe. Of course, I'll be happy if you
just want to tell me the program works well.

Ernest Vogelsinger
CIS 100015,551

(Thank you for reading the complete file!)


 December 26, 2017  Add comments

Leave a Reply