Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What options exist when all windows are hung?
#1

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?

Reply
#2
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).
Reply
#3

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...

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

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.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)