• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to install and configure sosreport under CentOS / RHEL

by admin

The sosreport tool collects information about a system, such as hardware configuration, installed software packages, configuration, and operational state. This information is stored in a single compressed file in the /var/tmp directory, and the file can be sent to a support representative to assist in troubleshooting a problem. The sosreport tool replaces an earlier version of the tool called sysreport.

Installing sosreport Package

To run the tool, first install the sos package:

# yum install sos

Running the sosreport

You should run the report as the root user. The version of the tool is displayed along with a short description of the tool and the output it produces. You are prompted to press Enter to continue or Ctrl + C to quit.

# sosreport
sosreport (version 3.2)

This command will collect diagnostic and configuration information from
this Red Hat Enterprise Linux system and installed applications.
...
Press ENTER to continue, or CTRL-C to quit.

Press Enter to start. You are prompted as follows:

Please enter your first initial and last name [host03...]:
Please enter the case number you are generating this report for:

The name and case number that you provide becomes part of the file name created by the tool. After the tool completes, you can uncompress the file and view the contents, by running the following commands:

# cd /var/tmp
# xz -d [sosfile].xz
# tar xvf [sosfile].tar

Extracting the file creates a directory, which includes the output of several system status commands as well as the contents of some configuration directories on your system. The following is a sample list of the output collected on a system named geeklab:

# ls /var/tmp/sosreport-geeklab*
boot/ etc/ lib/ proc/ sos_commands/ uptime
chkconfig free lsmod ps sos_logs/ usr/
date hostname lsof pstree sos_reports/ var/
...

sosreport Plugins

The sosreport uses plug-ins, which can be turned on and off. Use the following command to list the plug-ins, which are enabled and disabled, and plug-in options:

# sosreport -l

sosreport (version 3.2)

The following plugins are currently enabled:

 abrt                 Automatic Bug Reporting Tool
 acpid                ACPI daemon information
 anaconda             Anaconda installer
 anacron              Anacron job scheduling service
 ata                  ATA and IDE information
 
...
The following plugins are currently disabled:

 activemq             inactive       ActiveMQ message broker
 apache               inactive       Apache http daemon
 ceph                 inactive       CEPH distributed storage
 cluster              inactive       Red Hat Cluster High Availability and GFS2
 cobbler              inactive       Cobbler installation server
 
...
The following plugin options are available:

 abrt.backtraces           off             collect backtraces for every report
 boot.all-images           off             collect lsinitrd for all images
 dmraid.metadata           off             capture dmraid device metadata
 filesys.lsof              off             gathers information on all open files
 filesys.dumpe2fs          off             dump filesystem information
 libraries.ldconfigv       off             collect verbose ldconfig output
....

Additional options exist to control the plug-ins and the tool. The following is a partial list:

Option Description
-n PLUGNAME Do not load specified plug-in(s).
-e PLUGNAME Enable the specified plug-in(s).
-o PLUGNAME Enable only the specified plug-in(s), disable all others.
-k PLUGNAME.PLUGOPT=[VALUE] Specify options for plug-ins.
-a Enable all (Boolean) options for all loaded plug-ins.
–tmp-dir DIRECTORY Specify an alternative temporary directory.
–name NAME Specify a name to be used for the archive.
–ticket-number NUMBER Specify a ticket number to be used for the archive.
CentOS / RHEL : How to collect sosreport

Filed Under: CentOS/RHEL 6, CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. How to Find Number of CPU Sockets on a CentOS/RHEL System
  2. How to Copy / Move Files and Directories in Linux with “cp” and “mv” commands
  3. RCRON – Setup High Availability of cron Jobs
  4. Search XML Attributes PowerShell XPath
  5. Audit Log And Messages File Not Rotating on CentOS/RHEL
  6. How to install and configure “setroubleshootd” on CentOS/RHEL
  7. du Command Examples in Linux
  8. How To Enable PHP 7.0 And httpd24 On Oracle Linux 7
  9. What are SELinux Users and how to Map Linux Users to SELinux Users
  10. “-bash: route: command not found” on CentOS/RHEL 8

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright