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.

  • 相关阅读:
    用户交互
    python简介
    maven阿里云镜像setting
    apache虚拟主机的ip用法 包括iis
    apache的虚拟主机配置和指定目录的访问描述(
    apache重定向301 配置,根域名转到www
    前端学习
    一步一步写jQuery插件
    json 和 table控件
    下载相关
  • 原文地址:https://www.cnblogs.com/cqubityj/p/3296364.html
Copyright © 2011-2022 走看看