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.

  • 相关阅读:
    模板模式
    简单实用的代理模式
    享元模式
    外观模式(人人都懂的设计模式)
    设计模式之组合模式,温故而知新。
    .net设计模式之装饰模式
    全选、反选
    There is a cycle in the hierarchy解决
    JSONObject、JSONArray
    JsonMessageView工具类
  • 原文地址:https://www.cnblogs.com/cqubityj/p/3296364.html
Copyright © 2011-2022 走看看