compute 计算部件管理服务

版本信息

项目内容
组件版本1.100.30
首发版本openUBMC 1.0.0
文档作者openUBMC
最后更新2026-06-16

1. 组件概述

1.1 组件简介

compute组件是 openUBMC 系统中负责硬件管理的核心组件,主要用于管理CPU、内存、NPU和NPU卡。具体的管理功能有:

(1)CPU管理:CPU的静态信息更新、动态信息获取与日志收集

(2)内存管理:内存的静态信息更新、动态信息获取与日志收集

(3)NPU管理:NPU的静态信息更新、动态信息获取、日志收集与升级

(4)NPU卡管理:NPU卡的静态信息更新、动态信息获取、日志收集与升级

现就社区比较关注的API使用说明、日志进行相关介绍。

1.2 核心功能

  • CPU管理:CPU的静态信息更新、动态信息获取与日志收集
  • 内存管理:内存的静态信息更新、动态信息获取与日志收集
  • NPU管理:NPU的静态信息更新、动态信息获取、日志收集与升级
  • NPU卡管理:NPU卡的静态信息更新、动态信息获取、日志收集与升级

1.3 关键术语表

术语解释
CPU中央处理器,负责执行计算机的主要计算任务
NPU神经网络处理器,专门用于加速人工智能和深度学习计算
Memory内存,用于存储正在运行的程序和数据
NPUCardNPU卡,包含NPU芯片的PCIe扩展卡
PMU处理器管理单元,负责系统处理器管理和监控
ECC错误检查和纠正,用于检测和纠正内存中的数据错误
Metric指标对象,用于获取硬件的动态性能数据
BandwidthThreshold带宽阈值,用于设置CPU或内存占用率的告警阈值

2. API 使用说明与示例

2.1 CPU对象

bmc.kepler.Metric GetData

该方法的详细定义位于bmc.kepler.Metric,第一个参数为查询的指标数量,第二个参数为查询的具体指标,可选参数有

text
'cpu.cpuhealth'
'cpu.cpucorerem'
'cpu.cpumemtemp'
功能说明
属性内容
接口名bmc.kepler.Metric
首发版本openUBMC 1.0.0
废弃状态正常可用
参数说明
参数名方向类型描述取值范围
指标数量输入int查询的指标数量0-N
指标名称输入string[]查询的具体指标cpu.cpuhealth, cpu.cpucorerem, cpu.cpumemtemp
返回值与异常
返回值含义触发条件处理建议
a(sas)成功正常执行完成
错误信息失败参数错误或对象不存在检查参数和对象路径
调试示例
bash
命令1:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Processors/CPU/CPU_1_010101 bmc.kepler.Metric GetData a{ss}as 0 1 cpu.cpuhealth
text
返回1:a(sas) 1 "cpu.cpuhealth" 1 "0"
bash
命令2:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Processors/CPU/CPU_1_010101 bmc.kepler.Metric GetData a{ss}as 0 2 cpu.cpuhealth cpu.cpucorerem
text
返回2:a(sas) 2 "cpu.cpuhealth" 1 "0" "cpu.cpucorerem" 1 "36.2"
bash
命令3:mdbctl call CPU_1_010101 bmc.kepler.Metric GetData 0 1 cpu.cpuhealth
text
返回3:1 "cpu.cpuhealth" 1 "0"

bmc.kepler.Metric GetItems

该方法的详细定义位于bmc.kepler.Metric,该方法没有参数

功能说明
属性内容
接口名bmc.kepler.Metric
首发版本openUBMC 1.0.0
废弃状态正常可用
参数说明
参数名方向类型描述取值范围
--该方法没有参数-
返回值与异常
返回值含义触发条件处理建议
sa(ss)a(ss)as成功正常执行完成
错误信息失败对象不存在检查对象路径
调试示例
bash
命令1:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Processors/CPU/CPU_1_010101 bmc.kepler.Metric GetItems a{ss} 0
text
返回1:sa(ss)a(ss)as "CPU" 6 "Manufacturer" "HiSilicon" "Version" "Kunpeng 920 7280Z" "CoreCount" "80" "ThreadCount" "160" "MaxSpeed" "2900" "SystemId" "1" 3 "SN" "1371F5A50061AA15" "DeviceName" "CPU1" "ComNodeId" "1" 3 "cpu.cpuhealth" "cpu.cpucorerem" "cpu.cpumemtemp"
bash
命令2:mdbctl call CPUMetrics_1_010101  bmc.kepler.Metric GetItems 0
text
返回2:6 "Manufacturer" "HiSilicon" "Version" "Kunpeng 920 7280Z" "CoreCount" "80" "ThreadCount" "160" "MaxSpeed" "2900" "SystemId" "1" 3 "SN" "1371F5A50061AA15" "DeviceName" "CPU1" "ComNodeId" "1" 3 "cpu.cpuhealth" "cpu.cpucorerem" "cpu.cpumemtemp"

2.2 CPUMetrics对象

bmc.kepler.Systems.Processor.ProcessorMetrics SetBandwidthThreshold

该方法的详细定义位于bmc.kepler.Systems.Processor.ProcessorMetrics,主要作用是设置CPU占用率,参数为要设置的值。参数设定范围为0-100,超出该范围会抛错,参考命令1的返回。

功能说明
属性内容
接口名bmc.kepler.Systems.Processor.ProcessorMetrics
首发版本openUBMC 1.0.0
废弃状态正常可用
参数说明
参数名方向类型描述取值范围
阈值值输入uint8要设置的CPU占用率阈值0-100
返回值与异常
返回值含义触发条件处理建议
i 0成功正常执行完成
InternalError失败参数超出范围检查参数值是否在0-100范围内
调试示例
bash
命令1:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Processors/CPU bmc.kepler.Systems.Processor.ProcessorMetrics SetBandwidthThreshold a{ss}y 0 255
text
返回1:Call failed: {"registry_prefix":"Base","name":"InternalError","format":"The request failed due to an internal service error.  The service is still operational."}
bash
命令2:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Processors/CPU bmc.kepler.Systems.Processor.ProcessorMetrics SetBandwidthThreshold a{ss}y 0 85
text
返回2:i 0
bash
命令3:mdbctl call CPUMetrics_1_010101 bmc.kepler.Systems.Processor.ProcessorMetrics SetBandwidthThreshold 0 85
text
返回3:0

bmc.kepler.Systems.Processor.ProcessorMetrics GetBandwidthHistory

该方法的详细定义位于bmc.kepler.Systems.Processor.ProcessorMetrics,主要作用是查询CPU占用率历史记录,无参数,直接调用即可。

功能说明
属性内容
接口名bmc.kepler.Systems.Processor.ProcessorMetrics
首发版本openUBMC 1.0.0
废弃状态正常可用
参数说明
参数名方向类型描述取值范围
--该方法没有参数-
返回值与异常
返回值含义触发条件处理建议
s成功正常执行完成
错误信息失败对象不存在检查对象路径
调试示例
bash
命令1:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Processors/CPU bmc.kepler.Systems.Processor.ProcessorMetrics GetBandwidthHistory a{ss} 0
text
返回1:s "[{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:12:39\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:13:41\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:14:42\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:15:44\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:16:45\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:17:47\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:18:49\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:19:50\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:20:52\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:21:53\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:22:55\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:23:57\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:24:58\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:26:00\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:27:01\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:28:03\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:29:05\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:30:06\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:31:08\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:32:09\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:33:11\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:34:13\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:35:14\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:36:16\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:37:18\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:38:19\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:39:21\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:40:22\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:41:24\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:42:26\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:43:27\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:44:29\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:45:30\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:46:32\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:47:34\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:48:35\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:49:37\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:50:38\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:51:40\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:52:41\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:53:43\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:54:45\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:55:46\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:56:48\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:57:50\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:58:51\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:59:53\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:00:54\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:01:56\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:02:58\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:03:59\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:05:01\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:06:02\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:07:04\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:08:06\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:09:07\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:10:09\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:11:11\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:12:12\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:13:14\"}]"
bash
命令2:mdbctl call CPUMetrics_1_010101 bmc.kepler.Systems.Processor.ProcessorMetrics GetBandwidthHistory 0
text
返回2:"[{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:12:39\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:13:41\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:14:42\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:15:44\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:16:45\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:17:47\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:18:49\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:19:50\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:20:52\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:21:53\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:22:55\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:23:57\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:24:58\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:26:00\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:27:01\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:28:03\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:29:05\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:30:06\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:31:08\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:32:09\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:33:11\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:34:13\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:35:14\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:36:16\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:37:18\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:38:19\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:39:21\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:40:22\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:41:24\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:42:26\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:43:27\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:44:29\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:45:30\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:46:32\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:47:34\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:48:35\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:49:37\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:50:38\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:51:40\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:52:41\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:53:43\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:54:45\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:55:46\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:56:48\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:57:50\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:58:51\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 10:59:53\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:00:54\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:01:56\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:02:58\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:03:59\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:05:01\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:06:02\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:07:04\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:08:06\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:09:07\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:10:09\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:11:11\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:12:12\"},{\"CpuUtilisePercents\":0,\"Time\":\"2001/02/18 11:13:14\"}]"

bmc.kepler.Systems.Processor.ProcessorMetrics ClearBandwidthHistory

该方法的详细定义位于bmc.kepler.Systems.Processor.ProcessorMetrics,主要作用是用于清除CPU的占用率历史数据,无参数,参考其他方法进行调用即可。

功能说明
属性内容
接口名bmc.kepler.Systems.Processor.ProcessorMetrics
首发版本openUBMC 1.0.0
废弃状态正常可用
参数说明
参数名方向类型描述取值范围
--该方法没有参数-
返回值与异常
返回值含义触发条件处理建议
成功成功正常执行完成
错误信息失败对象不存在检查对象路径

bmc.kepler.Metric GetData

该方法的详细定义位于bmc.kepler.Metric,该方法调用方法与CPU对象的该方法完全一致,第二个参数为

text
'system.cpuutilise'

bmc.kepler.Metric GetItems

该方法的详细定义位于bmc.kepler.Metric,该方法调用方法与CPU对象的该方法完全一致

2.3 Memory对象

bmc.kepler.Metric GetData

该方法的详细定义位于bmc.kepler.Metric,该方法调用方法与CPU对象的该方法完全一致,第二个参数为

text
'memory.memhealth'
'memory.dimmtemp'

bmc.kepler.Metric GetItems

该方法的详细定义位于bmc.kepler.Metric,该方法调用方法与CPU对象的该方法完全一致

2.4 MemoryMetrics对象

bmc.kepler.Systems.Memory.MemoryMetrics SetBandwidthThreshold

该方法的详细定义位于bmc.kepler.Systems.Memory.MemoryMetrics,该方法的调用方法与参数与CPUMetrics对象的该方法完全一致,可参考2.2节。

bmc.kepler.Systems.Memory.MemoryMetrics GetBandwidthHistory

该方法的详细定义位于bmc.kepler.Systems.Memory.MemoryMetrics,该方法的调用方法与参数与CPUMetrics对象的该方法完全一致,可参考2.2节。

bmc.kepler.Systems.Memory.MemoryMetrics ClearBandwidthHistory

该方法的详细定义位于bmc.kepler.Systems.Memory.MemoryMetrics,该方法的调用方法与参数与CPUMetrics对象的该方法完全一致,可参考2.2节。

bmc.kepler.Metric GetData

该方法的详细定义位于bmc.kepler.Metric,该方法调用方法与CPU对象的该方法完全一致,第二个参数为

text
'system.memutilise'
'system.membandwidthutilise'

bmc.kepler.Metric GetItems

该方法的详细定义位于bmc.kepler.Metric,该方法调用方法与CPU对象的该方法完全一致

2.5 NPUs对象

bmc.kepler.Systems.Processor.NPUs DumpNpuLog

该方法的详细定义位于bmc.kepler.Systems.Processor.NPUs,该方法作用为出发NPU日志收集,该方法有一个参数,第一个参数代表 npu_id,为NPU对象 bmc.kepler.Systems.Processor接口下的Id属性,返回值为任务 id(task_id)。具体调用方法如下:

功能说明
属性内容
接口名bmc.kepler.Systems.Processor.NPUs
首发版本openUBMC 1.0.0
废弃状态正常可用
参数说明
参数名方向类型描述取值范围
npu_id输入uint8NPU对象的Id属性NPU Id值
返回值与异常
返回值含义触发条件处理建议
u成功正常执行完成返回任务ID
错误信息失败NPU不存在检查NPU Id
调试示例
bash
命令1:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Processors/NPU bmc.kepler.Systems.Processor.NPUs DumpNpuLog a{ss}y 0 3
text
返回1:u 2841737585
bash
命令2:mdbctl call CPUMetrics_1_010101  bmc.kepler.Systems.Processor.NPUs DumpNpuLog 0 1
text
返回2:2841737585

2.6 NPU对象

bmc.kepler.Metric GetData

该方法的详细定义位于bmc.kepler.Metric,该方法调用方法与CPU对象的该方法完全一致,第二个参数为

text
'npu.aicpu_utilise'
'npu.hbmbw_utilise'
'npu.hbm_utilise'
'npu.aicore_utilise'
'npu.ctrlcpu_utilise'
'npu.aicore_temp'
'npu.nimbus_temp'
'npu.hbm_temp'
'npu.vrdchip_temp'

bmc.kepler.Metric GetItems

该方法的详细定义位于bmc.kepler.Metric,该方法调用方法与CPU对象的该方法完全一致

bmc.kepler.Systems.Processor.NPU GetEccInfo

该方法的详细定义位于bmc.kepler.Systems.Processor.NPU,该方法作用为获取NPU的ECC错误信息,该方法有一个参数,第一个参数代表npu_id,为NPU对象 bmc.kepler.Systems.Processor接口下的Id属性,返回值为任务id(task_id)。具体调用方法如下:

功能说明
属性内容
接口名bmc.kepler.Systems.Processor.NPU
首发版本openUBMC 1.0.0
废弃状态正常可用
参数说明
参数名方向类型描述取值范围
npu_id输入uint8NPU对象的Id属性NPU Id值
返回值与异常
返回值含义触发条件处理建议
ssss成功正常执行完成返回ECC信息
错误信息失败NPU不存在检查NPU Id
调试示例
bash
命令1:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Processors/NPU/NPU_1_0101010302 bmc.kepler.Systems.Processor.NPU GetEccInfo a{ss}y 0 3
text
返回1:ssss "{\"Count\":0,\"AggregateTotalCount\":0,\"Info\":null}" "{\"Count\":0,\"AggregateTotalCount\":0,\"Info\":null}" "{\"Count\":0,\"Info\":null}" "{\"Count\":0,\"Info\":null}"
bash
命令2:mdbctl call NPU_1_0101010302  bmc.kepler.Systems.Processor.NPU GetEccInfo 0 3
text
返回2:"{\"Count\":0,\"AggregateTotalCount\":0,\"Info\":null}" "{\"Count\":0,\"AggregateTotalCount\":0,\"Info\":null}" "{\"Count\":0,\"Info\":null}" "{\"Count\":0,\"Info\":null}"

bmc.kepler.Systems.Processor.NPU DumpLog

该方法的详细定义位于bmc.kepler.Systems.Processor.NPU,该方法作用为出发NPU的日志收集,该方法参数类型为a{ss}ass,有三个参数,第一个参数为下载的日志的数量,若为0则表示下载全部日志,第二个为下载日志的种类,第三个参数为日志文件存放的地址。返回值为task_id。第二个参数取值有

text
'Blackbox'
'Device'

具体调用方法如下:

功能说明
属性内容
接口名bmc.kepler.Systems.Processor.NPU
首发版本openUBMC 1.0.0
废弃状态正常可用
参数说明
参数名方向类型描述取值范围
日志数量输入int下载的日志数量,0表示全部0-N
日志种类输入string[]下载日志的种类Blackbox, Device
文件地址输入string日志文件存放地址文件路径
返回值与异常
返回值含义触发条件处理建议
u成功正常执行完成返回任务ID
错误信息失败参数错误或NPU不存在检查参数和NPU路径
调试示例
bash
命令1:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Processors/NPU/NPU_1_0101010302 bmc.kepler.Systems.Processor.NPU DumpLog a{ss}ass 0 1 Blackbox /tmp
text
返回1:u 2734174509
bash
命令2:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Processors/NPU/NPU_1_0101010302 bmc.kepler.Systems.Processor.NPU DumpLog a{ss}ass 0 2 Blackbox Device /tmp
text
返回2:u 2734174509
bash
命令3:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Processors/NPU/NPU_1_0101010302 bmc.kepler.Systems.Processor.NPU DumpLog a{ss}ass 0 0 /tmp
text
返回3:u 2734174509
bash
命令4:mdbctl call NPU_1_0101010302  bmc.kepler.Systems.Processor.NPU DumpLog 0 1 Blackbox /tmp
text
返回4:2734174509

2.7 NPUCard对象

bmc.kepler.Managers.Syslog.Report ReportControl

该方法的详细定义位于bmc.kepler.Managers.Syslog.Report,该rpc方法用于使能NPUsyslog上报,共计三个参数第一个参数为数组长度,第二个参数为两个字符串,第三个参数为数字,用于指定syslog参数。具体调用方法如下

功能说明
属性内容
接口名bmc.kepler.Managers.Syslog.Report
首发版本openUBMC 1.0.0
废弃状态正常可用
参数说明
参数名方向类型描述取值范围
数组长度输入int数组长度0-N
字符串参数输入string[]两个字符串参数true/false等
syslog参数输入uint8syslog参数数字值
返回值与异常
返回值含义触发条件处理建议
成功成功正常执行完成
错误信息失败参数错误检查参数
调试示例
bash
命令1:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/PCIeDevices/PCIeCards/NPUCards/NPUCard_1_0101010302 bmc.kepler.Managers.Syslog.Report ReportControl a{ss}a{ss}y 0 0 1
bash
命令2:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/PCIeDevices/PCIeCards/NPUCards/NPUCard_1_0101010302 bmc.kepler.Managers.Syslog.Report ReportControl a{ss}a{ss}y 0 1 true false 1
bash
命令3:mdbctl call NPUCard_1_0101010302  bmc.kepler.Managers.Syslog.Report ReportControl 0 0 1

其中对于第二个参数中的第一个字符串,若取值为true,则会由于当下NPUCard对象不支持ChipLog,导致不使能NPUsyslog

2.8 PMU对象

bmc.kepler.Systems.Pmu Reset

该方法的详细定义位于bmc.kepler.Systems.Pmu,该方法用于复位PMU,无参数

功能说明
属性内容
接口名bmc.kepler.Systems.Pmu
首发版本openUBMC 1.0.0
废弃状态正常可用
参数说明
参数名方向类型描述取值范围
--该方法没有参数-
返回值与异常
返回值含义触发条件处理建议
y 0成功正常执行完成
错误信息失败PMU不存在检查PMU路径
调试示例
bash
命令1:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Pmu bmc.kepler.Systems.Pmu Reset a{ss} 0
text
返回1:y 0
bash
命令2:mdbctl call Pmu_1_010101 bmc.kepler.Systems.Pmu Reset 0
text
返回2:0

bmc.kepler.Systems.Pmu GetPcieVidDid

该方法的详细定义位于bmc.kepler.Systems.Pmu,该方法作用为获取PCIE的Vid/Did信息,参数依次为pcie设备归属的的SystemId, pcie设备是否为IsLocal, pcie设备归属的的CpuId, pcie设备的Bus, pcie设备的Device, pcie设备的Function

功能说明
属性内容
接口名bmc.kepler.Systems.Pmu
首发版本openUBMC 1.0.0
废弃状态正常可用
参数说明
参数名方向类型描述取值范围
SystemId输入uint8pcie设备归属的SystemIdSystem Id值
IsLocal输入boolpcie设备是否为IsLocaltrue/false
CpuId输入uint8pcie设备归属的CpuIdCpu Id值
Bus输入uint8pcie设备的BusBus值
Device输入uint8pcie设备的DeviceDevice值
Function输入uint8pcie设备的FunctionFunction值
返回值与异常
返回值含义触发条件处理建议
qq成功正常执行完成返回Vid和Did
错误信息失败参数错误检查参数
调试示例
bash
命令1:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Pmu bmc.kepler.Systems.Pmu GetPcieVidDid a{ss}ybyyyy 0 1 true 0 1 0 0
text
返回1:qq 6629 41248
bash
命令2:mdbctl call Pmu_1_010101 bmc.kepler.Systems.Pmu GetPcieVidDid 0 1 true 0 1 0 0
text
返回2:[6629,41248]

bmc.kepler.Systems.Pmu GetPcieSubVidDid

该方法的详细定义位于bmc.kepler.Systems.Pmu,该方法作用为获取PCIE的Vid/Did信息,参数依次为pcie设备归属的的SystemId, pcie设备归属的的IsLocal, pcie设备归属的的CpuId, pcie设备的Bus, pcie设备的Device, pcie设备的Function

功能说明
属性内容
接口名bmc.kepler.Systems.Pmu
首发版本openUBMC 1.0.0
废弃状态正常可用
参数说明
参数名方向类型描述取值范围
SystemId输入uint8pcie设备归属的SystemIdSystem Id值
IsLocal输入boolpcie设备归属的IsLocaltrue/false
CpuId输入uint8pcie设备归属的CpuIdCpu Id值
Bus输入uint8pcie设备的BusBus值
Device输入uint8pcie设备的DeviceDevice值
Function输入uint8pcie设备的FunctionFunction值
返回值与异常
返回值含义触发条件处理建议
qq成功正常执行完成返回Vid和Did
错误信息失败参数错误检查参数
调试示例
bash
命令1:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Pmu bmc.kepler.Systems.Pmu GetPcieVidDid a{ss}ybyyyy 0 1 true 0 1 0 0
text
返回1:qq 6629 41248
bash
命令2:mdbctl call Pmu_1_010101 bmc.kepler.Systems.Pmu GetPcieVidDid 0 1 true 0 1 0 0
text
返回2:[6629,41248]

4. 日志说明

4.1 一键日志收集

compute在一键收集中涉及的日志主要有

text
dump_info\AppDump\compute\mdb_info.log
dump_info\AppDump\compute\rpc_records.log
dump_info\AppDump\compute\skynet_info.json
dump_info\AppDump\compute\cpu_utilise_webview.dat
dump_info\AppDump\compute\NPU${npu_id}_hbm_webview.dat
dump_info\AppDump\compute\cpu_info
dump_info\AppDump\compute\mem_info
dump_info\AppDump\compute\npu_info
dump_info\AppDump\compute\sync_property_trace.log
dump_info\AppDump\fault_diagnosis\cpu1_m7_1_log
dump_info\AppDump\fault_diagnosis\imu_log
dump_info\LogDump\pciecard\PCIeCard2(NPU)_Atlas300IDUO\npu_ecc_info.json

其中mdb_info.logrpc_records.logsync_property_trace.log为所有app一键收集均涉及的日志文件,分别记录了资源协作路径、接口和属性信息、rpc方法调用记录、属性同步记录。cpu_utilise_webview.dat用于记录cpu历史占用率,dump_info\AppDump\compute\NPU${npu_id}_hbm_webview.dat用于记录特定npu的hbm温度历史记录,cpu_infomem_infonpu_info分别用于记录cpu、内存和NPU的相关信息。

4.2 关键日志信息

对于cpu_info,以一份一键收集中的文件进行简要介绍

text
slot(col 1), presence(col 2), version(col 3),processor ID(col 4), core count(col 5), thread count(col 6), memory technology(col 7), L1 cache(col 8), L2 cache(col 9), L3 cache(col 10), part number(col 11), device name(col 12), location(col 13), SN(col 14)
Cpu1,present,Kunpeng 920 7260T,20-D0-0F-48-00-00-00-00,64 cores,128 threads,64-bit Capable| Multi-Core| Hardware Thread| Execute Protection| Enhanced Virtualization| Power/Performance Control,8192 K,81920 K,114688 K,Unknown,CPU1,CpuBoard1,AC63322520E1711C
Cpu2,present,Kunpeng 920 7260T,20-D0-0F-48-00-00-00-00,64 cores,128 threads,64-bit Capable| Multi-Core| Hardware Thread| Execute Protection| Enhanced Virtualization| Power/Performance Control,8192 K,81920 K,114688 K,Unknown,CPU2,CpuBoard1,10C2B22520801679

第一行中介绍了数据的具体含义以及其所在的列,这些信息分别为插槽编号、在位信息、版本、处理器id、核心数、线程数、内存科技、L1 缓存大小、L2 缓存大小、L3 缓存大小、部件号、设备名、所在位置以及序列号。

对于memory_info,以一份一键收集中的文件进行简要介绍

text
slot(col 1), dimm location(col 2), dimm name(col 3),manufacturer(col 4), size(col 5), speed(col 6), current speed(col 7), memory type(col 8), SN(col 9), minimum voltage(col 10), rank(col 11), bit width(col 12), memory technology(col 13), bom number(col 14), part number(col 15),remaining service life(col 16), firmware version(col 17), medium temp(col 18), controller temp(col 19), volatile capacity(col 20), persistent capacity(col 21), health(col 22)
Memory000, CpuBoard1, DIMM000, Samsung, 32768 MB, 5600 MT/s, 4800 MT/s, DDR5, 80CE012338052E55C2, 1067 mV, 2 rank, 80 bit, Synchronous| Registered (Buffered), Unknown, M321R4GA3PB0-CWMJH, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, OK

第一行中介绍了数据的具体含义以及其所在的列,这些信息分别为插槽编号、DIMM 位置、DIMM 名称、制造商、容量、标称速率、当前运行速率、内存类型、序列号、最低工作电压、Rank 数量、位宽、内存技术特性、BOM 编号、部件号、剩余使用寿命、固件版本、介质温度、控制器温度、易失性容量、持久性容量、健康状态。

对于npu_info,以一份一键收集中的文件进行简要介绍

text
Name   |  Board       |  Power   |  WORKMODE    |  Single ECC    |  Double ECC  |  Diversification  |  FirmwareVersion      |  SoftwareVersion
NPU2-2  |  PCIe Card 2 (NPU)  |  719  W  |  Unknown     |  0             |  0           |  0                |  N/A                  |  N/A

第一行中介绍了数据的具体含义以及其所在的列,这些信息分别为NPU的名称、板卡信息、功耗、工作模式、单比特 ECC 错误计数、双比特 ECC 错误计数、差异化/冗余校验错误、固件版本、软件驱动版本。

4.3 IMU/M7日志

对于cpu1_m7_1_logimu_log,其为comput组件通过ipmi命令与imu交互获取到的arm芯片中imu与m7模块日志。对于不同的机型,收集的日志不尽相同,通过下表展示

机型收集日志列表
单host机型imu日志名格式:imu_log
m7日志名格式:cpu{cpu_id}_m7_{m7_id}_log
多host机型imu日志名格式:imu_log_system{system_id}
m7日志名格式:cpu{cpu_id}_m7_{m7_id}_log_system{system_id}

4.4 NPU ECC日志

对于npu_ecc_info.json,该日志存放于dump_info\LogDump\pciecard\PCIeCard2(NPU)_Atlas300IDUO\npu_ecc_info.json,上级文件夹命名格式为该npu归属的Component对象与PCIeCard对象的Name属性拼接而来,拼接规则为

text
{Component.Name}_{PCIeCard.Name}

内容格式为:

text
{
    "EccInfo": [
        {
            "Name": "NPU2-1",
            "Position": "PCIe Card $ (NPU)",
            "SingleBitEcc": {                                   -- 单比特 ECC 错误
                "Count": 0,
                "AggregateTotalCount": 0,                       -- 累计总单比特错误数
                "Info": null
            },
            "SingleBitIsolatedPages": {                         -- 因单比特错误频发而被隔离的内存页
                "Count": 0,
                "Info": null
            },
            "SingleBitNextIsolatedPages": {                     -- 因单比特错误频发即将被隔离的内存页
                "Count": 0
            },
            "MultiBitEcc": {                                    -- 多比特 ECC 错误
                "Count": 0,
                "AggregateTotalCount": 7,
                "Info": null
            },
            "MultiBitIsolatedPages": {                          -- 因多比特错误频发而被隔离的内存页
                "Count": 2,
                "Info": null
            },
            "MultiBitNextIsolatedPages": {                      -- 因多比特错误频发即将被隔离的内存页
                "Count": 0
            }
        }
    ]
}

附录

附录 A IPMI命令简介

当下openubmc提供的ipmi命令已有文档:IPMI OEM 命令索引集合进行了详细介绍,本小节仅列出compute组件提供的ipmi命令,其中命令字为92h的相关命令仅支持带内发送。具体命令字的拼写与解析,请查看ipmi接口说明。

序号命令描述网络功能码命令字子命令字
1Set DIMM Info30h92h2Ah
2Set Chip Bitwidth30h92h44h
3Set Chip Bitwidth30h92h56h
4Set Smbios ext Info30h92h5eh
5Set DIMM Manufacturer Info30h92h60h
6Set Resource Usage Alarm Threshold30h93h73h
7Get Power Statistic30h93h11h
8Get Device Info30h93h27h
9Get Threshold Sensor Reading30h93h31h
10Get Device Name30h93h40h
11Set Device Action30h93h53h
12Get Device Action Result30h93h54h

附录 B 修订记录

版本日期修订人修订内容
v1.02026-06-16openUBMC初始版本创建