home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / WDOG10.ZIP / WATCHDOG.DOC next >
Text File  |  1993-04-10  |  6KB  |  154 lines

  1.                         
  2.  
  3.                 === NOTES ON WATCHDOG 1.0 ===
  4.  
  5.  
  6. PURPOSE
  7. ---------------------------------------------------------
  8. Has this ever happened to you with OS/2?
  9.    (opening scene)  Using or writing favorite program.  It locks up.
  10.    (you think) grumble
  11.    (you think) "No problem, I'll terminate it using CTRL-ESC"
  12.    (<CTRL>-<ESC>)
  13.    (nothing happens..)
  14.    (you think) GRUMBLE grumble
  15.    (you think) "Time to reboot with CTRL-ALT-DEL"
  16.    (<CTRL>-<ALT>-<DEL>)
  17.    (nothing happens...) or (cute message: 'Please wait forever...rebooting')
  18.    (you think) GRUMBLE GRIPE GRUMBLE $@#$)@@!!!
  19.  
  20.     Now you must power off or press the reset button.  Then 
  21.       do while (chkdskIsGrinding) {
  22.          Grumble(&Gripe);
  23.       }
  24.  
  25. Well, it happened to me!  And since I had just gotten my new
  26. Borland C++ compiler, I decided to do something about it.
  27.  
  28.   What WATCHDOG does is to detect the hung desktop and call
  29. DosShutdown.  This will allow CTRL-ALT-DEL to be used to reboot.
  30. While WATCHDOG can't fix the bad application, or OS/2's handling
  31. of CTRL-ESC or CTRL-ALT-DEL, it can avoid the drastic power off and
  32. endless CHKDSK of HPFS on power up.  
  33.  
  34.   WATCHDOG can't do a shutdown in cases of the TRAP NNNN black and
  35. white text screen failure.  There are also several other types of
  36. hangs in which OS/2's scheduler fails.  WATCHDOG is unable to 
  37. shutdown in these cases, either.
  38.  
  39. REQUIREMENTS
  40. ---------------------------------------------------------
  41. This program is 32 bit, and therefore requires OS/2 2.0 or
  42. greater.
  43.  
  44.  
  45. INSTALLATION
  46. ---------------------------------------------------------
  47. The files included are:
  48.   WATCHDOG.EXE - main executable
  49.   WATCHDOG.HLP - online help file
  50.   WATCHDOG.DOC - this file
  51.  
  52. Copy WATCHDOG.EXE and WATCHDOG.HLP to the same directory.  
  53.  
  54.  
  55.  
  56. USE
  57. ---------------------------------------------------------
  58. WATCHDOG must be running at the time of the system hang to shutdown
  59. your computer.  There are several ways to run Watchdog.
  60.  
  61.   1. Type WATCHDOG at the command line if you are in that directory or
  62.      if WATCHDOG is in your path.
  63.  
  64.   2. Execute WATCHDOG by placing a "START d:\path\WATCHDOG" statement
  65.      in your startup.cmd.
  66.  
  67.   3. Create a program reference object.  Place a shadow of this in your 
  68.      startup folder to have it start automatically whenever you restart 
  69.      your computer.
  70.  
  71.   To have Watchdog start minimized in the future, bring up the user 
  72. settings dialog and select the "Start Minimized" option and select "Save".
  73.  
  74.  For more information, refer to the online general help (F1) and 
  75. refer to the help for the settings dialog.
  76.  
  77. When WATCHDOG detects a hung desktop, there will be a beep.  Depending
  78. on the selected shutdown delay and whether shutdown tones are desired,
  79. there will be beeps at about 10 second intervals.  This is followed by
  80. a 1 second beep and disk activity as DosShutdown is called.  Then
  81. a short "KaBleep" meaning shutdown complete.  At this point, 
  82. CTRL-ALT-DEL may be pressed to reboot.
  83.  
  84. All these beeps are a poor user interface.  However, the program doesn't
  85. dare make any calls to PM at this time to provide any sort of output or 
  86. it will certainly become as hopelessly locked up as PM itself.
  87.  
  88.  
  89. HOW IT WORKS
  90. ---------------------------------------------------------
  91. The program works by registering a PM timer for a set interval.  These
  92. are used as heartbeat messages.  Because PM is a single input 
  93. queue, WM_TIMER messages will not be sent when the desktop is hung.  
  94. Another watchdog thread blocks on a semaphore with a timeout greater 
  95. than this interval.  At each WM_TIMER message, the semaphore is cleared.  
  96. If this semaphore wait times out, the program assumes the desktop is 
  97. hung.  A beep tone will sound and after a delay, the program calls 
  98. DosShutdown.  
  99.  
  100.   A legitimate (but poorly written) program might also block the 
  101. PM message queue longer than the selected timeout.  To handle 
  102. this case, choose the Disable menu option before starting the program.
  103. The Watchdog program will be inactive until the Enable menu option
  104. is selected.  There is also a selectable delay before shutdown that
  105. allows you to terminate the application through CTRL-ESC before the 
  106. Watchdog application shuts the system down.
  107.  
  108.   If the desktop recovers before the countdown is complete, 3 tones
  109. will sound and Watchdog will resume waiting for heartbeat messages.
  110.  
  111. TIP:  To find out if any programs you run routinely block the PM
  112. message queue, set a long shutdown delay and the normal 30 second
  113. hang period.  Enable shutdown tones.  Then if you hear high pitched
  114. beeps at 10 second intervals, you known that program is blocking the
  115. PM input queue.
  116.  
  117.  
  118.  
  119. DISCLAIMER
  120. ---------------------------------------------------------
  121.      BY INSTALLING THIS PROGRAM ON YOUR SYSTEM YOU INDICATE YOUR
  122. AGREEMENT TO THE FOLLOWING TERMS AND CONDITIONS. IF YOU DO NOT AGREE
  123. TO THEM YOU ARE NOT ALLOWED TO USE THIS PROGRAM.
  124.      THIS PROGRAM AND DOCUMENTATION ARE DISTRIBUTED AS IS. MIKE
  125. NICE (THE AUTHOR) MAKES NO WARRANTY OF ANY KIND, EXPRESSED OR
  126. IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY OR
  127. FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THIS SOFTWARE AND
  128. DOCUMENTATION. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DAMAGES,
  129. INCLUDING LOST PROFITS, LOST SAVINGS, OR ANY OTHER INCIDENTAL OR
  130. CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF OR THE INABILITY TO
  131. USE THIS PROGRAM, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE
  132. POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
  133.  
  134.  In plain English, I have not had any problem with the program.  However
  135. it is REMOTELY possible that the file system disk buffers could be
  136. corrupted by the program that locked the user interface.  In this case,
  137. writing the bad data to disk could cause data loss.
  138.  
  139.  
  140. DISTRIBUTION
  141. ---------------------------------------------------------
  142. I am releasing this program as FREEWARE.  It may be freely distributed.
  143. It may not be sold for more than the value of the media it is
  144. distributed through.
  145.  
  146.  
  147.  
  148. FEEDBACK, QUESTIONS
  149. ---------------------------------------------------------
  150. If you have any comments or questions, I can be reached through
  151. Compuserve 73565,565.
  152.  
  153. Mike Nice
  154.