What should I do if linux crashes?

Source: Internet
Author: User

Will Linux Crash? Yes, I'm sure! How? It is easy to let Linux Crash, but the hard thing is how to safely remove it from the dead state after the crash.

There are many cases of Linux crashes. The most common problem is that the system load is too high. The fork bomb works in this way. In addition, it can run programs that consume a lot of memory, such as virtual machines. If the system load is too high, the card will die. The faster the solution, the better! At this point, you must remember that you can no longer rely on any graphical interface, such as Gnome's system monitor, which is a foolish Habit left over from Windows ......), This will only aggravate this stuck situation. What should we do?

Don't be afraid. Linux didn't need a graphical interface at first, because it has a very powerful text interface. By Ctrl-Alt-F1F1-F6 in general), and then wait for a while, will switch to tty, that is, the so-called text interface. In this case, you need to log on with your username and password. Note: The keyboard input speed may be slow, but it should be tolerable. Enter top and press enter at the end of the prompt. A dynamic table is displayed, which lists the processes that consume the most resources. Refresh it once or twice, press q to exit, and then enter kill. You can see the PID in top. At this time, it should be much faster. If you find that it has not ended successfully, enter kill-KILL again. This time it will basically be okay.

In addition to the above situation, some underlying software bugs may also cause some strange crashes. Recently, some of my colleagues force the ext4 partition to be hurt due to an inexplicable force restart on the crash. Finally, sysreccd is fixed, and it seems that the partition table is partially damaged.) according to the report, the mouse and keyboard are unresponsive when the system crashes. In general, crashes caused by high system loads may also respond to the terrible keyboard. Some people say that if the system crashes to the keyboard and does not respond, "the load is infinite ", some people also say that this may be caused by problems in the combination of X Server and driver. But what should we do if this happens?

OK. This is the method that we learned today, called reisub. This method can be used to safely restart the computer in various situations. You can find a key called "Sys Rq" on the keyboard. On the keyboard of the platform, the key is usually used together with the Prt SC, and may be in another location in the notebook, such as Delete. Take a Taiwan machine as an example. to use this method, press Alt-Print (Sys Rq), and then press the keys reisub in sequence. After pressing the keys, the system restarts.

The following explains this method: in fact, Sys Rq is a kind of thing called a system request. Holding down Alt-Print is equivalent to holding down the Sys Rq key, at this time, everything input will be processed directly by the Linux kernel, which can perform many low-level operations. At this time, each letter in the reisub is an independent operation, which indicates:

UnRaw grabs the keyboard control from X Server

TErminate sends SIGTERM signals to all processes so that they can solve the problem on their own.

KIll sends a SIGKILL signal to all processes and forces them to close immediately

Sync synchronizes all data to the disk

Unmount: Mount all partitions in read-only mode.

ReBoot restart

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.