What is a "sosreport" and how do I create it in Red Hat Enterprise Linux 4.6 and later

本文介绍如何在Red Hat Enterprise Linux环境中创建SOS报告,这是一种用于收集系统信息的强大工具,包括运行的内核版本、加载的驱动程序及常见服务的配置文件等。文章详细解释了不同版本的Red Hat系统上安装并运行SOS报告的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Issue

  • What is a sosreport andhow do I create one?
  • How do I generate a sosreport?

Environment

  • Red Hat Enterprise Linux 4.6+
  • Red Hat Enterprise Linux 5+
  • Red Hat Enterprise Linux 6+

Resolution

The sosreport command is atool that collects  information about a Red HatEnterprise Linux system, such as what kernel  isrunning, what drivers are loaded, and various configurationfiles  for common services. It also does somesimple diagnostics against known  problematicpatterns.

 

To run a sosreport, thesos package must be installed.The package should be installed by default, but if the package isnot installed, follow the steps below:

 

Red Hat Enterprise Linux 4 Update 6 orlater

If the system is registered with Red Hat Network (RHN),sos can be installed using theup2date command:

 

# up2date sos

 

Red Hat Enterprise Linux 5 and later

If the system is registered with RHN, use the yum command:

 

# yum install sos

 

If the system is not registered with RHN, the sos package can be downloaded from the RHNwebsite or found on the installation CDs. The rpm command can be used to install thepackage on any version of Red Hat Enterprise Linux:

 

# rpm -Uvh sos-<version>.<arch>.rpm

 

Once the package has been installed, issue the followingcommand:

 

Note: sosreport requires rootpermissions to run.

 

# sosreport

 

The sosreport will run for several minutes, according todifferent system, the running time maybe more longer.

 

Once completed, sosreportwill generate a compressed a bz2 file under/tmp. Providethis file to the support representative.

 

Use thefollowing command to uncomprise the sosreport
#bzip2-d <filename>

 

Normally, the size of the bz2 file will be about 3MB, but if your system has alarge amount of log files, it maybe very big.

 

The sosreport has some plugins which can be turned on/off, thefollowing command lists the plugins:

# sosreport -l

 

For example, turning off the rpmva plugin will save time runningsosreport.

# sosreport -k rpm.rpmva=off

 

Note:

1. In Red Hat Enterprise Linux 4.5 and earlier, use sysreport instead: What is a sysreportand how do I run it ?

2. In the sos package,there is also a command called sysreport, but it is just a soft link tothe sosreport command:

# ls -l /usr/sbin/sysreport
lrwxrwxrwx 1 root root 19 Nov  2008 /usr/sbin/sysreport -> /usr/sbin/sosreport

 

If you do want to use the legacy version of sysreport, please use the sysreport.legacy commandin sos package.


https://access.redhat.com/kb/docs/DOC-3593

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值