Ubuntu: How to generate an sosreport log bundle in Ubuntu Linux Server
Summary: This article explains how to generate a sosreport log bundle for Ubuntu Linux Server.
Instructions
The sos report is a log bundle that collects various system logs, config files, and command output from a Linux system. It is a standardized way to collect diagnostic information from the operating system for investigation by Dell domain engineers and Linux vendor support.
In Ubuntu Linux Server, the 'sosreport' package provides the sos report command, which is typically installed by default.
To verify the package installation:
$ dpkg -l sosreport Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-====================-============-========================================================= ii sosreport 4.4-1ubuntu1.22.04.1 amd64 Set of tools to gather troubleshooting data from a system
If for some reason the 'sosreport' package is not installed, it can be installed using the below command:
$ sudo apt install sosreport
To generate a sos report in interactive mode, use either of the following commands:
$ sudo sosreport
Or
$ sudo sos report
Optionally, include the --batch option for a noninteractive mode:
$ sudo sos report -–batch
The log bundle (and its associated checksum file) is typically saved in /tmp/. Older versions of Linux may save to a different location, but it is specified in the command output.
Example:
$ ls /tmp/sosreport* /tmp/sosreport-ubuntu2204-809520-2023-05-09-nhhnjmk.tar.xz /tmp/sosreport-ubuntu2204-809520-2023-05-09-nhhnjmk.tar.xz.sha256
Once generated, the user may require a copy of the log bundle on a local system. Usually, users use an SCP utility such as 'WinSCP' to copy and download the file. This only requires SSH access to the server.
See Ubuntu documentation sos report - Collect and package diagnostic and support data
Additional Information
For Red Hat Enterprise Linux see: Linux: How to Generate a Sos Report Log Bundle in Red Hat Enterprise Linux