" 目录:RHCA+ -> 15 硬件管理 -> 5 sosreport(收集诊断文档) "

收集系统配置及架构信息并输出诊断文档;语法格式:sosreport
若买了服务,可将生成的文件发给红帽分析系统问题
一、安装
root@wuzuniao \~# yum -y install sos #安装工具
二、使用
root@wuzuniao \~# sosreport #收集诊断文档
sosreport (version 3.6)
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/sos.iaefpgxy 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.
按 ENTER 键继续,或者 CTRL-C 组合键退出。
Please enter the case id that you are generating this report for \[\]: #回车就会开始收集
Setting up archive ...
Setting up plugins ...
Running plugins. Please wait ...
Finishing plugins Running: yum anager]
Finished running plugins
生成压缩归档......
Your sosreport has been generated and saved in:
/var/tmp/sosreport-wuzuniao-2025-07-03-sjrpata.tar.xz
The checksum is: 86b31396881f058378123dd4cf21c88c
Please send this file to your support representative.
root@wuzuniao \~# cd /var/tmp/ #到临时目录下
root@wuzuniao tmp# ll /var/tmp/ #查看生成的压缩文件
总用量 5924
-rw-------. 1 root root 6061132 7月 3 11:34 sosreport-wuzuniao-2025-07-03-sjrpata.tar.xz
-rw-r--r--. 1 root root 33 7月 3 11:34 sosreport-wuzuniao-2025-07-03-sjrpata.tar.xz.md5
root@wuzuniao tmp# tar -Jxf /var/tmp/sosreport-wuzuniao-2025-07-03-sjrpata.tar.xz #解压所收集的压缩包
root@wuzuniao tmp# cd sosreport-wuzuniao-2025-07-03-sjrpata/ #进入压缩包目录内
root@wuzuniao sosreport-wuzuniao-2025-07-03-sjrpata# ll #查看所收集的所有信息
总用量 24
dr-xr-xr-x. 4 root root 33 11月 18 2023 boot
lrwxrwxrwx. 1 root root 38 7月 3 11:34 chkconfig -> sos_commands/services/chkconfig_--list
lrwxrwxrwx. 1 root root 22 7月 3 11:34 date -> sos_commands/date/date
drwxr-xr-x. 2 root root 18 7月 3 10:20 dev
lrwxrwxrwx. 1 root root 37 7月 3 11:34 df -> sos_commands/filesys/df_-al_-x_autofs
lrwxrwxrwx. 1 root root 31 7月 3 11:34 dmidecode -> sos_commands/hardware/dmidecode
drwxr-xr-x. 50 root root 4096 7月 3 11:05 etc
lrwxrwxrwx. 1 root root 24 7月 3 11:34 free -> sos_commands/memory/free
lrwxrwxrwx. 1 root root 26 7月 3 11:34 hostname -> sos_commands/host/hostname
lrwxrwxrwx. 1 root root 130 7月 3 11:34 installed-rpms -> sos_commands/rpm/sh_-c_rpm_--nodigest_-qa_--qf_NAME_-VERSION-RELEASE.ARCH_INSTALLTIME_date_awk-F_printf_-59s_s_n_1_2_sort_-V
lrwxrwxrwx. 1 root root 34 7月 3 11:34 ip_addr -> sos_commands/networking/ip_-o_addr
lrwxrwxrwx. 1 root root 45 7月 3 11:34 java -> sos_commands/java/alternatives_--display_java
lrwxrwxrwx. 1 root root 22 7月 3 11:34 last -> sos_commands/last/last
lrwxrwxrwx. 1 root root 7 6月 23 22:07 lib -> usr/lib
lrwxrwxrwx. 1 root root 32 7月 3 11:34 lsb-release -> sos_commands/release/lsb_release
lrwxrwxrwx. 1 root root 25 7月 3 11:34 lsmod -> sos_commands/kernel/lsmod
lrwxrwxrwx. 1 root root 39 7月 3 11:34 lsof -> sos_commands/process/lsof_-b_M_-n_-l_-c
lrwxrwxrwx. 1 root root 28 7月 3 11:34 lspci -> sos_commands/pci/lspci_-nnvv
lrwxrwxrwx. 1 root root 29 7月 3 11:34 mount -> sos_commands/filesys/mount_-l
lrwxrwxrwx. 1 root root 41 7月 3 11:34 netstat -> sos_commands/networking/netstat_-W_-neopa
dr-xr-xr-x. 292 root root 8192 7月 3 10:20 proc
lrwxrwxrwx. 1 root root 30 7月 3 11:34 ps -> sos_commands/process/ps_auxwww
lrwxrwxrwx. 1 root root 27 7月 3 11:34 pstree -> sos_commands/process/pstree
dr-xr-x---. 2 root root 29 7月 3 10:20 root
lrwxrwxrwx. 1 root root 32 7月 3 11:34 route -> sos_commands/networking/route_-n
drwxr-xr-x. 4 root root 36 7月 3 11:34 run
drwxr-xr-x. 77 root root 4096 7月 3 11:34 sos_commands
drwxr-xr-x. 2 root root 35 7月 3 11:34 sos_logs
drwxr-xr-x. 2 root root 37 7月 3 11:34 sos_reports
drwx------. 4 root root 36 7月 3 11:34 sos_strings
dr-xr-xr-x. 10 root root 112 7月 3 10:20 sys
lrwxrwxrwx. 1 root root 28 7月 3 11:34 uname -> sos_commands/kernel/uname_-a
lrwxrwxrwx. 1 root root 24 7月 3 11:34 uptime -> sos_commands/host/uptime
drwxr-xr-x. 4 root root 30 11月 18 2023 usr
drwxr-xr-x. 5 root root 54 6月 23 23:02 var
-rw-r--r--. 1 root root 1964 7月 3 11:34 version.txt
lrwxrwxrwx. 1 root root 62 7月 3 11:34 vgdisplay -> sos_commands/lvm2/vgdisplay_-vv_--config_global_locking_type_0
root@wuzuniao sosreport-wuzuniao-2025-07-03-sjrpata# cat installed-rpms #查看系统中已安装的软件包
GConf2-3.2.6-22.el8.x86_64 Sat Nov 18 07:00:26 2023
ModemManager-1.8.0-1.el8.x86_64 Sat Nov 18 07:00:36 2023
ModemManager-glib-1.8.0-1.el8.x86_64 Sat Nov 18 07:00:20 2023
NetworkManager-1.14.0-14.el8.x86_64 Sat Nov 18 07:00:19 2023
NetworkManager-adsl-1.14.0-14.el8.x86_64 Sat Nov 18 07:01:58 2023
NetworkManager-bluetooth-1.14.0-14.el8.x86_64 Sat Nov 18 07:01:57 2023
NetworkManager-config-server-1.14.0-14.el8.noarch Sat Nov 18 07:02:17 2023
NetworkManager-libnm-1.14.0-14.el8.x86_64 Sat Nov 18 07:00:19 2023
#大部分省略
root@wuzuniao sosreport-wuzuniao-2025-07-03-sjrpata# cd #返回家目录