Monitoring the System

Monitoring the System

Top  Previous  Next

 

QM provides several tools to aid System Administrators in monitoring the system and locating problems.

 

LISTUDisplays a list of users currently logged in to QM

 

LIST.FILESShows the names of all files currently open in the system. This command can also help in determining the optimum value for the NUMFILES configuration parameter.

 

LIST.LOCKSLists process synchronisation (task) locks.

 

LIST.READULists all active record and file locks. Includes a report of who is waiting for locks. The DETAIL option to this command can also help in determining the optimum value for the NUMLOCKS configuration parameter.

 

FSTATShows file system performance related data.

 

PSTATDisplays process status information including the command or program being executed.

 

HSMMore useful for programmers than administrators, the HSM (hot spot monitor) command shows the processing time spent in each module of an application.

 

 

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 -k uidKill process with QM user id uid.

 

qm -k allKill all QM processes.

 

qm -uList all active QM processes

 

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.