Crash Dumps and Support DataLesson 2 of 2
Collecting system information with sos report
Create a support archive with sos report, choose plugins, protect sensitive data and read the archive yourself.
sos reportsos report --list-pluginssos report -osos report -nsos cleansos report --batchsha256sumtarrpm -q sos
After this lesson you can
- Run sos report with a case id, limited plugins and a chosen output directory.
- Explain what the archive contains and where in it to look first.
- Obfuscate an archive with sos clean before sharing it, and verify its checksum.
The idea
When you ask someone else for help (a colleague, a vendor, Red Hat Support) the first thing they need is the facts about your machine. Typing them into an email loses most of them. sos report runs a long list of read-only collectors and bundles the results into one compressed archive: configuration files, logs, and the output of many commands, with a checksum so the recipient can verify it arrived intact.
You use it in two directions:
- Sending: attach the archive to a support case instead of describing the machine.
- Reading: an archive from another machine (or from yours, an hour before it broke) is a snapshot you can study offline, with
grep, without access to the original.
Plugins
The collection is organised into plugins, one per subsystem: networking, systemd, openssh, kernel, selinux, lvm2, block, rpm, logs, and many more. Each plugin knows which files and commands matter for its subsystem. Some plugins are off by default because they are slow or large.
| Option | Purpose |
|---|---|
--batch | Do not ask questions (no confirmation, no case-id prompt) |
--case-id ID | Put a case or ticket number into the archive name |
--label WORD | Add a word to the archive name |
-o a,b / --only-plugins | Run only the named plugins |
-n a,b / --skip-plugins | Skip these plugins |
-e a,b / --enable-plugins | Turn on plugins that are off by default |
--list-plugins | Show every plugin and whether it is enabled |
--tmp-dir DIR | Write the archive here (default /var/tmp) |
On older releases the command was sosreport; both names still work on RHEL, and sos report is the current one.
What the archive looks like
sosreport-HOST-CASE-DATE/
sos_commands/ output of each command, grouped by plugin (networking/, systemd/, rpm/, ...)
etc/ copies of configuration files
var/log/ log files (messages, secure, audit when collected)
proc/, sys/ selected kernel interfaces
sos_reports/ an HTML index (sos.html) and a JSON manifest
sos_logs/ how the report itself ran, including plugin errors
version.txt, date, uptime, hostname, installed-rpms ...
Where to look first: sos_reports/sos.html for an index, sos_commands/systemd/systemctl_list-units_--failed-style files for failed units, var/log/messages and var/log/secure for events, sos_commands/networking/ for addresses and routes, and installed-rpms for the package list. Files keep the name of the command that produced them, so ls and grep -r find things quickly.
Safety
An sos archive contains your configuration, host names, IP addresses, user names and sometimes secrets in configuration files. Treat it as sensitive.
- sos tries to remove known password fields in some configuration files, but it cannot recognise every secret.
sos clean ARCHIVE(also available assos report --clean) rewrites an archive to replace IP addresses, MAC addresses, host names and domain names with consistent obfuscated values, and writes a mapping file that translates them back. It writes a new archive and leaves the original untouched.- The mapping file must stay with you: sending it with the archive undoes the obfuscation.
Try it
sudo sos report --batch --case-id EX342-1
sos report (version 4.x)
This command will collect diagnostic and configuration information from
this Red Hat Enterprise Linux system and installed applications.
...
Setting up archive ...
Setting up plugins ...
Running plugins. Please wait ...
Starting 12/48 networking [Running: filesys networking ...]
Finished running plugins
Creating compressed archive...
Your sos report has been generated and saved in:
/var/tmp/sosreport-node1-EX342-1-2026-11-04-abcdefg.tar.xz
Size 21.43MiB
Owner root
sha256 3e5a...c21f
Please send this file to your support representative.
The archive name encodes host, case, date and a random suffix. Verify and look inside:
cd /var/tmp
sha256sum -c sosreport-node1-EX342-1-*.tar.xz.sha256
tar tf sosreport-node1-EX342-1-*.tar.xz | head -6
sosreport-node1-EX342-1-2026-11-04-abcdefg.tar.xz: OK
sosreport-node1-EX342-1-2026-11-04-abcdefg/
sosreport-node1-EX342-1-2026-11-04-abcdefg/sos_commands/
sosreport-node1-EX342-1-2026-11-04-abcdefg/sos_commands/networking/
sosreport-node1-EX342-1-2026-11-04-abcdefg/etc/
sosreport-node1-EX342-1-2026-11-04-abcdefg/var/log/
A focused report
Fewer plugins means a smaller, faster, safer archive. Only collect what the question needs:
sudo sos report --list-plugins | head
sudo sos report --batch --case-id EX342-2 -o networking,systemd,openssh --tmp-dir /root/cases
Reading an archive offline
Extract just what you need rather than the whole archive:
A=/root/cases/sosreport-node1-EX342-2-*.tar.xz
tar xf $A --wildcards '*/etc/resolv.conf' -O
tar xf $A --wildcards '*/sos_commands/systemd/systemctl_list-units*' -O | head
search lab.example
nameserver 192.168.50.1
Because every file is a plain text copy, the usual tools work: grep -ri 'Failed' */var/log/messages, diff between a “before” and “after” archive, and rpm-style queries against installed-rpms.
Obfuscating before you share
sudo sos clean --batch /root/cases/sosreport-node1-EX342-2-*.tar.xz
ls /root/cases
sosreport-node1-EX342-2-2026-11-04-abcdefg.tar.xz
sosreport-obfuscatedhost1-EX342-2-2026-11-04-abcdefg.tar.xz
The second archive is the one to send. The mapping file (named like *-private_map) stays on your machine.
When it does not work
| Symptom | Cause | Fix |
|---|---|---|
sos: command not found | Package missing | dnf install sos |
| Run takes very long or stalls on a plugin | A slow plugin (large rpm verification, big log trees) | Skip it with -n, or limit with -o |
No space left on device | /var/tmp full | --tmp-dir on a larger file system |
Plugin reports failed to run command | Tool for that plugin not installed, or SELinux denial | Read sos_logs/sos.log in the archive |
| Archive contains data you must not share | Too many plugins, secrets in configuration | -o fewer plugins, then sos clean, and review before sending |
| Checksum mismatch at the recipient | Truncated upload | Upload again; compare sha256sum on both ends |
Going further
Exam and practice. Expect a task that gives you a reason to produce evidence (for example, “collect networking and system information for a support case and store it under a given directory”) and a checker that looks for the archive, its checksum, and which plugins ran. Learn -o, -n, --tmp-dir, --case-id and --list-plugins. Beyond the exam: sos collect gathers reports from several cluster nodes at once, and insights-client uploads a lighter system profile to Red Hat Insights for automated analysis.
Practice
0 of 3 done
Do these on your own system. They get harder. Check each result, then tick it off.
- Warm-up
Create and inspect an archive
Install
sosif needed. Create a report with case idEX342-1and no questions asked. Find the archive and its checksum file, verify the checksum, and list the first twenty entries of the archive.Check your result
ls /var/tmp/sosreport-EX342-1.tar.xzshows the archive; a.sha256file sits beside it.sha256sum -con that file reportsOK(or compare the printed value).tar tflists directories such asetc/,var/log/andsos_commands/.
Hint
sos report --batch --case-id EX342-1needs no prompts. The archive name contains the host name, case id and date. The output goes to/var/tmpby default.Solution
sudo dnf install -y sos sudo sos report --batch --case-id EX342-1 ls -lh /var/tmp/sosreport-*EX342-1* cd /var/tmp && sha256sum -c sosreport-*EX342-1*.tar.xz.sha256 tar tf /var/tmp/sosreport-*EX342-1*.tar.xz | head -20 - Practice
Only what the case needs
The incident concerns networking and the SSH service only. Create a report containing only the
networking,systemdandopensshplugins, written to/root/cases, labellednet-ssh. Then list which plugins are available and confirm the archive has nosos_commands/kerneldirectory.Check your result
/root/cases/holds the archive and its checksum file.tar tfshowssos_commands/networking/andsos_commands/systemd/.tar tfshows nosos_commands/kernel/entries.
Hint
sos report --list-pluginsshows plugin names and whether each is enabled.-o plugin1,plugin2runs only those;-n pluginskips plugins;--tmp-dirsets where the archive is written;--labeladds a word to the file name.Solution
sudo mkdir -p /root/cases sudo sos report --list-plugins | head -20 sudo sos report --batch --case-id EX342-2 --label net-ssh -o networking,systemd,openssh --tmp-dir /root/cases ls -lh /root/cases tar tf /root/cases/sosreport-*net-ssh*.tar.xz | grep -c 'sos_commands/kernel' || true - Challenge
Anonymise and answer questions from the archive
Take an archive from the previous exercise. (1) Without extracting it fully, find the machine's default route and its DNS servers from the archive. (2) Produce an obfuscated copy with
sos cleanthat hides IP addresses and the host name, and show that the obfuscated archive no longer contains the original host name. (3) Write the mapping file's location in your notes: why must it never be sent with the archive?Check your result
- Your answers for the default route and DNS match
ip routeand/etc/resolv.confon the live machine. sos cleanproduced a new archive (name containsobfuscated) and a mapping file.tar xOf OBFUSCATED.tar.xz | grep -c "$(hostname)"prints0for the path-independent content you tested.
Hint
Command output is stored under
sos_commands/<plugin>/:networking/ip_route_show_table_all-style files, andetc/resolv.confis a copy of the file. Extract single files withtar xf ARCHIVE --wildcards '*/etc/resolv.conf'. The mapping lets you translate replies from support back to real names, so it is as sensitive as the data it hides.Solution
A=$(ls /root/cases/sosreport-*net-ssh*.tar.xz | head -1) tar xf "$A" --wildcards '*/etc/resolv.conf' -O tar tf "$A" | grep -i route | head sudo sos clean --batch "$A" ls -lh /root/cases tar xOf /root/cases/*obfuscated*.tar.xz 2>/dev/null | grep -c "$(hostname)" || true - Your answers for the default route and DNS match