Getting the most from your Support experience Red Hat Enterprise Linux 9 Gathering troubleshooting information from RHEL servers with the sos utility Red Hat Customer Content Services

Commands:
ll /var/tmp/sosreport * total 18704 -rw-------. 1 root root 19136596 Jan 25 07:42 sosreport-server1-12345678-2022-01-25-tgictvu. tar.xz -rw-r--r--. 1 root root 65 Jan 25 07:42 sosreport-server1-12345678-2022-01-25-tgictvu.tar.xz. sha256
dnf install sos
rpm -q sos sos-4.2-15.el9.noarch
[user@server1 ~]USD 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.
Please enter the case id that you are generating this report for []: <8-digit_case_number>
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.
[user@server1 ~]USD sudo sos report --batch --case-id <8-digit_case_number>
[user@server1 ~]USD sudo sos report --clean
[user@server1 ~]USD 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
sos collect --nodes=sos-node1,sos-node2 -o process,apache --log-size=50 sos-collector (version 4.2) This utility is used to collect sosreports from multiple nodes simultaneously. It uses OpenSSH's ControlPersist feature to connect to nodes and run commands remotely. If your system installation of OpenSSH is older than 5.6, please upgrade. An archive of sosreport tarballs collected from the nodes will be generated in /var/tmp/sos.o4l55n1s and may be provided to an appropriate support representative. The generated archive may contain data considered sensitive and its content should be reviewed by the originating organization before being passed to any third party. No configuration changes will be made to the system running this utility or remote systems that it connects to. Press ENTER to continue, or CTRL-C to quit Please enter the case id you are collecting reports for: <8-digit_case_number> sos-collector ASSUMES that SSH keys are installed on all nodes unless the --password option is provided. The following is a list of nodes to collect from: primary-rhel9 sos-node1 sos-node2 Press ENTER to continue with these nodes, or press CTRL-C to quit Connecting to nodes Beginning collection of sosreports from 3 nodes, collecting a maximum of 4 concurrently primary-rhel9 : Generating sosreport sos-node1 : Generating sosreport sos-node2 : Generating sosreport primary-rhel9 : Retrieving sosreport sos-node1 : Retrieving sosreport primary-rhel9 : Successfully collected sosreport sos-node1 : Successfully collected sosreport sos-node2 : Retrieving sosreport sos-node2 : Successfully collected sosreport The following archive has been created. Please provide it to your support team. /var/tmp/sos-collector-2022-05-15-pafsr.tar.xz
ls -l /var/tmp/sos-collector * -rw-------. 1 root root 160492 May 15 13:35 /var/tmp/sos-collector-2022-05-15-pafsr.tar.xz
[user@server1 ~]USD sudo sos clean /var/tmp/sos-collector-2022-05-15-pafsr.tar.xz [sudo] password for user: sos clean (version 4.2) This command will attempt to obfuscate information that is generally considered to be potentially sensitive. Such information includes IP addresses, MAC addresses, domain names, and any user-provided keywords. Note that this utility provides a best-effort approach to data obfuscation, but it does not guarantee that such obfuscation provides complete coverage of all such data in the archive, or that any obfuscation is provided to data that does not fit the description above. Users should review any resulting data and/or archives generated or processed by this utility for remaining sensitive content before being passed to a third party. Press ENTER to continue, or CTRL-C to quit. Found 4 total reports to obfuscate, processing up to 4 concurrently sosreport-primary-rhel9-2022-05-15-nchbdmd : Extracting sosreport-sos-node1-2022-05-15-wmlomgu : Extracting sosreport-sos-node2-2022-05-15-obsudzc : Extracting sos-collector-2022-05-15-pafsr : Beginning obfuscation sosreport-sos-node1-2022-05-15-wmlomgu : Beginning obfuscation sos-collector-2022-05-15-pafsr : Obfuscation completed sosreport-primary-rhel9-2022-05-15-nchbdmd : Beginning obfuscation sosreport-sos-node2-2022-05-15-obsudzc : Beginning obfuscation sosreport-primary-rhel9-2022-05-15-nchbdmd : Re-compressing sosreport-sos-node2-2022-05-15-obsudzc : Re-compressing sosreport-sos-node1-2022-05-15-wmlomgu : Re-compressing sosreport-primary-rhel9-2022-05-15-nchbdmd : Obfuscation completed sosreport-sos-node2-2022-05-15-obsudzc : Obfuscation completed sosreport-sos-node1-2022-05-15-wmlomgu : Obfuscation completed Successfully obfuscated 4 report(s) A mapping of obfuscated elements is available at /var/tmp/sos-collector-2022-05-15-pafsr-private_map The obfuscated archive is available at /var/tmp/sos-collector-2022-05-15-pafsr-obfuscated.tar.xz Size 157.10KiB Owner root Please send the obfuscated archive to your support representative and keep the mapping file private
[user@server1 ~]USD sudo ls -l /var/tmp/sos-collector-2022-05-15-pafsr-private_map /var/tmp/sos-collector-2022-05-15-pafsr-obfuscated.tar.xz [sudo] password for user: -rw-------. 1 root root 160868 May 15 16:10 /var/tmp/sos-collector-2022-05-15-pafsr-obfuscated.tar.xz -rw-------. 1 root root 96622 May 15 16:10 /var/tmp/sos-collector-2022-05-15-pafsr-private_map
[user@server1 ~]USD sudo cat /var/tmp/sos-collector-2022-05-15-pafsr-private_map [sudo] password for user: { "hostname_map": { "pmoravec-rhel9": "host0" }, "ip_map": { "10.44.128.0/22": "100.0.0.0/22", .. "username_map": { "foobaruser": "obfuscateduser0", "jsmith": "obfuscateduser1", "johndoe": "obfuscateduser2" } }
[user@server1 ~]USD sudo sos report --encrypt-pass my-passphrase [sudo] password for user: sosreport (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.6lck0myd and may be provided to a Red Hat support representative. Press ENTER to continue, or CTRL-C to quit.
Please enter the case id that you are generating this report for []: <8-digit_case_number>
Finished running plugins Creating compressed archive Your sosreport has been generated and saved in: /var/tmp/secured-sosreport-server1-12345678-2022-01-24-ueqijfm.tar.xz.gpg Size 17.53MiB Owner root sha256 bf303917b689b13f0c059116d9ca55e341d5fadcd3f1473bef7299c4ad2a7f4f Please send this file to your support representative.
[user@server1 ~]USD sudo ls -l /var/tmp/sosreport * [sudo] password for user: -rw-------. 1 root root 18381537 Jan 24 17:55 /var/tmp/secured-sosreport-server1-12345678-2022-01-24-ueqijfm.tar.xz.gpg
[user@server1 ~]USD sudo gpg --output decrypted-sosreport.tar.gz --decrypt /var/tmp/secured-sosreport-server1-12345678-2022-01-24-ueqijfm.tar.xz.gpg
┌──────────────────────────────────────────────────────┐ │ Enter passphrase │ │ │ │ │ │ Passphrase: <passphrase> │ │ │ │ <OK> <Cancel> │ └──────────────────────────────────────────────────────┘
[user@server1 ~]USD sudo ls -l decrypted-sosreport.tar.gz [sudo] password for user: -rw-r--r--. 1 root root 18381537 Jan 24 17:59 decrypted-sosreport. tar.gz
[user@server1 ~]USD sudo sos report --encrypt-key root [sudo] password for user: sosreport (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.6ucjclgf and may be provided to a Red Hat support representative. Press ENTER to continue, or CTRL-C to quit.
Please enter the case id that you are generating this report for []: <8-digit_case_number>
Finished running plugins Creating compressed archive Your sosreport has been generated and saved in: /var/tmp/secured-sosreport-server1-23456789-2022-02-27-zhdqhdi.tar.xz.gpg Size 15.44MiB Owner root sha256 bf303917b689b13f0c059116d9ca55e341d5fadcd3f1473bef7299c4ad2a7f4f Please send this file to your support representative.
[user@server1 ~]USD sudo ls -l /var/tmp/sosreport * [sudo] password for user: -rw-------. 1 root root 16190013 Jan 24 17:55 /var/tmp/secured-sosreport-server1-23456789-2022-01-27-zhdqhdi.tar.xz.gpg
[user@server1 ~]USD sudo gpg --output decrypted-sosreport.tar.gz --decrypt /var/tmp/secured-sosreport-server1-23456789-2022-01-27-zhdqhdi.tar.xz.gpg
┌────────────────────────────────────────────────────────────────┐ │ Please enter the passphrase to unlock the OpenPGP secret key: │ │ "GPG User (first key) <root@example.com>" │ │ 2048-bit RSA key, ID BF28FFA302EF4557, │ │ created 2020-01-13. │ │ │ │ │ │ Passphrase: <passphrase> │ │ │ │ <OK> <Cancel> │ └────────────────────────────────────────────────────────────────┘
[user@server1 ~]USD sudo ll decrypted-sosreport.tar.gz [sudo] password for user: -rw-r--r--. 1 root root 16190013 Jan 27 17:47 decrypted-sosreport. tar.gz
dnf install pinentry mkdir ~/.gnupg -m 700 echo "pinentry-program /usr/bin/pinentry-curses" >> ~/.gnupg/gpg-agent.conf
cat >key-input <<EOF %echo Generating a standard key Key-Type: RSA Key-Length: 2048 Name-Real: GPG User Name-Comment: first key Name-Email: root@example.com Expire-Date: 0 %commit %echo Finished creating standard key EOF
export GNUPGHOME= /root/backup mkdir -p USDGNUPGHOME -m 700
gpg2 --batch --gen-key key-input
┌──────────────────────────────────────────────────────┐ │ Please enter the passphrase to │ │ protect your new key │ │ │ │ Passphrase: <passphrase> │ │ │ │ <OK> <Cancel> │ └──────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────┐ │ Please re-enter this passphrase │ │ │ │ Passphrase: <passphrase> │ │ │ │ <OK> <Cancel> │ └──────────────────────────────────────────────────────┘
gpg: keybox '/root/backup/pubring.kbx' created gpg: Generating a standard key gpg: /root/backup/trustdb.gpg: trustdb created gpg: key BF28FFA302EF4557 marked as ultimately trusted gpg: directory '/root/backup/openpgp-revocs.d' created gpg: revocation certificate stored as '/root/backup/openpgp-revocs.d/8F6FCF10C80359D5A05AED67BF28FFA302EF4557.rev' gpg: Finished creating standard key
gpg2 --list-secret-keys gpg: checking the trustdb gpg: marginals needed: 3 completes needed: 1 trust model: pgp gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u / root /backup/pubring.kbx ------------------------ sec rsa2048 2020-01-13 [SCEA] 8F6FCF10C80359D5A05AED67BF28FFA302EF4557 uid [ultimate] GPG User (first key) <root@example.com>
ip link show ... 2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 link/ether 52:54:00:74:79:56 brd ff:ff:ff:ff:ff:ff
ip address add < 192.168.0.1/24 > dev < enp1s0 > ip route add default via < 192.168.0.254 >
nameserver < 192.168.0.5 >
[user@server1 ~]USD sudo sos report --upload sosreport (version 4.7.0) Optionally, please enter the case id that you are generating this report for []: Your sosreport has been generated and saved in: /var/tmp/sosreport-localhost-2024-03-19-xavvwkw.tar.xz
Attempting upload to Red Hat Customer Portal Please visit the following URL to authenticate this device: https://sso.redhat.com/device?user_code=VGEL-PYIM Device authorized correctly. Uploading file to Red Hat Customer Portal Uploaded archive successfully
Attempting upload to Red Hat Secure FTP Please visit the following URL to authenticate this device: https://sso.redhat.com/device?user_code=VGEL-PYIM Device authorized correctly. Uploading file to Red Hat Secure FTP Uploaded archive successfully