compute
更新时间: 2025/02/12
在Gitcode上查看源码

功能简介

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

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

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

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

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

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

API使用说明

CPU对象 相关RPC方法

bmc.kepler.Metric GetData

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

'cpu.cpuhealth'
'cpu.cpucorerem'
'cpu.cpumemtemp'
命令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

返回1:a(sas) 1 "cpu.cpuhealth" 1 "0"

命令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

返回2:a(sas) 2 "cpu.cpuhealth" 1 "0" "cpu.cpucorerem" 1 "36.2"

命令3:mdbctl call CPU_1_010101 bmc.kepler.Metric GetData 0 1 cpu.cpuhealth

返回3:1 "cpu.cpuhealth" 1 "0"

bmc.kepler.Metric GetItems

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

命令1:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Processors/CPU/CPU_1_010101 bmc.kepler.Metric GetItems a{ss} 0

返回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"

命令2:mdbctl call CPUMetrics_1_010101  bmc.kepler.Metric GetItems 0

返回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"

CPUMetrics对象 相关RPC方法

bmc.kepler.Systems.Processor.ProcessorMetrics SetBandwidthThreshold

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

命令1:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Processors/CPU bmc.kepler.Systems.Processor.ProcessorMetrics SetBandwidthThreshold a{ss}y 0 255

返回1:Call failed: {"registry_prefix":"Base","name":"InternalError","format":"The request failed due to an internal service error.  The service is still operational."}

命令2:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Processors/CPU bmc.kepler.Systems.Processor.ProcessorMetrics SetBandwidthThreshold a{ss}y 0 85

返回2:i 0

命令3:mdbctl call CPUMetrics_1_010101 bmc.kepler.Systems.Processor.ProcessorMetrics SetBandwidthThreshold 0 85

返回3:0

bmc.kepler.Systems.Processor.ProcessorMetrics GetBandwidthHistory

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

命令1:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Processors/CPU bmc.kepler.Systems.Processor.ProcessorMetrics GetBandwidthHistory a{ss} 0

返回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\"}]"

命令2:mdbctl call CPUMetrics_1_010101 bmc.kepler.Systems.Processor.ProcessorMetrics GetBandwidthHistory 0

返回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.Metric GetData

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

'system.cpuutilise'

bmc.kepler.Metric GetItems

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

Memory对象 相关RPC方法

bmc.kepler.Metric GetData

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

'memory.memhealth'
'memory.dimmtemp'

bmc.kepler.Metric GetItems

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

MemoryMetrics对象 相关RPC方法

bmc.kepler.Systems.Memory.MemoryMetrics SetBandwidthThreshold

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

bmc.kepler.Systems.Memory.MemoryMetrics GetBandwidthHistory

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

bmc.kepler.Systems.Memory.MemoryMetrics ClearBandwidthHistory

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

bmc.kepler.Metric GetData

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

'system.memutilise'
'system.membandwidthutilise'

bmc.kepler.Metric GetItems

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

NPUs对象 相关RPC方法

bmc.kepler.Systems.Processor.NPUs DumpNpuLog

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

命令1:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Processors/NPU bmc.kepler.Systems.Processor.NPUs DumpNpuLog a{ss}y 0 3

返回1:u 2841737585

命令2:mdbctl call CPUMetrics_1_010101  bmc.kepler.Systems.Processor.NPUs DumpNpuLog 0 1

返回2:2841737585

NPU对象 相关RPC方法

bmc.kepler.Metric GetData

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

'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)。具体调用方法如下:

命令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

返回1:ssss "{\"Count\":0,\"AggregateTotalCount\":0,\"Info\":null}" "{\"Count\":0,\"AggregateTotalCount\":0,\"Info\":null}" "{\"Count\":0,\"Info\":null}" "{\"Count\":0,\"Info\":null}"

命令2:mdbctl call NPU_1_0101010302  bmc.kepler.Systems.Processor.NPU GetEccInfo 0 3

返回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。第二个参数取值有

'Blackbox'
'Device'

具体调用方法如下:

命令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

返回1:u 2734174509

命令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

返回2:u 2734174509

命令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

返回3:u 2734174509

命令4:mdbctl call NPU_1_0101010302  bmc.kepler.Systems.Processor.NPU DumpLog 0 1 Blackbox /tmp

返回4:2734174509

NPUCard对象 相关RPC方法

bmc.kepler.Managers.Syslog.Report ReportControl

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

命令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

命令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

命令3:mdbctl call NPUCard_1_0101010302  bmc.kepler.Managers.Syslog.Report ReportControl 0 0 1

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

PMU对象 相关RPC方法

bmc.kepler.Systems.Pmu Reset

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

命令1:busctl --user call bmc.kepler.compute /bmc/kepler/Systems/1/Pmu bmc.kepler.Systems.Pmu Reset a{ss} 0

返回1:y 0

命令2:mdbctl call Pmu_1_010101 bmc.kepler.Systems.Pmu Reset 0

返回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

命令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

返回1:qq 6629 41248

命令2:mdbctl call Pmu_1_010101 bmc.kepler.Systems.Pmu GetPcieVidDid 0 1 true 0 1 0 0

返回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

命令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

返回1:qq 6629 41248

命令2:mdbctl call Pmu_1_010101 bmc.kepler.Systems.Pmu GetPcieVidDid 0 1 true 0 1 0 0

返回2:[6629,41248]

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

日志介绍

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

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的相关信息。

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

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,以一份一键收集中的文件进行简要介绍

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,以一份一键收集中的文件进行简要介绍

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 错误计数、差异化/冗余校验错误、固件版本、软件驱动版本。

对于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}

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

{Component.Name}_{PCIeCard.Name}

内容格式为:

{
    "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
            }
        }
    ]
}