模拟主机故障
非官方测试版翻译
本页面由 PageTurner AI 翻译(测试版)。未经项目官方认可。 发现错误? 报告问题 →
本文档介绍如何使用 Chaosd 模拟主机关机故障。
查看主机关机实验的帮助信息
创建故障实验前,您可运行以下命令查看主机关机实验的帮助信息:
chaosd attack host shutdown -h
输出如下:
shutdowns system, this action will trigger shutdown of the host machine
Usage:
chaosd attack host shutdown [flags]
Flags:
-h, --help help for shutdown
Global Flags:
--log-level string the log level of chaosd, the value can be 'debug', 'info', 'warn' and 'error'
创建主机关机实验
要创建主机关机实验,请运行以下命令:
chaosd attack host shutdown
示例输出如下:
chaosd attack host shutdown
Shutdown successfully, uid: 4bc9b74a-5fe2-4038-b4f3-09ae95b57694
执行此命令后,您的主机将在所有进程关闭后关机。