1.3. Generating an sos report from the command line
Use the sos report command to gather an sos report from a RHEL server.
Prerequisites
-
You have installed the
sospackage. -
You need
rootprivileges.
Procedure
Run the
sos reportcommand and follow the on-screen instructions. You can add the--uploadoption to transfer thesosreport to Red Hat immediately after generating it.[user@server1 ~]$ sudo sos report [sudo] password for user: sos report (version 4.2) This command will collect diagnostic and configuration information from this Red Hat Enterprise Linux system and installed applications. An archive containing the collected information will be generated in /var/tmp/sos.qkn_b7by and may be provided to a Red Hat support representative. ... Press ENTER to continue, or CTRL-C to quit.Optional: If you have already opened a Technical Support case with Red Hat, enter the case number to embed it in the
sosreport file name, and it will be uploaded to that case if you specified the--uploadoption. If you do not have a case number, leave this field blank. Entering a case number is optional and does not affect the operation of thesosutility.Please enter the case id that you are generating this report for []: <8-digit_case_number>Take note of the
sosreport file name displayed at the end of the console output.... Finished running plugins Creating compressed archive... Your sos report has been generated and saved in: /var/tmp/sosreport-server1-12345678-2022-04-17-qmtnqng.tar.xz Size 16.51MiB Owner root sha256 bf303917b689b13f0c059116d9ca55e341d5fadcd3f1473bef7299c4ad2a7f4f Please send this file to your support representative.
-
You can use the
--batchoption to generate ansosreport without prompting for interactive input.
[user@server1 ~]$ sudo sos report --batch --case-id <8-digit_case_number>
-
You can also use the
--cleanoption to obfuscate a just-collectedsosreport.
[user@server1 ~]$ sudo sos report --clean
Verification
Verify that the
sosutility created an archive in/var/tmp/matching the description from the command output.[user@server1 ~]$ sudo ls -l /var/tmp/sosreport* [sudo] password for user: -rw-------. 1 root root 17310544 Sep 17 19:11 /var/tmp/sosreport-server1-12345678-2022-04-17-qmtnqng.tar.xz