17.7. 使用 failure_action 参数
failure_action 参数指定在内核崩溃时转储失败时要执行的操作。failure_action 的默认操作是 重启 系统。
参数接受以下要执行的操作:
reboot- 转储失败后重启系统。
dump_to_rootfs- 当配置了非 root 转储目标时,将转储文件保存在 root 文件系统上。
halt- 关闭系统。
poweroff- 停止系统上正在运行的操作。
shell-
在
initramfs中启动 shell 会话,您可以从中手动执行其他恢复操作。
流程
要将操作配置为在转储失败时执行的操作,请编辑
/etc/kdump.conf文件并指定其中一个failure_action选项:-
failure_action reboot -
failure_action halt -
failure_action poweroff -
failure_action shell -
failure_action dump_to_rootfs
-
重启
kdump服务,以使更改生效。kdumpctl restart
# kdumpctl restartCopy to Clipboard Copied! Toggle word wrap Toggle overflow