Linux system computer crashes the cause of failure

  


The system crashes and is generally divided into two situations: one is a hardware problem; the other is a software problem.

First, hardware problems

You can consider the following points:

1, do not overclock the CPU, if you have overclocked, first return to the original frequency

Although there is no problem in normal operation, it may cause unpredictable failures in high-load use. In particular, in some applications, the Linux system can maximize the performance of the hardware, but such hardware running Windows may be no problem.

2. Confirm that the power supply is sufficient.

It must be ensured that the power supply can meet the load under high load conditions.

3, use memtest86 to check the memory status

4, restore the BIOS to the default state

For the server, you can use the built-in monitoring tool to test, is also a good row Wrong method.

Second, the software problem

If the hardware problem has been basically eliminated, then we must consider the system information from the software to obtain the state of the crash.

1. If the luck is good enough, the system crash may not be completely dead (the keyboard may still respond), then we can use the Sysrq method.

The premise is that we must first open the sysrq function:

#echo "1" > /proc/sys/kernel/sysrq#setterm -blank

When there is a problem with the system, we can use:

Reference

Alt+Sysrq-T Get process system stack information

Alt+Sysrq-M Get memory allocation information

Alt+Sysrq-W Get current register information

For more hotkeys, refer to /usr/src/linux/Documentaion/sysrq.txt on the system

where setterm -blank can turn off the black screen protection under the character, which is convenient for recording screen information.

2, in order to make the screen display more kernel debugging information, you can modify the console display mode to 80x25, in the /ker/grub/menu.lst corresponding kernel line and finally add vga=0x305, Such as:

Reference

kernel /boot/vmlinuz-2.4.21-9.30AXsmp ro root=/LABEL=/1 vga=0x305

3, in case keyboard Unfortunately, we can only use the serial port method to send the system information to another system. Method:

Modify the /boot/grub/menu.lst file and add the core parameters at the end of the kernel line. "console=ttyS0 console=tty1", for example:

Reference

kernel /boot/grub/vmlinuz-2.4.21-9.30AXsmp ro root=/LABEL=/1 console=ttyS0 Console=tty1

Then, modify /etc/sysconfig/syslog and add the klogd option "-c 7", for example:

Reference

KLOGD_OPTIONS="-x -c 7"


Restart the server; test:

1) Connect the client and server using a serial direct cable and run it on the client:

cat /dev/ttyS0

Run on the server:

echo hi > /dev/ttyS0

If the client has a "hi" output.

2) Run on the server:

echo w > /proc/sysrq-trigger

See if there is corresponding kernel information output on the client

3) Run on the server:

modprobe loop

See if there is a corresponding kernel information output on the client

If the tests pass, then run on the client:

cat /dev/ttyS0

Copyright © Windows knowledge All Rights Reserved