Consultor Eletrônico



Kbase P11456: What does the Progress Watchdog do
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   23/09/2008
Status: Verified

GOAL:

What does the Progress Watchdog do

GOAL:

How does watchdog work

GOAL:

What is WDOG

FACT(s) (Environment):

All Supported Operating Systems
Progress/OpenEdge Versions

FIX:

The Progress Watchdog is a background process for shared memory systems (such as UNIX, VMS and NT, not DOS/Windows), its purpose is to protect the database from corruption and database hang.

The Progress Watchdog runs all the time:

If you do not run the PROWDOG (Progress Watchdog startup script) as a separate process, the BROKER handles all the Watchdog functions.

The Watchdog process wakes up approximately every 10 seconds and performs its function.

Watchdog works in two (2) areas to protect the database and to resolve conflicts -> Shared Memory and .lk file

Shared Memory

In Shared Memory the Watchdog looks for missing processes.

If a system process has disappeared from the system, but Progress did not get notified (this can happen by a process being killed with kill -9 or by signal trapping at the system level):

1) Watchdog senses the missing process (by checking the user table in shared memory and comparing it to the system processes) it marks the user table and goes back to sleep. If the user table shows the process missing 3 times (or 60 to 90 seconds) watchdog disconnects the user from the database.

2) Watchdog backs out all transactions for the missing process.

3) Watchdog releases all locks held by the missing process.
4) If the process is killed BY A SIGNAL WE CAN'T TRAP (like kill -9) and has a lock on shared memory, watchdog will bring down the broker to preserve the db integrity. If the process is killed by a signal we CAN TRAP (like -1) then the user is logged out normally not affecting the status of the db.

dbname.lk file

The watchdog uses the 'dbname.lk' file to protect the data-base from having multiple processes writing to it.

(NOTE: the dbname.lk file does not exist in VMS. All locking is handled by the VMS operating system)

Watchdog uses the 3 items in the dbname.lk file which are
1) Single user or Multi-user start up mode of db.
2) Process ID of process that started the database.
3) Hostname where the process is running.
(All processes use the dbname.lk file to determine if the database is currently in use.)

Watchdog, using the dbname.lk file,
1) checks to see if the BROKER is still alive(ONLY the Watchdog can do this!).
2) verifies the dbname.lk file exists.
3) verifies the dbname.lk file is valid.
If any of these checks fail, watchdog will protect the database by initiating an abnormal shutdown.


Benefits to starting the watchdog as a separate process:
1. It frees up the broker to do other things.
2. It can check for the disappearance of the broker
process itself.