Linux操作系统如何查找死机原因.doc
Linux操作系统如何查找死机原因
How does the Linux operating system find the cause of death?
Although the Linux kernel is known as the,,undead,,> it rarely crashes or crashes, but in special cases, there is a certain chance that it will go down? Because Linux is widely used in the production environment, every outage can cause considerable damage? It uptime reaches hundreds of days and maybe you,re used to it, but just down a dozen seconds, you're in a hurry. It's really hard to imagine what happens to the stock exchange? Maybe the whole country will fall out? So we need a little bit of tricks to find the cause of the crash, so we can avoid a crash or a kernel crash?(the Windows sky blue screen doesn,t feel like it's numb, too.)
Note: the following methods may not apply to server because there is a significant difference between the desktop environment and server?
X crash
In fact, the Linux kernel is rarely wrong, and the "dead machines〃 we encounter are the illusion of an x no response? So what happens when x doesn,t respond?
Usually is CTRL + Alt + F7 (F8) to switch to a tty, then use the root login, perform the top view, eat the most resources and then use the pkill/kill/killall command to kill the program. Or use the combination key Ctrl + Alt + Backspace to restart
If the occasional switch fails or doesn't respond, try using SSH to log onto the computer and kill the program? Maybe just x doesn't respond, and the kernel and SSH daemon still work, so you can implement this method.
Arch configuration SSH daemon:
[arch] sets SSIID
What if x doesn,t give force, the various methods try to invalidate, and there's no way to SSH into the PC? Don,t worry, we have a 〃reisub〃 * * *. However, the kernel sysrq capability (via) is activated before enabling? Execution of the system: echo "1〃 > / proc/sys/kernel/sysrq or modify /etc/sysct.conf file, set kerne1. sysrq 二 1. When the system is abnormal, press Alt + sysrq + {reisub} and the system will restart automatically, (for sysrq: what if