分类: LINUX
2011-06-13 13:47:31
If your system crashes at random intervals, perform a first before filing any bug reports or support requests
Try to reproduce the crash on a text console (Control+Alt+F1) if possible. If the crash occurs during startup, select therecovery mode option to disable the splash screen
When the crash occurs, press Alt+SysRq+1 (one, not L) followed by Alt+SysRq+t. If using a text console, you should see a trace dumped to the screen. If the system is sufficiently alive, it will also be logged to /var/log/kern.log and visible in the output from dmesg. This information shows where the crash occurred, and should be included in any problem reports. If the output is not saved in any file, or the system is so bad off that you cannot retrieve it, you can either take a digital photo, or hand write the results. Almost all of the output is important (so please don't copy the one line you think is important, because context means everything).
For a full list of Alt+SysRq options, see the kernel documentation.
Some crashes, in particular those involving the X server, are impossible to reproduce on the text console. The best way is then to use a second computer from which you can log in to the "sick" machine using ssh.
Find the IP address of the sick machine, for instance by running ip addr. If both machines are running Ubuntu 7.04 or MacOSX, you can use the machine name (e.g. mycomputer.local) instead of the IP address.
Connect to the sick machine, for instance ssh myuser@192.168.1.3
Inside the ssh session, run sudo cat /proc/kmsg
Optionally start a second ssh session to run for instance tail -f /var/log/syslog or other commands. You can emulate the above SysRq key presses, for instance the Alt+SysRq+t combination, by running echo t | sudo tee /proc/sysrq-trigger
If the X server crashes (you're thrown back to the login screen, or screen goes black or frozen but there is activity "below") see. See if just a program and not the whole system is crashing.
Comments: I would recommend entering the Bios and changing the settings to default/fail safe. After troubleshooting strange video crashes on my computer for 2 weeks it turned out it was the AGP settings in the BIOS.