home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
WDOG10.ZIP
/
WATCHDOG.DOC
next >
Wrap
Text File
|
1993-04-10
|
6KB
|
154 lines
=== NOTES ON WATCHDOG 1.0 ===
PURPOSE
---------------------------------------------------------
Has this ever happened to you with OS/2?
(opening scene) Using or writing favorite program. It locks up.
(you think) grumble
(you think) "No problem, I'll terminate it using CTRL-ESC"
(<CTRL>-<ESC>)
(nothing happens..)
(you think) GRUMBLE grumble
(you think) "Time to reboot with CTRL-ALT-DEL"
(<CTRL>-<ALT>-<DEL>)
(nothing happens...) or (cute message: 'Please wait forever...rebooting')
(you think) GRUMBLE GRIPE GRUMBLE $@#$)@@!!!
Now you must power off or press the reset button. Then
do while (chkdskIsGrinding) {
Grumble(&Gripe);
}
Well, it happened to me! And since I had just gotten my new
Borland C++ compiler, I decided to do something about it.
What WATCHDOG does is to detect the hung desktop and call
DosShutdown. This will allow CTRL-ALT-DEL to be used to reboot.
While WATCHDOG can't fix the bad application, or OS/2's handling
of CTRL-ESC or CTRL-ALT-DEL, it can avoid the drastic power off and
endless CHKDSK of HPFS on power up.
WATCHDOG can't do a shutdown in cases of the TRAP NNNN black and
white text screen failure. There are also several other types of
hangs in which OS/2's scheduler fails. WATCHDOG is unable to
shutdown in these cases, either.
REQUIREMENTS
---------------------------------------------------------
This program is 32 bit, and therefore requires OS/2 2.0 or
greater.
INSTALLATION
---------------------------------------------------------
The files included are:
WATCHDOG.EXE - main executable
WATCHDOG.HLP - online help file
WATCHDOG.DOC - this file
Copy WATCHDOG.EXE and WATCHDOG.HLP to the same directory.
USE
---------------------------------------------------------
WATCHDOG must be running at the time of the system hang to shutdown
your computer. There are several ways to run Watchdog.
1. Type WATCHDOG at the command line if you are in that directory or
if WATCHDOG is in your path.
2. Execute WATCHDOG by placing a "START d:\path\WATCHDOG" statement
in your startup.cmd.
3. Create a program reference object. Place a shadow of this in your
startup folder to have it start automatically whenever you restart
your computer.
To have Watchdog start minimized in the future, bring up the user
settings dialog and select the "Start Minimized" option and select "Save".
For more information, refer to the online general help (F1) and
refer to the help for the settings dialog.
When WATCHDOG detects a hung desktop, there will be a beep. Depending
on the selected shutdown delay and whether shutdown tones are desired,
there will be beeps at about 10 second intervals. This is followed by
a 1 second beep and disk activity as DosShutdown is called. Then
a short "KaBleep" meaning shutdown complete. At this point,
CTRL-ALT-DEL may be pressed to reboot.
All these beeps are a poor user interface. However, the program doesn't
dare make any calls to PM at this time to provide any sort of output or
it will certainly become as hopelessly locked up as PM itself.
HOW IT WORKS
---------------------------------------------------------
The program works by registering a PM timer for a set interval. These
are used as heartbeat messages. Because PM is a single input
queue, WM_TIMER messages will not be sent when the desktop is hung.
Another watchdog thread blocks on a semaphore with a timeout greater
than this interval. At each WM_TIMER message, the semaphore is cleared.
If this semaphore wait times out, the program assumes the desktop is
hung. A beep tone will sound and after a delay, the program calls
DosShutdown.
A legitimate (but poorly written) program might also block the
PM message queue longer than the selected timeout. To handle
this case, choose the Disable menu option before starting the program.
The Watchdog program will be inactive until the Enable menu option
is selected. There is also a selectable delay before shutdown that
allows you to terminate the application through CTRL-ESC before the
Watchdog application shuts the system down.
If the desktop recovers before the countdown is complete, 3 tones
will sound and Watchdog will resume waiting for heartbeat messages.
TIP: To find out if any programs you run routinely block the PM
message queue, set a long shutdown delay and the normal 30 second
hang period. Enable shutdown tones. Then if you hear high pitched
beeps at 10 second intervals, you known that program is blocking the
PM input queue.
DISCLAIMER
---------------------------------------------------------
BY INSTALLING THIS PROGRAM ON YOUR SYSTEM YOU INDICATE YOUR
AGREEMENT TO THE FOLLOWING TERMS AND CONDITIONS. IF YOU DO NOT AGREE
TO THEM YOU ARE NOT ALLOWED TO USE THIS PROGRAM.
THIS PROGRAM AND DOCUMENTATION ARE DISTRIBUTED AS IS. MIKE
NICE (THE AUTHOR) MAKES NO WARRANTY OF ANY KIND, EXPRESSED OR
IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY OR
FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THIS SOFTWARE AND
DOCUMENTATION. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DAMAGES,
INCLUDING LOST PROFITS, LOST SAVINGS, OR ANY OTHER INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF OR THE INABILITY TO
USE THIS PROGRAM, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
In plain English, I have not had any problem with the program. However
it is REMOTELY possible that the file system disk buffers could be
corrupted by the program that locked the user interface. In this case,
writing the bad data to disk could cause data loss.
DISTRIBUTION
---------------------------------------------------------
I am releasing this program as FREEWARE. It may be freely distributed.
It may not be sold for more than the value of the media it is
distributed through.
FEEDBACK, QUESTIONS
---------------------------------------------------------
If you have any comments or questions, I can be reached through
Compuserve 73565,565.
Mike Nice