Unix hints on cleanup of hung. lost, or orphaned processes

You as users need to know that when crashing or improperly closing Gempak or any other program, you leave some processes (see Unix in a Nutshell for definition) running/hung/orphaned. When this happens, system (Rossby) resources are not available for other users. You need to clean up before logging out. Here are a few guidelines that you can use to help you become better, more responsible users:

Logout

This is the easiest procedure. When you are done, log off the machine you are on. Just do not close the window of the ssh application. To do this, issue the Unix command "exit".

Clean up hung processes

By issuing the following Unix commands:

On Solaris OS (rossby) use

ps -ef | grep {username} [cr]

or

On linux (metlabs) use

ps -aux | grep {username} [cr]

you will see a list of all your running and hung/orphaned processes. You can usually see the Gempak programs running that should not be running (sfmap, snmap, etc). The first number is the process number.

metlab13 > ps -aux | grep laufers

laufers 6804 6767 0 01:45:46 ? 0:00 sfmap

Now stop those processes with the following Unix command:

kill -9 {jobid #} [cr]

where jobid # can be found from the list returned by the previous command. This can stop any process, not just those from Gempak. For the above example, one would enter

metlab13 > kill -9 6804

Clean up Gempak graphic messages

By executing the following Unix commands:

ipcs | grep {username} [cr]

you will get a list of any ipcs processes owned by you. These especially can cause problems for other users if left on the system. To remove these processes, just execute the following Unix cshell script:

rm-ipcs {username} [cr]

This will remove your leftover graphics messages and free up those resources.

Thank you.

mjl