next up previous contents
Next: Printing Up: Help! It's not working! Previous: I've lost an important   Contents

My session is hung

The procedure for dealing with this depends on whether you are using a Windows or Linux machine. If you are using Windows, try pressing Ctrl-Alt-Delete (that's all three keys simultaneously, and ``Delete'' must be the key labelled ``Delete''). It should present you with some options; you can try selecting the Task Manager and killing processes which are not responding, or selecting Shutdown to restart the computer. If that doesn't work, you'll have to turn it off and on again.

On Linux, however, rebooting is more of a last resort, because a computer which appears hung may be happily running other people's number-crunching jobs in the background. The local command ``safereboot'' will check whether a computer is idle and unused before rebooting it. It is often possible to sort out a hung Linux session without a reboot; read on for some tips.

The first thing you need to do is to obtain a working session on the hung machine. If the computer will not allow you to open a terminal window, try logging in on a ``virtual console''. To do this, press Ctrl-Alt-F1 and you should see a login prompt. You can log in here and run any Linux commands that don't use graphics. When you've finished, log out and press Alt-F7 to switch back to X. If this doesn't work, log into another machine and try to ssh to the machine on which your hung session is running.

At this point the computer should be responding normally. If it is still very slow, it may be overloaded and thrashing, as discussed earlier, and you should email me from another computer.

Now you need to kill the process which is causing the problem. You get a list of your own processes by typing ``ps uxwww''. The first number in each line is the Process ID or ``PID'' of the process. You kill a process by typing ``kill PID'', replacing ``PID'' with the appropriate number. This sends a signal to the process instructing it to clean up after itself and terminate. If the process has got mixed up, it may not respond to this. You will then have to nuke it with ``kill -9 PID'', which forces a process to die immediately without cleaning up its temporary files.

If your whole X session is locked up, the name of the process to look for and kill will be gnome-session unless you have made major changes to your setup. If just one window is hung and the rest are responding normally, you may simply be stuck in a program you don't know how to exit. Some keys to try pressing:

If none of these work then kill the process.


next up previous contents
Next: Printing Up: Help! It's not working! Previous: I've lost an important   Contents
Eva Myers 2011-08-08