最近发现原来还有这么个命令:
sosreport: 是个收集配置和诊断信息的命令,并且会在/var/tmp 下生成xz 文件。
命令如下:
-
#列出所有模块
-
sosreport -l
-
#不输入用户名,user information is obtained from the system RHN configuration files
-
sosreport --batch
-
#跳过某些模块
-
sosreport -n kvm,amd
-
#收集到的文件可以放在其他目录下
-
sosreport --tmp-dir /path/to/dir
具体的man了一下,发现命令的options 真多:
我发现-k 其实是config plugin option用的
-
OPTIONS
-
-l, --list-plugins
-
List all available plugins and their options. Plug-ins that would not be enabled by the current configuration are listed separately.
-
-
-n, --skip-plugins PLUGNAME[,PLUGNAME]
-
Disable the specified plugin(s). Multiple plug-ins may be specified by repeating the option or as a comma-separated list.
-
-
-e, --enable-plugins PLUGNAME[,PLUGNAME]
-
Enable the specified plugin(s). Multiple plug-ins may be specified by repeating the option or as a comma-separated list.
-
-
-o, --only-plugins PLUGNAME[,PLUGNAME]
-
Enable the specified plugin(s) only (all other plugins should be disabled). Multiple plugins may be specified by repeating the
-
option or as a comma-separated list.
-
-
-k PLUGNAME.PLUGOPT[=VALUE], --plugin-option=PLUGNAME.PLUGOPT[=VALUE]
-
Specify plug-in options. The option PLUGOPT is enabled, or set to the specified value in the plug-in PLUGNAME.
-
-
-a, --alloptions
-
Set all boolean options to True for all enabled plug-ins.
-
-
-v, --verbose
-
Increase logging verbosity. May be specified multiple times to enable additional debugging messages.
-
-
-q, --quiet
-
Only log fatal errors to stderr.
-
-
--no-report
-
Disable HTML/XML report writing.
-
-
--config-file CONFIG
-
Specify alternate configuration file.
-
-
-s, --sysroot SYSROOT
-
Specify an alternate root file system path. Useful for collecting reports from containers and images.
-
-
-c, --chroot {auto|always|never}
-
Set the chroot mode. When --sysroot is used commands default to executing with SYSROOT as the root directory (unless disabled by a
-
specific plugin). This can be overriden by setting --chroot to "always" (alwyas chroot) or "never" (always run in the host names‐
-
pace).
-
--tmp-dir DIRECTORY
-
Specify alternate temporary directory to copy data as well as the compressed report.
-
-
--list-profiles
-
Display a list of available profiles and the plugins that they enable.
-
-
-p, --profile NAME
-
Only run plugins that correspond to the given profile. Multple profiles may be specified as a comma-separated list; the set of plug‐
-
ins executed is the union of each of the profile
另外,还有个工具叫sos-analyzer,是analyze sosreport 生成的包的。
两个命令都在github上:
sosreport:
sos-analyzer:参考资料:
阅读(1534) | 评论(0) | 转发(0) |