Monitoring the System |
|
|
QM provides several tools to aid System Administrators in monitoring the system and locating problems.
Releasing Locks
Sometimes a QM process may fail to release a lock. In most cases, QM will tidy up automatically if the program or process terminates but there may be times when it is necessary to release a lock manually.
Be careful to consider the implications before releasing a lock. The lock was taken to protect something from simultaneous update. Releasing a lock always carries the risk of data integrity problems.
Record locks, file locks and process synchronisation (task) locks can be released with the UNLOCK command. This command can only be executed from the QMSYS account and requires administrator rights.
Terminating QM Sessions
A System Administrator can terminate a QM session using the LOGOUT command. Also, the qm command has a three special options that may be of use to System Administrators.
QM will attempt to tidy up, releasing any resources owned by the terminated process. Note that terminating a process carries the risk of data integrity problems if the termination occurs in the middle of an update that affects multiple files.
The Windows Task Manager or the kill command on other platforms with signal number 9 (kill -9) should only be used as a last resort if LOGOUT fails to kill the process. QM cannot catch this event and hence cannot free resources assigned to the terminated process. If this style of process termination is used while a QM process is updating a file, loss of data could occur.
Lost Processes
QM periodically compares its internal user table with the processes that are running at the operating system level. If any process registered within QM is no longer running, it must have terminated abnormally. An automated clean up mechanism will remove the user from the internal table, where possible releasing any locks that were held by that process. This automated scan occurs at an interval set with the CLEANUP configuration parameter, defaulting to once every five minutes if this parameter is not used. Setting the interval to a very low value can impact performance.
The RECOVER.USERS command can be used from within the QMSYS account to perform a similar clean up manually. The same effect can be achieved using qm -cleanup from the operating system command prompt. |