ubuntu 12.04 configure the kernel crash to automatically restart and dump

By default, ubuntu12.04 does not configure the automatic restart and dump of kernel crashes. When a kernel crash occurs, there is no core dump file to analyze, and it is stuck on the kernel crash interface. In order to find the cause of the kernel crash, you need to configure the automatic restart of the kernel crash. And kernel dump configuration, the configuration steps are as follows:

The first step is to configure the kernel to restart automatically when it crashes

Add kernel.panic to the kernel parameter, 10 means the system will automatically restart after 10 seconds of kernel crash

vi /etc/sysctl.conf 
kernel.panic =10

The second step is to verify whether the automatic restart mechanism takes effect, and sysrq needs to be configured

Add kernel.sysrq to the kernel parameters, 1 is effective

vi /etc/sysctl.conf 
kernel.sysrq =1

Run the command to make the configured parameters take effect, or restart the system

sysctl -p /etc/sysctl.conf

Check whether the configured parameters are valid

Simulate system kernel crash, press alt+sysrq+c at the same time, or run the following command

echo c  >/proc/sysrq

Watch to see the kernel crash, and count down to restart

The third step is to configure kernel dump

The newly installed system needs to be upgraded, otherwise the software cannot be installed through apt-get

apt-get update
Install kernel dump
sudo apt-get install linux-crashdump
Check whether it works


Test, simulate system kernel crash, press alt at the same time+sysrq+c three keys, or run the following command
It was found that the system crashed and got stuck, did not send or save, and did not restart!

After searching for information, sending such a situation may be related to the core dump memory configuration is not enough, so the core dum memory configuration is modified

Modified to 512M size

Regenerate grub.cfg

Test again and succeed.

Recommended Posts

ubuntu 12.04 configure the kernel crash to automatically restart and dump
ubuntu16.04 method steps to upgrade the kernel
How to install and configure NATS on Ubuntu 16.04
How to install and configure Gogs on Ubuntu 18.04
How to install and configure Cyberpanel on Ubuntu 18.04
How to install and configure ownCloud on Ubuntu 16.04
How to install and configure GitLab on Ubuntu 18.04
How to install and configure Ansible on Ubuntu 18.04
How to install and configure Elasticsearch on Ubuntu 16.04
How to install and configure PostGIS on Ubuntu 14.04
How to install and configure VNC on Ubuntu 18.04
How to install and configure OrientDB on Ubuntu 14.04
How to install and configure AppScale on Ubuntu 12.04
How to install and configure PostGIS on Ubuntu 14.04
Embedded Linux development environment to build and configure Ubuntu
Detailed steps to configure Ubuntu 16.04 and Apache virtual host
Xshell and Xftp fail to connect to the virtual machine Ubuntu
ubuntu install and configure GitLab
Find the kernel source code corresponding to the running Ubuntu version
Detailed steps to automatically set the line number in ubuntu16.04
Ubuntu basic settings: introduction to the installation and use of openssh-server
The difference between CentOS and Ubuntu
Install and configure MySQL on Ubuntu
Install and configure Docker in Ubuntu
Step by step teach you how to open and close the ubuntu firewall
How to configure Redis cluster on Ubuntu 14.04
Ubuntu modified the default sh to bash
The relationship between Open3D version and Ubuntu
How to install Ubuntu20.04 and install NVIDIA driver
How to modify the hostname on Ubuntu 20.04
Configure node js and npm under Ubuntu 14.04