RHELのシステムの情報を一括で取得する方法です。RHELのサポートに問い合わせを行うときにも使用されます。
sos reportコマンドを実行する!(RHEL 8.4)
sos reportコマンドを使用すると、RHELのサポートに提出するシステムの情報を一括で取得できます。以下は、RHEL 8.4での実行例です。
$ sudo sos report -a sosreport (version 4.0) 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.fm8welvf and may be provided to a Red Hat support representative. Any information provided to Red Hat will be treated in accordance with the published support policies at: https://access.redhat.com/support/ 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 changes will be made to system configuration. Press ENTER to continue, or CTRL-C to quit. Please enter the case id that you are generating this report for []: sosreport-1 Setting up archive ... Setting up plugins ... [plugin:networking] skipped command 'ip -s macsec show': required kmods missing: macsec. Use '--allow-system-changes' to enable collection. [plugin:networking] skipped command 'ss -peaonmi': required kmods missing: af_packet_diag, tcp_diag, inet_diag, udp_diag, netlink_diag, unix_diag. Use '--allow-system-changes' to enable collection. [plugin:networking] WARNING (about to collect 'ethtool -e lo'): collecting an eeprom dump is known to cause certain NIC drivers (e.g. bnx2x/tg3) to interrupt device operation [plugin:networking] WARNING (about to collect 'ethtool -e enp0s3'): collecting an eeprom dump is known to cause certain NIC drivers (e.g. bnx2x/tg3) to interrupt device operation [plugin:systemd] skipped command 'systemd-resolve --status': required services missing: systemd-resolved. [plugin:systemd] skipped command 'systemd-resolve --statistics': required services missing: systemd-resolved. Running plugins. Please wait ... Finishing plugins [Running: rpm] Finished running plugins Creating compressed archive... Your sosreport has been generated and saved in: /var/tmp/sosreport-vmsaca01-sosreport-1-2022-12-26-zwasehv.tar.xz Size 20.73MiB Owner root md5 b4edcb02f437a4ccfa71cda94fc99923 Please send this file to your support representative.
作成されたレポートファイルを確認する!
採取したファイルを確認します。tar.xz形式でアーカイブされています。
$ sudo ls -l /var/tmp/ total 21228 -rw------- 1 root root 21732348 Dec 26 18:25 sosreport-vmsaca01-sosreport-1-2022-12-26-zwasehv.tar.xz -rw-r--r-- 1 root root 33 Dec 26 18:25 sosreport-vmsaca01-sosreport-1-2022-12-26-zwasehv.tar.xz.md5 drwx------ 3 root root 17 Dec 26 16:29 systemd-private-27c9a748e1e24cb98619c327f1d90acb-chronyd.service-TFJcDg drwx------ 3 root root 17 Dec 26 16:29 systemd-private-27c9a748e1e24cb98619c327f1d90acb-httpd.service-9lGtzg
アーカイブの中身は、以下で確認できます。
tar -tvf sosreport-vmsaca01-sosreport-1-2022-12-26-zwasehv.tar.xz
おわりに
「sos report」コマンドは、RHELのサポートへのシステムの情報の提出用のコマンドですが、トラブル時の調査に必要となる情報を知るのに役立てることもできます。
参考情報
関連記事
関連書籍(Amazon)