2 Working With the sosreport Command
WARNING:
Oracle Linux 7 is now in Extended Support. See Oracle Linux Extended Support and Oracle Open Source Support Policies for more information.
Migrate applications and data to Oracle Linux 8 or Oracle Linux 9 as soon as possible.
This chapter describes how to install and run the sosreport command and configure its associated modules to collect system configuration and log information about your Oracle Linux systems.
About sosreport
The sosreport command collects information about a system such as hardware configuration, software configuration, and operational state. You can also use sosreport to enable diagnostics and analytical functions. To assist in troubleshooting a problem, sosreport records the information in a compressed file that you can send to a support representative.
Installing sosreport
If the sos
package is not already installed
on your system, use yum to install it:
sudo yum install sos
Use the sosreport -l command to list the available plugins and plugin options:
sudo sosreport -l
The following plugins are currently enabled: acpid acpid related information anaconda Anaconda / Installation information . . . The following plugins are currently disabled: amd Amd automounter information cluster cluster suite and GFS related information . . . The following plugin options are available: apache.log off gathers all apache logs auditd.syslogsize 15 max size (MiB) to collect per syslog file . . .
See the sosreport(1)
manual page for
information about how to enable or disable plugins, and how to
set values for plugin options.
Running sosreport
You can run sosreport to record information about a problem area and specify options to tailor the report it generates as follows:
sudo sosreport [options ...]
For example, to record only information about Apache and Tomcat, and to gather all the Apache logs, use the following command:
sudo sosreport -o apache,tomcat -k apache.log=on
sosreport (version 2.2) . . . Press ENTER to continue, or CTRL-C to quit.
To enable all of the boolean options for all of the loaded
plugins (excluding the rpm.rpmva
plugin) and
verify all packages:
sudo sosreport -a -k rpm.rpmva=off
Note that this process can take a considerable amount of time, but once it has completed, press Enter and then provide any additional information that is required:
Please enter your first initial and last name [email_address]: AName Please enter the case number that you are generating this report for: case# Running plugins. Please wait ... Completed [55/55] ... Creating compressed archive... Your sosreport has been generated and saved in: /tmp/sosreport-AName.case#-datestamp-ID.tar.xz The md5sum is: checksum Please send this file to your support representative.
sosreport saves the report as an
xz-compressed tar file in
/tmp
.
Optionally, to obfuscate sensitive information, you can run the soscleaner command on the compressed archive generated from the sosreport command.
The cleaned report obfuscates the following details:
-
IPv4 addresses and networks (network topologies are retained)
-
MAC addresses
-
Host names
-
User names
Note:
Reports processed with the soscleaner command obfuscate certain details that may be needed for advanced troubleshooting, such as networking information.
If the soscleaner
package is not already
installed on your system, use yum to install
it from the ol7_addons
repository:
sudo yum install soscleaner
To generate a cleaned report, run the
soscleaner command on the compressed archive
generated from the sosreport command in the
/tmp
directory:
sudo soscleaner /var/tmp/sosreport-hostname-case#-datestamp-ID.tar.xz
Press Enter to proceed. After the soscleaner
command completes, a new xz
-compressed
tar
file with -obfuscated
in the file name is created the /tmp
directory.
For more information, see the sosreport(1)
and soscleaner(1)
manual pages.
Reviewing Information Gathered by sosreport
The sosreport command is automatically configured to collect hardware information, system configuration files and log data, but you can enable and disable modules to suit your own data protection needs.
Note:
The module information that is provided in this table relates to sosreport 3.9. To verify the modules you have installed on your system, read Installing sosreport.
Disabling modules prevents the sosreport command from collecting certain details that may be needed for advanced troubleshooting, such as networking information.
Module | Information Type | Included Files |
---|---|---|
|
Installation log files |
|
|
Audit log files |
|
|
System boot process details |
|
|
Root user cron commands |
|
|
Printer log files |
|
|
Context data |
|
|
Hardware details |
|
|
List of all files in use |
|
|
Kernel and system start-up configuration |
|
|
Hardware details |
|
|
Host identification |
|
|
System log files |
|
|
List of shared libraries |
|
|
System log files |
|
|
Hardware details |
|
|
Hardware details |
|
|
Network identification |
|
|
Login security settings |
|
|
Hardware details |
|
|
List of all running processes and process details |
|
|
Hardware details |
|
|
Installed software packages |
|
|
Resource and usage data |
|
|
Security settings |
|
|
All defined system services |
|
|
SSH configuration |
|
|
GUI logs for the X Window System |
|
|
Installed software packages |
|