您还可以使用 --master 选项将 sos 程序指向远程节点以确定 集群 类型和 节点列表。因此,您不必登录到其中一个集群节点来收集 sos 报告;您可以从您的工作站来做。
您可以添加 --upload 选项,在生成后立即将 sos 报告 传输到红帽。
可以进一步提供任何有效的 sos report 选项,它们会被传递到所有 sos 报告的执行。例如 --batch 和 --clean 选项。
sos collect --nodes=sos-node1,sos-node2 -o process,apache --log-size=50
[root@primary-rhel8 ~]# 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-rhel8
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-rhel8 : Generating sosreport...
sos-node1 : Generating sosreport...
sos-node2 : Generating sosreport...
primary-rhel8 : Retrieving sosreport...
sos-node1 : Retrieving sosreport...
primary-rhel8 : 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-04-15-pafsr.tar.xz
[root@primary-rhel8 ~]#
Copy to ClipboardCopied!Toggle word wrapToggle overflow
验证
验证 sos collect 命令在 /var/tmp/ 目录中创建了与命令输出中描述匹配的存档。
ls -l /var/tmp/sos-collector*
[root@primary-rhel8 ~]# 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
Copy to ClipboardCopied!Toggle word wrapToggle overflow