RHEL:如何在 Red Hat Enterprise Linux 中生成 SOS 报告日志包
Summary: 本文介绍如何为 Red Hat Enterprise Linux 生成 sos 报告。
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Instructions
sos 报告是一个日志包,用于从 Linux 系统收集各种系统日志、配置文件和命令输出。这是一种从作系统收集诊断信息以供戴尔域工程师和 Linux 供应商支持进行调查的标准化方法。
提醒:在 Red Hat Enterprise Linux 7 及更早发行版中,用于生成日志包的命令是
sosreport'。在 Red Hat Enterprise Linux 8 及更高版本中,命令更改为”sos report'。但是,在运行”sosreport' 在 Red Hat Enterprise Linux 8 及更高版本中仍以相同的方式工作。它会自动重定向到”sos report' 用于传统兼容性的命令。
“sos”包提供了 sos report 命令,通常默认安装在 Red Hat Enterprise Linux 中。
要验证软件包安装,请执行以下作:
# rpm -q sos sos-4.5.1-3.el8.noarch
如果由于某种原因未安装“sos”软件包,则可以使用以下命令进行安装:
# yum install sos
要在交互模式下生成 sos 报告(以 root 用户身份运行):
- Red Hat Enterprise Linux 8 及更高版本:
# sos report
- 对于 Red Hat Enterprise Linux 7 及更早版本:
# sosreport
(可选)包括 --batch 在非交互模式下生成 SOS 报告的选项:
# sos report –-batch
Or
# sosreport --batch
日志包(及其关联的校验和文件)通常可以保存在 /var/tmp/。旧版本的 Red Hat Enterprise Linux 可能会保存到其他位置,但在命令输出
中指定。例:
# ls /var/tmp/sosreport* sosreport-rhel8vm-809520-2023-05-09-gbvkemd.tar.xz sosreport-rhel8vm-809520-2023-05-09-gbvkemd.tar.xz.sha256
生成后,用户可能需要本地系统上的日志包的副本。通常,用户使用 SCP 实用程序(如 WinSCP)复制和下载文件。这只需要对服务器进行 SSH 访问。
请参阅 Red Hat 文章:
Additional Information
Affected Products
Red Hat Enterprise Linux Version 5, Red Hat Enterprise Linux Version 6, Red Hat Enterprise Linux Version 7, Red Hat Enterprise Linux Version 9, Red Hat Enterprise Linux Version 8, Red Hat Enterprise Virtualization 3Products
C Series, HS Series, Modular Infrastructure, Rack Servers, Tower Servers, XE Servers, XR Servers, OEM Server Solutions, PowerEdge XE8640, PowerEdge XE9640, PowerEdge XE9680, PowerEdge XE9680LArticle Properties
Article Number: 000217357
Article Type: How To
Last Modified: 08 May 2025
Version: 4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.