Create Sosreport in CentOS/RHEL 5/6/7

Sosreport is a command in linux (RHEL/CentOS) which gathers system configuration and diagnostic information of your linux box like running kernel version, loaded modules, and system and service configuration files. This command likewise runs external programs to gather additional information, and stores this output in the resulting archive.
Create Sosreport

Install SOS:

Sos package is part of default installation in most of linux. If for any reason this package is no installed , then use below command to install SOS package :

# yum install sos

Create SOSReport:

After installing SOS package run the following command to generate the sosreport.

# sosreport

Above comamnd take few minutes to execute successfully. In some cases the command may take long time to finish. Once completed, sosreport will generate a compressed a file under /tmp folder. Different versions use different compression schemes (gz, bz2, or xz).

List all Modules:

To list available modules (plug-ins) use the following command:

# sosreport -l

Disable and Enable Modules

The sosreport command has a modular structure and permits the user to enable and disable modules and determine module option through the command line. To turn off a module include it in a comma-separated list of modules went to the -n/–skip-modules option. Case in point to disable both the kvmand amd modules:

# sosreport -n kvm,amd

Individual modules may give additional option that might be indicated by means of the -k option. For instance on Red Hat Enterprise Linux 5 installations the sos rpm module. As this might be time-consuming the behavior may be disabled via:

# sosreport -k rpm.rpmva=off

Enjoy it!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.