Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1288327
  • 博文数量: 297
  • 博客积分: 285
  • 博客等级: 二等列兵
  • 技术积分: 2996
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-06 22:04
个人简介

Linuxer, ex IBMer. GNU https://hmchzb19.github.io/

文章分类

全部博文(297)

文章存档

2020年(11)

2019年(15)

2018年(43)

2017年(79)

2016年(79)

2015年(58)

2014年(1)

2013年(8)

2012年(3)

分类: LINUX

2016-09-21 13:59:57

最近发现原来还有这么个命令:
sosreport: 是个收集配置和诊断信息的命令,并且会在/var/tmp 下生成xz 文件。

命令如下:

点击(此处)折叠或打开

  1. #列出所有模块
  2. sosreport -l
  3. #不输入用户名,user information is obtained from the system RHN configuration files
  4. sosreport --batch
  5. #跳过某些模块
  6. sosreport -n kvm,amd
  7. #收集到的文件可以放在其他目录下
  8. sosreport --tmp-dir /path/to/dir
具体的man了一下,发现命令的options 真多: 
我发现-k 其实是config plugin option用的

点击(此处)折叠或打开

  1. OPTIONS
  2.        -l, --list-plugins
  3.               List all available plugins and their options. Plug-ins that would not be enabled by the current configuration are listed separately.

  4.        -n, --skip-plugins PLUGNAME[,PLUGNAME]
  5.               Disable the specified plugin(s). Multiple plug-ins may be specified by repeating the option or as a comma-separated list.

  6.        -e, --enable-plugins PLUGNAME[,PLUGNAME]
  7.               Enable the specified plugin(s). Multiple plug-ins may be specified by repeating the option or as a comma-separated list.

  8.        -o, --only-plugins PLUGNAME[,PLUGNAME]
  9.               Enable the specified plugin(s) only (all other plugins should be disabled). Multiple plugins may be specified by repeating the
  10.               option or as a comma-separated list.

  11.        -k PLUGNAME.PLUGOPT[=VALUE], --plugin-option=PLUGNAME.PLUGOPT[=VALUE]
  12.               Specify plug-in options. The option PLUGOPT is enabled, or set to the specified value in the plug-in PLUGNAME.

  13.        -a, --alloptions
  14.               Set all boolean options to True for all enabled plug-ins.

  15.        -v, --verbose
  16.               Increase logging verbosity. May be specified multiple times to enable additional debugging messages.

  17.        -q, --quiet
  18.               Only log fatal errors to stderr.

  19.        --no-report
  20.               Disable HTML/XML report writing.

  21.        --config-file CONFIG
  22.               Specify alternate configuration file.

  23.        -s, --sysroot SYSROOT
  24.               Specify an alternate root file system path. Useful for collecting reports from containers and images.

  25.        -c, --chroot {auto|always|never}
  26.               Set the chroot mode. When --sysroot is used commands default to executing with SYSROOT as the root directory (unless disabled by a
  27.               specific plugin). This can be overriden by setting --chroot to "always" (alwyas chroot) or "never" (always run in the host names‐
  28.               pace).
  29.        --tmp-dir DIRECTORY
  30.               Specify alternate temporary directory to copy data as well as the compressed report.

  31.        --list-profiles
  32.               Display a list of available profiles and the plugins that they enable.

  33.        -p, --profile NAME
  34.               Only run plugins that correspond to the given profile. Multple profiles may be specified as a comma-separated list; the set of plug‐
  35.               ins executed is the union of each of the profile
另外,还有个工具叫sos-analyzer,是analyze sosreport 生成的包的。 
两个命令都在github上:
sosreport: https://github.com/sosreport/sos
sos-analyzer:https://github.com/ssato/sos-analyzer
参考资料:https://access.redhat.com/solutions/3592
阅读(692) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~