When working with remote servers in exceptional cases, especially if there is no access to IPKVM, it can be difficult to access the server if a Linux kernel error occurs.
If the server is configured by default, if there is a Kernel panic error, the operating system stops working with a message on the monitor screen and wait until the system is turned off or restarted by the administrator.
This behavior of a remote server or server without the ability to access the server outside of working hours is undesirable at Kernel panic. Therefore, we configure the system so that if a Kernel panic error occurs, the server automatically restarts itself.
In Linux, the configuration is done using procfsThe command must be executed:
echo 5 > /proc/sys/kernel/panic
In order for the changes to be saved when restarting, you need to add to the configuration file. /etc/sysctl.conf line:
vi /etc/sysctl.conf kernel.panic=5
Or by executing the command:
echo 'kernel.panic=5' >> /etc/sysctl.conf
5 This is the number of seconds after which the server will restart if the Kernel panic error is set at 0, then the server will wait for the administrator to reboot or turn off the server.
To apply changes from the file /etc/sysctl.conf The command must be executed:
sysctl -p
The task was completed, with you it was Sergey Lazarenko.



comment