1.4. 複数のシステムで同時に sos レポートを生成および収集する

sos ユーティリティーを使用して、複数のシステムで sos report コマンドをトリガーできます。レポートが終了するまで待機し、生成されたすべてのレポートを収集します。

前提条件

  • 実行対象の クラスター タイプまたは ノード のリストを把握している。
  • すべてのシステムに sos パッケージをインストールしている。
  • すべてのシステムに root アカウントの ssh 鍵がある。または、--password オプションを使用して root パスワードを指定することもできます。

手順

  • sosreport コマンドを実行し、画面の指示に従います。

    注記

    デフォルトでは、sos collect は、レポートを収集する ノード を自動的に識別するために、実行対象の クラスター のタイプを特定しようとします。

    1. --cluster または --nodes オプションを使用して、クラスター または ノード の種類を手動で設定できます。
    2. --master オプションを使用して、sos ユーティリティーにリモートノードを指定し、クラスター タイプと ノード のリストを決定することもできます。したがって、sos レポートを収集するために クラスター ノード のいずれかにログインする必要はなく、ワークステーションから実行できます。
    3. --upload オプションを追加すると、sos report の生成直後にレポートを Red Hat に転送できます。
    4. 有効な sos report オプションをさらに指定できます。指定したオプションは、--batch--clean オプションなど、すべての sos レポートの実行に渡されます。
[root@primary-rhel9 ~]# 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

[root@primary-rhel9 ~]#

検証手順

  • sos collect コマンドが、/var/tmp/ ディレクトリーに、コマンド出力の説明に一致するアーカイブを作成したことを確認します。

    [root@primary-rhel9 ~]# 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

関連情報