1. 什么是 sos_report?
sos_report 是一个在众多 Linux 发行版中广泛使用的实用工具,包括但不限于 Red Hat、CentOS、Ubuntu、Debian、Fedora 及其各种衍生版本。这个工具的主要功能是收集系统的配置和诊断信息。
当你需要向 Red Hat 等官方技术支持团队寻求帮助时,sos_report 就显得尤为重要。技术支持团队会要求你提供服务器上的 sos_report,以便他们能够分析输出的数据,从而更有效地帮助你解决问题。
sos_report 收集的信息非常全面,包括但不限于:
运行中的内核版本。
已加载的内核模块。
系统和服务的配置文件。
诊断命令的输出结果。
安装在系统中的软件包列表。
2. 如何安装 sos 软件包?
要使用 sos_report,首先需要确保你拥有 root 权限。以下是在基于 RPM 的系统中(如 Red Hat、CentOS)安装 sos 的命令:
[root@server ~]# yum install sos
3. 如何从命令行生成 sos 报告
3.1 先决条件:
确保 sos 软件包已经安装在你的系统上。
你需要具备 root 权限来执行生成报告的操作。
3.2 生成sos报告
运行以下命令来生成 sos 报告,并按照屏幕上的指示进行操作:
$ sudo sos report
生成的报告文件将被保存在 /var/tmp/ 目录下,文件名通常包含日期和时间戳。例如:
...
Finished running plugins
Creating compressed archive...
Your sos report has been generated and saved in:
/var/tmp/sosreport-server1-12345678-2024-07-17-qmtnqng.tar.xz
Size 16.51MiB
Owner root
sha256 bf303917b689b13f0c059116d9ca55e341d5fadcd3f1473bef7299c4ad2a7f4f
Please send this file to your support representative.
报告文件的大小和哈希值也会在控制台输出中显示。请记录下这些信息,因为它们对于技术支持团队来说是必要的。
3.3 sos 报告处理敏感信息
在某些情况下,你可能不希望在发送报告时泄露敏感信息,如用户名、主机名、IP 或 MAC 地址。为此,sos 实用程序提供了一个 sos clean 命令,该命令可以对报告中的敏感数据进行处理。
使用以下命令对 sos 报告进行敏感数据进行处理:
针对 sos report运行 sos clean 命令,并按照屏幕上的说明进行操作:
处理完成后,你将获得一个处理后的档案文件,其路径和大小也会在控制台输出中显示。例如:
[user@server1 ~]$ sudo sos clean /var/tmp/sos-collector-2024-07-17-pafsr.tar.xz
[sudo] password for user:
sos clean (version 4.2)
This command will attempt to obfuscate information that is generally considered to be potentially sensitive. Such information includes IP addresses, MAC addresses, domain names, and any user-provided keywords.
Note that this utility provides a best-effort approach to data obfuscation, but it does not guarantee that such obfuscation provides complete coverage of all such data in the archive, or that any obfuscation is provided to data that does not fit the description above.
Users should review any resulting data and/or archives generated or processed by this utility for remaining sensitive content before being passed to a third party.
Press ENTER to continue, or CTRL-C to quit.
Found 4 total reports to obfuscate, processing up to 4 concurrently
sosreport-primary-rhel8-2024-07-17-nchbdmd : Extracting...
sosreport-sos-node1-2024-07-17-wmlomgu : Extracting...
sosreport-sos-node2-2024-07-17-obsudzc : Extracting...
sos-collector-2024-07-17-pafsr : Beginning obfuscation...
sosreport-sos-node1-2024-07-17-wmlomgu : Beginning obfuscation...
sos-collector-2024-07-17-pafsr : Obfuscation completed
sosreport-primary-rhel8-2024-07-17-nchbdmd : Beginning obfuscation...
sosreport-sos-node2-2024-07-17-obsudzc : Beginning obfuscation...
sosreport-primary-rhel8-2024-07-17-nchbdmd : Re-compressing...
sosreport-sos-node2-2024-07-17-obsudzc : Re-compressing...
sosreport-sos-node1-2024-07-17-wmlomgu : Re-compressing...
sosreport-primary-rhel8-2024-07-17-nchbdmd : Obfuscation completed
sosreport-sos-node2-2024-07-17-obsudzc : Obfuscation completed
sosreport-sos-node1-2024-07-17-wmlomgu : Obfuscation completed
Successfully obfuscated 4 report(s)
A mapping of obfuscated elements is available at
/var/tmp/sos-collector-2024-07-17-pafsr-private_map
The obfuscated archive is available at
/var/tmp/sos-collector-2024-07-17-pafsr-obfuscated.tar.xz
Size 157.10KiB
Owner root
Please send the obfuscated archive to your support representative and keep the mapping file private
请将处理后的档案发送给技术支持,并保留处理的映射文件的私密性。
4. sos_report分析可视化软件
跳票了,近来在忙其他的事情,暂时搁置当前的开发计划。但我们将继续监控项目进展,一旦条件允许,我们将立即恢复开发工作。
对所有支持者表示最深切的感谢。我们期待着在不久的将来,能够带着更完善的产品和解决方案,再次与大家见面。