1.4. Generating and collecting sos reports on multiple systems concurrently
You can use the sos utility to trigger the sos report command on multiple systems. Wait for the report to terminate and collect all generated reports.
Prerequisites
- You know the cluster type or list of nodes to run on.
-
You have installed the
sospackage on all systems. -
You have
sshkeys for therootaccount on all the systems, or you can provide the root password via the--passwordoption.
Procedure
Run the
sos collectcommand and follow the on-screen instructions.注意By default,
sos collecttries to identify the type of cluster it runs on to automatically identify the nodes to collect reports from.-
You can set the cluster or nodes types manually with the
--clusteror--nodesoptions. -
You can also use the
--masteroption to point thesosutility at a remote node to determine the cluster type and the node lists. Thus, you do not have to be logged into one of the cluster nodes to collectsosreports; you can do it from your workstation. -
You can add the
--uploadoption to transfer thesos reportto Red Hat immediately after generating it. -
Any valid
sos reportoption can be further supplied and will be passed to allsosreports executions, such as the--batchand--cleanoptions.
[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 ~]#-
You can set the cluster or nodes types manually with the
Verification
Verify that the
sos collectcommand created an archive in the/var/tmp/directory matching the description from the command output.[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