Diagnosing a hang
The first thing is to determine how hard hang or crash it is. Levels of hang:
- Display is frozen or garbage. Everything else works, including typing commands blindly. If X was not running, starting X may restore the display.
- Display is frozen in X, but mouse cursor moves.
- Display is frozen, no reaction at all to key presses or mouse. NumLock etc. keyboard lights do not react.
- Ssh-connection dies.
- Serial terminal connection dies.
- Machine does not respond to ping.
- SysRq-keys cannot sync disks. Logs are not written to disk.
- SysRq-keys (SysRq-reboot) do not work at all.
- Netconsole fails to deliver kernel messages
- Serial terminal fails to deliver messages.
- Firescope fails.
- Completely dead: display, keyboard and other input devices, network, serial port, IEEE1394. Have to press reset button.
- Reset button does not help, machine will not boot. Have to disconnect power (batteries) for a few minutes.
- It's dead, Jim. This is just a rough list of various things that may work or not. A level of hang usually includes all the symptoms above it. Some criteria need another computer or special hardware (serial console), or special software on an external computer (firescope).
How to try and get kernel messages
- mounting the partition, where system logs are written, with
- ssh, requires network.
- netconsole, requires another local computer and a network.
- serial console, requires a serial port, and either an actual serial console, or preferably another computer with a serial port and a null-modem cable. Usb-serial dongles usually fail on the crashing machine.
- firescope, requires a special program to read the kernel log buffer via IEEE1394 interface (firewire). Both computers need a IEEE1394 port, and a cable.
- kdump: on crash, kexec an emergency kernel to save the kernel log buffer. Instructions?