What is sosreport? |
A sosreport command is a tool that collects configuration and diagnostic information from a Red Hat Enterprise Linux system. For instance: the running kernel version, loaded modules, and system and service configuration files. The command also runs external programs to collect further information, and stores this output in the resulting archive.
To run sosreport the sos package must be installed. The package is part of the default group and will be installed automatically on most systems.
If for any reason the package is not present it may be added manually using the following steps:
Red Hat Enterprise Linux 4 Update 6 or later: If the system is registered with Red Hat Network (RHN), sos can be installed using the up2date 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 RHN website or found on the installation CDs or DVD. The rpm command may be used to install the package on any version of Red Hat Enterprise Linux:
# rpm -Uvh sos-<version>.noarch.rpm
How to generate and collect sosreport? |
After installing the package run the following command to generate sosreport
# sosreport
Note: sosreport requires root permissions to run.
Once completed, sosreport will generate a compressed file under /tmp (for RHEL6 and earlier) or under /var/tmp (for RHEL7 and later). Different versions use different compression schemes (gz, bz2, or xz).