thermal_mgmt
更新时间:2024/12/19
在Gitcode上查看源码

功能简介

thermal_mgmt负责散热器件管理,提供散热器件状态监测、调速、异常告警和资产信息收集与展示的功能。

关键特性

1 风扇特性

  1. 风扇型号识别

通过对风扇槽位、转速、是否为双转子的筛选对风速型号进行唯一类别的判断。app启动后每检测到一个风扇就下发一个风扇识别转速,等待一定时间后,采集5次转速,舍去最大值和最小值,取剩余3次的转速计算平均值,平均值是落在哪个FanType的IdentifyRangeLow和IdentifyRangeHigh之间,则风扇类型识别成功

  1. 单双转子识别

根据单双转子在位识别,提供设置转子类型混插告警的功能。在刷新风扇转速是否稳定时,支持前、后转子最大转速区间内的稳定告警。

  1. 风扇转速管理

支持风扇批量转速管理与单风扇转速管理。批量转速管理提供对所有风扇PWM值批量下发与查询的能力。单风扇调速支持对单个风扇的转速管理。支持查询风扇转速的功能。 示例:

  • 资源协作接口
shell
    ├─/bmc/kepler/Systems
 └─/bmc/kepler/Systems/1
   └─/bmc/kepler/Systems/1/Thermal
     ├─/bmc/kepler/Systems/1/Thermal/FanTypes
 ├─/bmc/kepler/Systems/1/Thermal/FanTypes/FanType_8038P_010103
 └─/bmc/kepler/Systems/1/Thermal/FanTypes/FanType_8080P_010103
     └─/bmc/kepler/Systems/1/Thermal/Fans
       ├─/bmc/kepler/Systems/1/Thermal/Fans/Fan_1_010103
       ├─/bmc/kepler/Systems/1/Thermal/Fans/Fan_2_010103
       ├─/bmc/kepler/Systems/1/Thermal/Fans/Fan_3_010103
       └─/bmc/kepler/Systems/1/Thermal/Fans/Fan_4_010103
  • busctl设置所有风扇转速为50%
shell
> busctl --user call bmc.kepler.thermal_mgmt /bmc/kepler/Systems/1/Thermal/Fans bmc.kepler.Systems.Fans SetPWM a{ss}ad 0 4 50 50 50 50
  • busctl设置风扇1转速为50%
shell
> busctl --user call bmc.kepler.thermal_mgmt /bmc/kepler/Systems/1/Thermal/Fans/Fan_1_010103 bmc.kepler.Systems.Fan SetFanPWM a{ss}d 0 50
  1. 风扇状态监测

风扇状态监测包含状态异常、风扇类型混插监测的能力。 风扇异常状态: 1.风扇不在位。 2.风扇转速偏差大。风扇pwm稳定期间,多次采集的转子转速与预期转速相差超过25%则状态异常。

  1. 风扇信息收集与展示

在Web风扇&散热界面与一键收集日志fan_info.txt、thermal_info.txt中可查看风扇槽位号、名称、型号、转速、速率比以及部件编码等信息。

2 液冷泵特性

  1. 液冷泵转速管理

支持液冷泵批量转速管理,提供对所有液冷泵PWM值批量下发与查询的能力。 示例:

  • 资源协作接口
shell
    ├─/bmc/kepler/Systems
 └─/bmc/kepler/Systems/1
   └─/bmc/kepler/Systems/1/Thermal
     ├─/bmc/kepler/Systems/1/Thermal/FanTypes
 ├─/bmc/kepler/Systems/1/Thermal/FanTypes/FanType_8038P_010103
 └─/bmc/kepler/Systems/1/Thermal/FanTypes/FanType_8080P_010103
     ├─/bmc/kepler/Systems/1/Thermal/Fans
 ├─/bmc/kepler/Systems/1/Thermal/Fans/Fan_1_010103
 ├─/bmc/kepler/Systems/1/Thermal/Fans/Fan_2_010103
 ├─/bmc/kepler/Systems/1/Thermal/Fans/Fan_3_010103
 └─/bmc/kepler/Systems/1/Thermal/Fans/Fan_4_010103
     └─/bmc/kepler/Systems/1/Thermal/Pumps
       ├─/bmc/kepler/Systems/1/Thermal/Pumps/Pump_1_010103
       └─/bmc/kepler/Systems/1/Thermal/Pumps/Pump_2_010103
  • 设置所有泵转速50%
shell
> busctl --user call bmc.kepler.thermal_mgmt /bmc/kepler/Systems/1/Thermal/Pumps bmc.kepler.Systems.Pumps SetPWM a{ss}ad 0 2 50 50
  1. 液冷泵状态监测

液冷泵状态监测,包括液冷泵正常状态、异常转速、是否在位、与停转监测的能力。

  1. 液冷泵信息收集与展示

在Web风扇&散热界面可查看LAAC泵转速、速率比与部件编码信息。

3 关断阀特性

  1. 关断阀基础信息

支持关断阀硬件基础信息的查询,包括槽位号、在位状态、开度、标定开度、开度状态。

  1. 关断阀开度值管理

在关断阀巡检时,会对关断阀设置目标开度值并对下发的值进行误差检验,最后将检验结果更新为开度值状态。支持查询、设置开度值。

  1. 关断阀巡检

支持巡检信息的查询,包括关断阀巡检类型、巡检结果、巡检状态、最后一次巡检时间。提供两种巡检方式,分别是不巡检与例行巡检(仅支持月度巡检)。月度巡检会对关断阀进行批量读值,以定期监控阀的健康状况,记录日志,并上报网管。

对外接口

1 资源协作接口

  1. Fan
Object(path)interfacemethod/property/signalType取值类型备注
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanFanIdpropertyU16风扇ID
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanSlotpropertyU8风扇槽位
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanTypepropertyU8风扇类型
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanModelpropertyString风扇类型
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanCoefficientpropertyU8风扇转速系数
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanFanHealthpropertyU8风扇健康
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanFanEntitypropertyString风扇实例
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanFrontPresencepropertyU8前风扇在位
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanRearPresencepropertyU8后风扇在位
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanFrontSpeedpropertyU16前风扇转速
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanRearSpeedpropertyU16后风扇转速
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanFrontStatuspropertyU8前风扇状态
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanRearStatuspropertyU8后风扇状态
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanFrontRPMpropertyU16前泵转速
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanRearRPMpropertyU16后泵转速
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanHardwarePWMpropertyDouble硬件转速百分比
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanPWMPercentagepropertyU32转速百分比
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanExpectedPWMpropertyDouble预期转速百分比
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanFanAlarmLedpropertyU8风扇告警
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanBOMpropertyStringBOM编码
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanSystemIdpropertyU8系统Id
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanMaxSupportedPWMpropertyU32最大支持转速
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanIdentifySpeedLevelpropertyU8识别风速级别
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanPartNumberpropertyString部件号
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanFrontMaxSpeedpropertyU32前转子最大转速
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanRearMaxSpeedpropertyU32后转子最大转速
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanIsTwinspropertyBoolean是否为单双转子
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanPositionpropertyString容器信息
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanFunctionDescpropertyString功能描述
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanDeviceNamepropertyString部件名称
/bmc/kepler/Systems/:SystemId/Thermal/Fans/:Idbmc.kepler.Systems.FanSpeedStablepropertyBoolean风扇转速是否稳定(true:稳定,false:不稳定),期望转速与实际转速比相差25%以内为稳定
  1. Pump
Object(path)interfacemethod/property/signalType取值类型备注
/bmc/kepler/Systems/:SystemId/Thermal/Pumps/:Idbmc.kepler.Systems.PumpIdpropertyU16泵Id
/bmc/kepler/Systems/:SystemId/Thermal/Pumps/:Idbmc.kepler.Systems.PumpSlotpropertyU8槽位
/bmc/kepler/Systems/:SystemId/Thermal/Pumps/:Idbmc.kepler.Systems.PumpModelpropertyString型号
/bmc/kepler/Systems/:SystemId/Thermal/Pumps/:Idbmc.kepler.Systems.PumpExpectedPWMpropertyDouble预期的PWM值
/bmc/kepler/Systems/:SystemId/Thermal/Pumps/:Idbmc.kepler.Systems.PumpActualPWMpropertyDouble实际PWM值
/bmc/kepler/Systems/:SystemId/Thermal/Pumps/:Idbmc.kepler.Systems.PumpMaxSupportedPWMpropertyU32泵全速额定PWM值
/bmc/kepler/Systems/:SystemId/Thermal/Pumps/:Idbmc.kepler.Systems.PumpSpeedRPMpropertyU16泵转速(转/分钟)
/bmc/kepler/Systems/:SystemId/Thermal/Pumps/:Idbmc.kepler.Systems.PumpPresencepropertyU8在位信息:1在位,0不在位
/bmc/kepler/Systems/:SystemId/Thermal/Pumps/:Idbmc.kepler.Systems.PumpStatuspropertyU8泵状态
/bmc/kepler/Systems/:SystemId/Thermal/Pumps/:Idbmc.kepler.Systems.PumpMaxSpeedRPMpropertyU32泵全速额定转速(转/分钟)
/bmc/kepler/Systems/:SystemId/Thermal/Pumps/:Idbmc.kepler.Systems.PumpPartNumberpropertyString部件号
  1. Fans
Object(path)interfacemethod/property/signalType取值类型备注
/bmc/kepler/Systems/:SystemId/Thermal/Fansbmc.kepler.Systems.FansSetPWMmethodDouble[]设置所有风扇转速
/bmc/kepler/Systems/:SystemId/Thermal/Fansbmc.kepler.Systems.FansWorkInStandbypropertyU8standby下风扇是否可以运转
  1. Pumps
Object(path)interfacemethod/property/signalType取值类型备注
/bmc/kepler/Systems/:SystemId/Thermal/Pumpsbmc.kepler.Systems.PumpsWorkInStandbypropertyU8standby下是否可以运转
/bmc/kepler/Systems/:SystemId/Thermal/Pumpsbmc.kepler.Systems.PumpsSetPWMmethodDouble[]设置所有泵转速
  1. Valves
Object(path)interfacemethod/property/signalType取值类型备注
/bmc/kepler/Chassis/:ChassisId/Thermal/Valvesbmc.kepler.Chassis.ValvesStartPatrolmethodU32启动关断阀巡检
/bmc/kepler/Chassis/:ChassisId/Thermal/Valvesbmc.kepler.Chassis.ValvesPatrolStatepropertyString巡检状态
/bmc/kepler/Chassis/:ChassisId/Thermal/Valvesbmc.kepler.Chassis.ValvesLastPatrolTimestamppropertyU32最近一次巡检时间
  1. Valve
Object(path)interfacemethod/property/signalType取值类型备注
/bmc/kepler/Chassis/:ChassisId/Thermal/Valves/:Idbmc.kepler.Chassis.ValveIdpropertyU8关断阀Id
/bmc/kepler/Chassis/:ChassisId/Thermal/Valves/:Idbmc.kepler.Chassis.ValveSlotpropertyU8关断阀槽位
/bmc/kepler/Chassis/:ChassisId/Thermal/Valves/:Idbmc.kepler.Chassis.ValvePresencepropertyU8关断阀在位。1在位,0不在位
/bmc/kepler/Chassis/:ChassisId/Thermal/Valves/:Idbmc.kepler.Chassis.ValveStatuspropertyU16关断阀故障状态: 0-正常, 非0-关断阀故障
/bmc/kepler/Chassis/:ChassisId/Thermal/Valves/:Idbmc.kepler.Chassis.ValveOpeningDegreeStatepropertyU8关断阀开度状态:0-正常, 1-异常
/bmc/kepler/Chassis/:ChassisId/Thermal/Valves/:Idbmc.kepler.Chassis.ValvePatrolResultpropertyU8关断阀巡检结果: 0-成功, 1-失败
/bmc/kepler/Chassis/:ChassisId/Thermal/Valves/:Idbmc.kepler.Chassis.ValveOpeningDegreepropertyU32关断阀开度
/bmc/kepler/Chassis/:ChassisId/Thermal/Valves/:Idbmc.kepler.Chassis.ValveStandardOpeningDegreepropertyU32关断阀标称开度

2 IPMI接口

└─/bmc
  └─/bmc/kepler
    ├─/bmc/kepler/IpmiCmds
    │ └─/bmc/kepler/IpmiCmds/30
    │   └─/bmc/kepler/IpmiCmds/30/93
    │     ├─/bmc/kepler/IpmiCmds/30/93/GetFanSpeed                    # 获取风扇转速
    │     ├─/bmc/kepler/IpmiCmds/30/93/GetTotalFanPower               # 获取风扇总功耗
    │     ├─/bmc/kepler/IpmiCmds/30/93/GetValveOpeningDegree          # 获取节流阀开度
    │     ├─/bmc/kepler/IpmiCmds/30/93/GetValveStandardOpeningDegree  # 获取节流阀标定开度
    │     └─/bmc/kepler/IpmiCmds/30/93/SetValveOpeningDegree          # 设置节流阀开度

配置介绍

CSR配置

  1. Fan对象配置:
propertytype备注
FanIdU16风扇Id
SlotU8风扇槽位
CoefficientU8风扇转速系数
FrontPresenceU8前转子在位状态
RearPresenceU8后转子在位状态
FrontSpeedU16前转子转速
RearSpeedU16后转子转速
HardwarePWMDouble硬件占空比
SystemIdU8系统Id
MaxSupportedPWMU32支持的最大转速
IdentifySpeedLevelU8识别风速级别
PositionString容器信息
PowerGoodU8PG状态
  1. FanType配置
propertytype备注
NameString风扇型号名
IndexU8风扇型号索引
IsDefaultTypeBoolean是否为默认风扇型号
IsTwinsBoolean是否为双转子
FrontMaxSpeedU32前转子最大转速
RearMaxSpeedU32后转子最大转速
IdentifyRangeLowU32风扇型号识别转速左区间
IdentifyRangeHighU32风扇型号识别转速右区间
PartNumberString部件编码
BOMStringBOM编码
SystemIdU8系统Id
SpeedRangeU8[]风扇转速和功率映射关系的风扇转速数组
PowerRangeU8[]风扇转速和功率映射关系的功率数组
FanDiameterMmU16风扇组件的直径,单位毫米
  1. Fans对象配置
propertytype备注
PWMChipU8[]转速下发Chip地址
SetPWMCmdU32转速下发SMC地址
  1. Pump对象配置
propertytype备注
IdU16泵ID
SlotU8槽位
ActualPWMDouble实际PWM值
MaxSupportedPWMU32泵全速额定PWM值
SpeedRPMU16转速
MaxSpeedRPMU32全速额定转速
PresenceU81在位,0不在位
PartNumberString部件编码
PowerGoodU8PG状态
  1. Pumps对象配置
propertytype备注
PWMChipU8[]转速下发Chip地址
SetPWMCmdU32转速下发SMC地址
  1. 多风扇板配置
propertytype备注
StandbyFanU8standby下风扇是否可以运转, 1:可以,0:不可以
FanStartSlotU8[]风扇起始槽位,下标为风扇板槽位,值为风扇起始槽位