您的位置:首页 > 运维架构 > Linux

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

2013-09-15 23:31 911 查看

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

[/code]

Red Hat Enterprise Linux 5 and later

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

# yum install sos

[/code]

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

[/code]

Once the package has been installed, issue the followingcommand:

Note: sosreport requires rootpermissions to run.

# sosreport

[/code]

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

[/code]

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

# sosreport -k rpm.rpmva=off

[/code]

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  3  2008 /usr/sbin/sysreport -> /usr/sbin/sosreport

[/code]

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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: