如何设置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.
如何设置linux在出现kernel panic后自动重启 (ZT)的更多相关文章
- 监控windows服务,当服务停止后自动重启服务
近期花时间研究了一下windows和linux下某服务停了后自动重启的功能,在网上收集了些资料,并经过测试,在此整理一下.这里介绍的是windows服务的监控,是通过批处理来实现的.本例是监控wind ...
- linux上监控tomcat down掉后自动重启tomcat
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px "Helvetica Neue"; color: #454545 } p. ...
- Linux之systemd服务配置及自动重启
layout: post title: Linux之systemd服务配置及自动重启 date: 2019-09-09 tags: linux --- Linux之systemd服务配置及自动重启 0 ...
- Java线程监听,意外退出线程后自动重启
Java线程监听,意外退出线程后自动重启 某日,天朗气清,回公司,未到9点,刷微博,顿觉问题泛滥,惊恐万分! 前一天写了一个微博爬行程序,主要工作原理就是每隔2分钟爬行一次微博,获取某N个关注朋友微博 ...
- 001windows已遇到一个关键性问题 一分钟后自动重启
重装了系统Window7,出现了如题的提示"windows已遇到一个关键性问题 一分钟后自动重启" 查找原因: 通过事件管理器可以查看如上提示遇到的问题.一般是因为一些系统的服务没 ...
- py脚本修改后自动重启
在用socket.io, pika之类启动一个脚本死循环做server或者client的时候: 1脚本被编辑之后,是不会自动重启 2当代码报错的时候,会立即退出, 只能手动重新运行 python ap ...
- Linux启动提示Kernel panic - not syncing: Attempted to kill init解决办法
系统类型:CentOS 6.5(x64) 启动提示:Kernel panic - not syncing: Attempted to kill init 解决办法: 系统启动的时候,按下‘e’键进入g ...
- linux下监视进程 崩溃挂掉后自动重启的shell脚本
如何保证服务一直运行?如何保证即使服务挂掉了也能自动重启?在写服务程序时经常会碰到这样的问题.在Linux系统中,强大的shell就可以很灵活的处理这样的事务. 下面的shell通过一个while-d ...
- FreeBSD关机后自动重启的解决办法
我用的是华硕的笔记本电脑,不知道别的电脑有没有这个情况,按handbook关机指令为shutdown -p now,但是我执行这个指令后电脑却自动重启,用Linux关机指令shutdown -h no ...
随机推荐
- HDU 4004 The Frog's Games(2011年大连网络赛 D 二分+贪心)
其实这个题呢,大白书上面有经典解法 题意是青蛙要跳过长为L的河,河上有n块石头,青蛙最多只能跳m次且只能跳到石头或者对面.问你青蛙可以跳的最远距离的最小值是多大 典型的最大值最小化问题,解法就是贪心 ...
- Codeforces 869C The Intriguing Obsession:组合数 or dp
题目链接:http://codeforces.com/problemset/problem/869/C 题意: 红色.蓝色.紫色的小岛分别有a,b,c个. 你可以在两个不同的岛之间架桥,桥的长度为1. ...
- 解决 Amoeba连接mysql出错 解决方案
今天配置mysql的主从复制 用到了Amoeba.从安装到启动服务,我深深地体会到学运维的不易. 首先是 安装错误 的解决,连接错误 的兄弟可以直接往下拉. 安装错误 1.出现 JAVA_HOM ...
- JSON 在JavaScript 中的应用及自己的理解
[对象和json]JSON:JavaScript 对象表示法(JavaScript Object Notation).JSON 是存储和交换文本信息的语法.类似 XML.JSON是一种数据格式,不是一 ...
- 使用memcache 心得和注意事项
内存分配机制:首先要说明的是Memcached支持最大的存储对象为1M.它的内存分配比较特殊,但是这样的分配方式其实也是对于性能考虑的,简单的分配机制可以更容易回收再分配,节省对于CPU的使用.这里用 ...
- 利用selenium爬取豆瓣电影Top250
这几天在学习selenium,顺便用selenium + python写了一个比较简陋的爬虫,现附上源码,有时间再补充补充: from selenium import webdriver from s ...
- Wannafly挑战赛4 B,小AA的数列
题意:求子区间异或和,要求区间长度在l到r之间,并且为偶数 题解:对于每一位算贡献,可以分奇偶来记录,计算的时候只加上奇偶性相同的就保证了为偶数,从大于l的点开始每次++,从大于r的点每次--,记录二 ...
- Oracle删除步骤
1.Oracle卸载要求比较严格,不能简单的卸载就完事了:当然Oracle卸载也没有那么难,只是步骤比较多.Oracle10g还是Oracle11g卸载步骤都是一样的.下边详细介绍一下. 找到Orac ...
- sklearn.preprocessing.StandardScaler 离线使用 不使用pickle如何做
Having said that, you can query sklearn.preprocessing.StandardScaler for the fit parameters: scale_ ...
- MySQL 各种引擎
数据库中的存储引擎其实是对使用了InnoDB.HEAP(也称为MEMORY).CSV.BLACKHOLE(黑洞引擎).ARCHIVE.PERFORMANCE_SCHEMA. Berkeley.Merg ...