sosreport命令用于收集系统配置及架构信息并输出诊断文档
2018年04月24日 15:05:55 凉风何处去 阅读数 1252
 要运行sosreport,需要安装sos 包。sos包是大多是linux的默认安装包中的一部分。如果因为某种原因没有安装,那么运行下面的yum命令来安装sos 包 :

  # yum install sos -y

生成报告

  打开终端输入sosreport命令:

  # sosreport

  这条命令正常情况下会在几分钟里完成。根据本地配置,在某些情况下,某些选项可能需要更长的时间才能完成。一旦完成,sosreport将在/ tmp目录目录中生成一个压缩文件。不同版本使用不同的压缩方案( gz,bz2,或xz)。该文件应提供给红帽的支持代表(在开放的情况下通常作为附件)。

  注意:sosreport需要root权限才能运行。

[root@linuxprobe ~]# sosreport
sosreport (version 3.0)
This command will collect diagnostic and configuration information from
this Red Hat Enterprise Linux system and installed applications.

An archive containing the collected information will be generated in
/var/tmp and may be provided to a Red Hat support representative.
Any information provided to Red Hat will be treated in accordance with
the published support policies at:

https://access.redhat.com/support/

The generated archive may contain data considered sensitive and its
content should be reviewed by the originating organization before being
passed to any third party.

No changes will be made to system configuration.
Press ENTER to continue, or CTRL-C to quit. 此处敲击回车来确认收集信息

Please enter your first initial and last name [linuxprobe.com]:此处敲击回车来确认主机编号
Please enter the case number that you are generating this report for:此处敲击回车来确认主机编号
Running plugins. Please wait ...
Running 70/70: yum...
Creating compressed archive...
Your sosreport has been generated and saved in:

/tmp/sosreport-iZuf66ojri88mynksjw6vjZ-20180424145944.tar.xz

The checksum is: 79436cdf791327040efde48c452c6322
Please send this file to your support representative.