Linux-Noob Forums
What options exist when all windows are hung? - Printable Version

+- Linux-Noob Forums (https://www.linux-noob.com/forums)
+-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html)
+--- Forum: How Do I? (https://www.linux-noob.com/forums/forum-60.html)
+--- Thread: What options exist when all windows are hung? (/thread-2784.html)



What options exist when all windows are hung? - Shock Wave - 2005-03-23


Hi all. I'm looking for some help with a homework question that I was unable to complete.

 

Question: A user calls and says all of his windows are hung. He can't do anything. Describe what steps you'd take.

 

My answer was to ssh into the box and start killing processes. However, I only received 1/3 for my answer.

 

My instructor's reply was: this is OK as far as it goes, but what about the mid-range / mainframe scenario (multiple users on the same box) ?

 

Does anyone know what the appropriate approach is here?




What options exist when all windows are hung? - z0ny - 2005-03-23

Well you'd have to define "killing processes" I think. Killing X is mostly not necessary but you can kill/restart the user's window manager (or tell him to try to restart it with Ctrl+Alt+Backspace).



What options exist when all windows are hung? - znx - 2005-03-24


If its only one window.. one of the bests tools is: xkill. Simply type xkill and then click on the window that has died..... That's it.

 

It could be worth noting that not all X servers accept the Ctrl+Alt+Backspace, you can disable it. Ctrl+Alt+F1 (or F2 etc) can sometimes let you get access back to a terminal, again this can be disabled. If the keyboard is not responding then....

 

The next option is to ssh into the box (or telnet/rlogin etc) and use top to view the processes. X may not be the problem something else maybe hogging the processor. You normally shouldn't directly start killing processes, renice is a better option.

 

Investigation into the network would be next on the list. Check to view that lots of network activity isn't the problem.

 

After that I would begin to look into killing processes. Contact the user that is running the process, is it really needed? Can he run it at a less vital time?

 

Hopefully that gives you a wee bit more information...




What options exist when all windows are hung? - Shock Wave - 2005-03-24

Great, thanks for the replies. I'll look into some of those suggestions a little further on my own. Thanks again!



What options exist when all windows are hung? - znx - 2005-04-07


Something else crossed my mind on this. Killing the processes should never be an agressive step first. What I mean is that SIGHUP should be used before SIGKILL.

 

So:



Code:
kill -s HUP `pgrep badproc`




 

If the process fails to finish politely. Then step in with:

 



Code:
kill -s KILL `pgrep badproc`




 

That way you allow the process the chance to terminate on its on terms before just killing it.