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

来源:互联网 发布:java 数据字典设计 编辑:程序博客网 时间:2024/05/16 19:45

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. Therpm 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 abz2 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 calledsysreport, but it is just a soft link tothe sosreport command:

# ls -l /usr/sbin/sysreportlrwxrwxrwx 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 thesysreport.legacy commandin sos package.


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

原创粉丝点击