1.4. 複数のシステムで同時に sos レポートを生成および収集する
sos ユーティリティーを使用して、複数のシステムで sos report コマンドをトリガーできます。レポートが終了するまで待機し、生成されたすべてのレポートを収集します。
前提条件
- 実行対象の クラスター タイプまたは ノード のリストを把握している。
-
すべてのシステムに
sosパッケージがインストールされている。 -
すべてのシステムに
rootアカウントのssh鍵がある。または、--passwordオプションを使用して root パスワードを指定することもできます。
手順
sos collectコマンドを実行し、画面の指示に従います。注記デフォルトでは、
sos collectは、レポートを収集する ノード を自動的に識別するために、実行対象の クラスター のタイプを特定しようとします。-
--clusterまたは--nodesオプションを使用して、クラスター または ノード のタイプを手動で設定できます。 -
--masterオプションを使用して、sosユーティリティーにリモートノードを指定し、クラスター のタイプと ノード のリストを決定することもできます。したがって、sosレポートを収集するために クラスター ノード のいずれかにログインする必要はなく、ワークステーションから実行できます。 -
--uploadオプションを追加すると、sosレポートの生成直後にレポートを Red Hat に転送できます。 -
有効な
sos reportオプションは追加で提供でき、--batchおよび--cleanオプションとして、すべてのsosレポート実行に渡されます。
[root@primary-rhel10 ~]# 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-rhel10 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-rhel10 : Generating sosreport... sos-node1 : Generating sosreport... sos-node2 : Generating sosreport... primary-rhel10 : Retrieving sosreport... sos-node1 : Retrieving sosreport... primary-rhel10 : 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 [root@primary-rhel10 ~]#-
検証
sos collectコマンドによって、コマンド出力の説明と一致するアーカイブが/var/tmp/ディレクトリーに作成されたことを確認します。[root@primary-rhel10 ~]# 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