Thursday, April 17, 2008

When Linux Crashes

Ok, Linux users are always joking about Windows frequent crashes and the infamous BSOD (Blue Screen of Death) - however, sometimes... every now and then... the unthinkable happens: an application freezes on LINUX!

I came across these tips as I was moving my /home to a new partition.

So, what should you do when it happens? Should you immediately reach for the reset button? Should you panic and start screaming?

Well, here's the proper course of action to handle it:
  1. Get a command line terminal and type “ps -A” to list the active running processes, take note of the Process ID (PID) of the guilty frozen app, and kill it using “kill PID”.

  2. If you're lazy, try “killall” for example, “killall firefox-bin”

  3. If even your window manager is frozen, and you can't use the menus to bring up the terminal windows, then press CTRL-ALT-F1. This will take you to another terminal, and virtually a whole new session. From there kill the culprit app using step 1 and 2.

  4. You can also try restarting your GUI (graphic user interface) using the CTRL-ALT-Backspace key combination. Though this will kill the apps currently running on the GUI.

  5. Invoke CTRL-ALT-F1 and do CTRL+ALT+DEL from there. This will perform a standard and orderly reboot.

  6. Oh oh... nothing worked? Then, the final and last attempt before pressing the reset button is to try and Raise a Skinny Elephant.
Here is how you "raise the elephant", from the Mnemonic:
Raising Skinny Elephants Is Utterly Boring

Alt+SysRq+r ( The LEFT Alt key ) ( SysRq is on the same button as print screen )
Alt+SysRq+s
Alt+SysRq+e
Alt+SysRq+i
Alt+SysRq+u
Alt+SysRq+b

(Giving it a little time between keystrokes.)

The r puts keyboard in raw mode
The s for sync the disk
The e for terminate all processes
The i for kill all processes
The u for remount all filesystems read only
The b for reboot the system


Hope that will be of help.

No comments:

Post a Comment

Related Posts with Thumbnails

Amazon Store