跳到主要内容
版本:FCP 24.11

获取节点详细信息

名词解释

  • core节点: 核心节点,负责提供服务的节点,包括API服务、数据服务、计算服务等。

获取对象

  • 使用者提供的节点

信息列表

info
├── cpu_info.txt
├── disk_info.txt
├── gpu_info.txt
├── memory_info.txt
├── package_version_info.txt
├── process_info.txt
└── release_info.txt
log
└── syslog

获取信息方法

登陆到core节点上

检查support-tool是否安装

cd fastone-{VERSION}/ymir-specs/tools/
./support-tool -v

如果没安装,可自行下载s3://fastone-artifects/support-tool/{TAGS}/support-tool,TAGS为软件版本号,上传到core节点,并放到ymir-specs/tools/目录下。

aws s3 cp s3://fastone-artifects/support-tool/{TAGS}/support-tool .
chmod +x support-tool
mkdir fastone-{VERSION}/ymir-specs/tools/
mv support-tool fastone-{VERSION}/ymir-specs/tools/

使用方式

进入ymir-specs/tools/目录,执行./support-tool -h命令,查看帮助信息。

cd fastone-{VERSION}/ymir-specs/tools/
./support-tool -h

support-tool支持两种模式:

  1. 命令行模式(单节点模式):获取单个节点的详细信息,详见./support-tool -h,例子如下:

    • 密钥登录: -i 私钥文件路径 -p 端口号 用户名@IP地址
      ./support-tool -i test.pem -p 22 root@123.1.4.9
    • 密码登录: -passwd 密码 -p 端口号 用户名@IP地址
      ./support-tool -passwd 123456 -p 22 root@123.1.4.9
  2. 配置文件模式:获取多个节点的详细信息,配置文件格式如下:

    填写节点ssh连接信息文件

    编辑nodes.yaml文件,内容如下:

    -
    hosts: # 节点主机名或IP地址
    - example_host1
    - example_host2
    port: 22 # 节点ssh端口,默认22
    user: example_user1 # 节点登陆用户名
    password: example_password # 节点登陆密码,与密钥登陆方式二选一
    private_key: # 私钥方式,填写文本内容,与密码登陆方式二选一

    -
    hosts:
    - example_host3
    - example_host4
    port: 22
    user: example_user2
    password:
    private_key: |
    -----example_private_key2-----
    ./support-tool -f nodes.yaml

脚本输出

程序运行需要等待一段时间,日志会输出到屏幕上。如果运行成功,结果会保存在当前目录下,文件名为 scan-HOSTNAME-DATE.tar.gz ,其中HOSTNAME为节点主机名,DATE为当前日期。 解压文件,可以看到infolog两个目录,分别存放节点的详细信息和日志。结构参考信息列表