zoukankan      html  css  js  c++  java
  • 如何设置linux在出现kernel panic后自动重启 (ZT)

    Automatic reboot after Linux kernel panic

    http://www.syn-ack.org/centos-linux/automatic-reboot-after-linux-kernel-panic/

    Kernel panics for all sorts of reasons. Both hardware failures and software failures. It is always important to investigate the reason for the kernel panic so you can resolve it. However, sometimes system update is critical and you want the system to reboot automatically after a kernel panic. Luckily this is very easy to achieve.

    Before you configure automatic reboots after kernel panics

    Before you go ahead and configure automatic reboots take note of the following: make sure you are aware when kernel panics occur, and when they do make sure you investigate the reason why it happens.

    Make sure you are aware of kernel panics

    When the system doesn’t automatically reboot it’s quite easy to discover a kernel panic: the system simply doesn’t respond anymore. However when the system automatically reboots it gets quite a bit harder. Make sure you set-up appropriate logging for this.

    Always investigate the issue

    Getting the system back online is not a reason for not investigating the issue. Although the downtime is limited, it still takes a couple of minutes to reboot the system. Kernel panics may happen anytime, and they tend to happen especially during high traffic peaks. Don’t ignore the kernel panic but research and resolve the problem.

    Configure automatic reboots in /etc/sysctl.conf

    To set-up automatic reboots after kernel panic, simply add the following lines to your /etc/sysctl.conf file:

    # Kernel panic reboot
    kernel.panic = 10

    This setting tells the system to reboot in 10 seconds after a kernel panic.

    Refresh the /etc/sysctl.conf file

    After you’ve made the change make sure you tell the system to re-read its sysctl config by issueing:

    sysctl -p

    That’s all! From now your system will automatically reboot after a kernel panic.

  • 相关阅读:
    骑士飞行棋 C#代码详解
    C#中的static静态变量的用法
    Break和Continue的一些注意事项
    枚举类型
    html 01-认识Web和Web标准
    css 17-CSS3的常见边框汇总
    css 16-浏览器的兼容性问题
    css 15-Sass入门
    css 14-CSS3属性详解:Web字体
    css 13-CSS3属性:Flex布局图文详解
  • 原文地址:https://www.cnblogs.com/cqubityj/p/3296364.html
Copyright © 2011-2022 走看看