Brevis esse laboro, Obscurus fio -- I strive to be brief, and I become obscure.     CEE UCL HelpDesk Homepage

Department of Civil and Environmental Engineering
Frank Batten College of Engineering and Technology
Old Dominion University
Norfolk, Virginia 23529-0241, USA
Tel) (757) 683-3753
Fax) (757) 683-5354


	
Return to CEE UCL HelpDesk Homepage
CEE UCL HelpDesk Access Counter
 
Uh-oh, one of my program got stuck.
How do I 'unstuck' it?


  
There are always a number of different programs from different users (including yourself) running at the same time. Each Unix program, either a command or application, is called a "process."

Each process has a unique "process ID" or "pid" assigned to it. You can look at processes that are currently executing by using the "ps" command.

For examples:

You type It does
$ ps list processes belong to you only
$ ps -Af list all processes, in a long format (bash shell)
$ ps -aux list all processes, in a long format (tcsh shell)

"ps" command will give you rich information about what, whose, when, how long processes are currently running.

Normally, a program/command will terminate correctly when it finishes doing what has been instructed. However, time to time a process may get strayed and cause some problems such as hung-up or terminal lock-up. In such cases, of course, you should first check carefully again and make it sure that you didn't mis-read or click incorrect button, etc. - try to correct the problem in an ordinary fashion. Also, no matter how desperate, keep in mind that this is Unix, and think twice if you are reaching to the back of workstation for the power switch. (by doing so, you're causing obscenely more problems)

Even though nothing seems to cooperate, still you can correct the problem. First, try to open a terminal windows. If your console is completely hung-up and does not respond at all, then login to an adjacent workstation, open a terminal windows, and rlogin to the workstation that is currently hung-up.

Now, you can selectively send a signal to that particular "troblesome" process with the "kill" command saying "please terminate yourself" with an exclamation mark. (no reboot or reset button necessary)

You can do this by typing "kill -9 pid" where pid is the process ID number of the "stuck" process you want to terminate (you need to find this pid using "ps" command first).

If the process is still around after a "kill -9", then it is either hung up in the Unix kernel, becoming a "zombie" process, or you are not even the owner of the process! ("kill" command will tell you if you try to kill something you don't own) BTW, "zombie" process(es) will automatically be cleaned up by Unix kernal, you don't have to worry about them.

To learn more about "ps," type "man ps."


Return to CEE UCL HelpDesk Homepage Move to the Top of this page