blade check
本文档主要介绍blade check
命令使用
Usage
该命令主要用于Linux主机上演练实验时,对主机环境进行校验,判断其是否满足chaosblade实验环境
Usage:
blade check
blade check [command]
Aliases:
check, k
blade check [target] [action]
Description
该命令目前支持校验, Linux主机系统层场景和java场景 环境所需配置,如相关系统命令工具或java不存在时,可在演练执行前进行安装。
Exec
进入解压包本地所放置的路径,可通过./blade check -h
查看所有支持的target,目前支持两种
- OS:验证Linux主机系统层场景所需环境是否支持
- Java:验证Java应用层场景所需环境是否支持
[root@test chaosblade]# ./blade check -h
Check the environment for chaosblade
Usage:
blade check
blade check [command]
Aliases:
check, k
Examples:
check os
Available Commands:
java Check the environment of java for chaosblade
os Check the environment of os for chaosblade
Flags:
-h, --help help for check
Global Flags:
-d, --debug Set client to DEBUG mode
Use "blade check [command] --help" for more information about a command.
可通过./blade check os -h
查看主机系统下具体演练实验场景,是否符合可以执行的条件。
[root@test chaosblade]# ./blade check os -h
Check the environment of os for chaosblade
Usage:
blade check os
blade check os [command]
Examples:
check os
Available Commands:
cpu Cpu experiment
disk Check disk experiment
men Mem experiment
network Network experiment
Flags:
-h, --help help for os
Global Flags:
-d, --debug Set client to DEBUG mode
Use "blade check os [command] --help" for more information about a command.
Examples
校验主机是否具备演练系统层场景cpu fullload
(cpu满载)的环境
[root@test chaosblade]# ./blade check os cpu fullload
校验主机是否具备演练所有系统层场景的环境
[root@test chaosblade]# ./blade check os
报错结果和对应处理方法
错误返回中的error信息 | 对应解释 | 相应处理方法 |
[failed] cpu fullload, failed! `taskset` command exists | taskset 命令不存在 |
|
[failed] men load, failed! `mount` command exists | mount 命令不存在 |
|
[failed] men load, failed! `umount` command exists | umount 命令不存在 |
|
[failed] men load, failed! `tc` command exists | tc 命令不存在 |
|
[failed] ****, failed! `iptables` command exists | iptables 命令不存在 |
|
[failed] ****, failed! `ss` command exists | ss 命令不存在 |
|