Terminating Processes

In performing some types of repairs, you may have to stop one or more processes. You can choose from several methods.

When processes have stopped or terminated abnormally, Fidelity Information Services recommends shutting down all GT.M processes, checking the integrity of the database, then restarting the processes. First, use ps -af to determine the process IDs. Then use MUPIP STOP or KILL-15 to terminate all the GT.M processes. Repeat the ps -af command to assure that all processes have terminated. If they have not, use KILL-9 instead of KILL-15.

When you have terminated all processes, do a MUPIP RUNDOWN on all database files:

        mupip rundown -file <name of database>
        

Use the UNIX ipcs utility to examine the states of message queues, shared memory, and semaphores. If any of these resources are left from the processes that have just been killed, use the UNIX ipcrm utility to remove them. Refer to the "Appendix" for more information.

[Caution]

Use ipcrm with extreme care, as removing the wrong resources can have disastrous results.

Example:

        ipcs
        IPC status from /dev/kmem as of Sat Feb 16 13:13:11 1999
        T     ID     KEY        MODE       OWNER    GROUP
        Shared Memory:
        m   1800 0x01021233 --rw-rw-rw-      uuu      dev
        m     91 0x01021232 --rw-rw-rw-      uuu      dev
        Semaphores:
        s   1360 0x01021233 --ra-ra-ra-      uuu      dev
        s     61 0x01021232 --ra-ra-ra-      uuu      dev
        

This shows the state of these resources with a user uuu working on two databases -m1800 -s1360 and -m91 -s61.

Check the integrity of the database:

        mupip integ -file <name of database>
        

To preserve database integrity, always verify that all GT.M images have terminated and all GDS databases are RUNDOWN before shutting down your system.

Terminating GT.M abnormally with KILL-9 can leave the terminal parameters improperly adjusted, making them unsuited for interactive use. If you terminate GT.M with KILL-9 without terminating the job, logout to reset the terminal characteristics.