SF400T网卡温度获取不到

// 此模板仅供参考,如果不适用可以修改

问题描述

Component_drivers组件适配的SF400T网卡,最开始使用1.1.42版本的Component_drivers组件版本构建出包现象为:网卡温度无法获取,调速触发异常调速,出现温度获取失败告警。日志app.log中出现刷屏:

2026-05-20 13:53:21.003617 devmon ERROR: ncsi_over_mctp_wx.cpp(105): Error: failed to send NCSI get MAC address command [repeated 242 times in 301s from 2026-05-20 13:48:20.934307 to 2026-05-20 13:53:21.003617]
2026-05-20 13:53:21.003908 devmon ERROR: ncsi_over_mctp_wx.cpp(227): Error: failed to send NCSI get LLDP status command [repeated 242 times in 301s from 2026-05-20 13:48:20.934788 to 2026-05-20 13:53:21.003908]
2026-05-20 13:54:21.066996 devmon ERROR: ncsi_over_mctp_wx.cpp(72): Error: failed to send NCSI get temperature command [repeated 61 times in 305s from 2026-05-20 13 :49:16.005904 to 2026-05-20 13:54:21.066996]
2026-05-20 13:54:21.067378 devmon ERROR: ncsi_over_mctp_wx.cpp(131): Error: failed to send NCSI get serial number command [repeated 61 times in 305s from 2026-05-20 13:49:16.006238 to 2026-05-20 13:54:21.067378]
2026-05-20 13:58:26.061286 devmon ERROR: ncsi_over_mctp_wx.cpp(105): Error: failed to send NCSI get MAC address command [repeated 242 times in 305s from 2026-05-20 13:53:21.003617 to 2026-05-20 13:58:26.061286]
2026-05-20 13:58:26.061768 devmon ERROR: ncsi_over_mctp_wx.cpp(227): Error: failed to send NCSI get LLDP status command [repeated 242 times in 305s from 2026-05-20 13:53:21.003908 to 2026-05-20 13:58:26.061768]
2026-05-20 13:59:26.129548 devmon ERROR: ncsi_over_mctp_wx.cpp(72): Error: failed to send NCSI get temperature command [repeated 61 times in 305s from 2026-05-20 13 :54:21.066996 to 2026-05-20 13:59:26.129548]
2026-05-20 13:59:26.129957 devmon ERROR: ncsi_over_mctp_wx.cpp(131): Error: failed to send NCSI get serial number command [repeated 61 times in 305s from 2026-05-20 13:54:21.067378 to 2026-05-20 13:59:26.129957]

使用最新版本1.2.147的Component_drivers组件和对应的libmcpp,devmon组件,构建出包网卡温度仍然无法获取,此时TemperatureStatus=2,以至于没有触发异常调速和告警。此时查看smbios状态=3,cooling.cpp中仍然显示smbios not ready。

日志刷屏:

2026-05-21 17:21:17.665134 devmon ERROR: mctp.cpp(52): =================mctp::request create_endpoint failed, false [repeated 1000 times in 280s from 2026-05-21 17:16:37.629747 to 2026-05-21 17:21:17.665134]
2026-05-21 17:25:52.764908 devmon ERROR: mctp.cpp(52): =================mctp::request create_endpoint failed, false [repeated 1000 times in 275s from 2026-05-21 17:21:17.665134 to 2026-05-21 17:25:52.764908]
2026-05-21 17:30:32.777440 devmon ERROR: mctp.cpp(52): =================mctp::request create_endpoint failed, false [repeated 1000 times in 280s from 2026-05-21 17:25:52.764908 to 2026-05-21 17:30:32.777440]

2026-05-21 17:32:47.944528 devmon INFO: pcie_function.cpp(44): Error: Failed to update version id
2026-05-21 17:32:52.852998 devmon INFO: network_adapter.cpp(35): Error: Failed to update version id
2026-05-21 17:32:52.943570 devmon INFO: ncsi_over_mctp_wangxun.cpp(132): Error: failed to send NCSI get serial number command
2026-05-21 17:32:52.943750 devmon INFO: pcie_device.cpp(61): Error: Failed to update serial number
2026-05-21 17:32:52.944167 devmon INFO: ncsi_over_mctp_wangxun.cpp(311): Error: failed to send NCSI get_vpd_sn command
2026-05-21 17:32:52.944338 devmon INFO: pcie_device.cpp(78): Error: Failed to get vpd_sn
2026-05-21 17:32:52.944666 devmon INFO: ncsi_over_mctp_wangxun.cpp(343): Error: failed to send NCSI get_vpd_pn command
2026-05-21 17:32:52.944833 devmon INFO: pcie_device.cpp(93): Error: Failed to get_vpd_pn
2026-05-21 17:32:52.945356 devmon INFO: ncsi_over_mctp_wangxun.cpp(73): Error: failed to send NCSI get temperature command
2026-05-21 17:32:52.945508 devmon INFO: cooling.cpp(26): Error: Failed to update chip temp
2026-05-21 17:32:52.945657 devmon INFO: cooling.cpp(29): smbios not ready
2026-05-21 17:32:52.946137 devmon INFO: pcie_function.cpp(44): Error: Failed to update version id

问题1:SF400T的温度无法获取原因。(SF400T网卡部件我们设备提供信息不支持MCTP(over smbus),NCSI)

问题2:component_drives中如何设置环温调速呢

环境信息

  • 操作系统:[如 Ubuntu 24.04]

  • 软件版本:[如 OpenUBMC2509]

  • 硬件配置:[如 CPU、内存等]

重现步骤

  1. [第一步]

  2. [第二步]

  3. [第三步]

期望结果

[您希望实现什么]

实际结果

[实际发生了什么,包含错误信息]

尝试过的解决方案

[列出您已经尝试过的解决方案及结果]

分析结论

[详细总结您对此问题的分析结论]

麻烦提供一下网卡固件版本和驱动版本,谢谢。

busctl –user tree bmc.kepler.mctpd的输出有这张网卡的endpoint吗?

参考25.12版本SF200HT网卡温度获取不到 - 交流互助区 - openUBMC 论坛 帖子,仅添加延迟,情况仍相同。

网口带内查看处于连接状态,bmc处于–

因为openUBMC当前的mctp over smbus实现是BMC固定主,网卡要固定从模式才能正常交互,而我们提供的网卡标准固件都是smbus主从模式的,解决方案就是提供了一个定制固件。添加延时这个修改component drivers 1.2.5版本之后都带上的。这周在component drivers例会上了解到,BMC主从模式支持要在630版本才支持。

1 个赞

答案内容由AI生成,仅供参考:
根据您的要求,从回答内容中提取“总结”或“结论”章节的内容如下:

结论:SF400T网卡硬件本身不支持OpenUBMC当前采用的、基于MCTP和NCSI协议的BMC带外温度监控方案,因此无法通过此方式获取温度数据。

点击此处查看详细分析解答

根据您提供的上下文信息,我对您提出的两个问题进行分析和解答如下。

问题1:SF400T网卡温度无法获取的原因

根据上下文中的知识图谱和文档片段,SF400T网卡无法获取温度的根本原因在于该网卡硬件不支持OpenUBMC当前用于获取温度数据的底层通信协议

核心原因分析:

  1. 硬件不支持关键通信协议:知识图谱明确指出,SF400T网卡(即SF400T)不支持MCTP over SMBus和NCSI协议。这直接导致了后续一系列失败。

    • MCTP (Management Component Transport Protocol) 是用于BMC与系统组件(如网卡)通信的管理组件传输协议。
    • NCSI (Network Controller Sideband Interface) 是用于BMC通过网络控制器侧带接口进行带外管理的标准协议。
    • 关联关系MCTPNCSI 均与 SF400T 存在否定关系,表明该网卡不支持这些协议。
  2. 失败的具体表现:由于协议不支持,日志中反复出现大量相关错误,证实了通信链路的完全中断:

    • 第一阶段(使用旧组件):出现 Error: failed to send NCSI get MAC address commandError: failed to send NCSI get temperature command 等刷屏错误,表明BMC尝试通过ncsi_over_mctp路径获取信息全部失败。
    • 第二阶段(使用新组件):在升级组件后,错误变为 mctp::request create_endpoint failed, false。这表明BMC甚至无法成功为SF400T网卡在MCTP总线上创建通信端点。由于没有端点,后续所有通过MCTP或NCSI进行的温度、版本、序列号等信息获取操作均以失败告终。
  3. 最终状态

    • TemperatureStatus = 2:根据知识图谱,TemperatureStatus值为2时表示“温度传感器未就绪”或“无温度告警”,这进一步证实了温度数据获取功能处于失效状态。
    • smbios not ready:系统无法更新温度信息,导致风扇调速逻辑处于准备未就绪状态。

结论:SF400T网卡硬件本身不支持OpenUBMC当前采用的、基于MCTP和NCSI协议的BMC带外温度监控方案,因此无法通过此方式获取温度数据。


问题2:如何在component_drivers中设置环温调速

关于您提出的“环温调速”

在提供的上下文中,并没有直接提到“环温调速”(ambient temperature-based fan control)的具体配置方法或API。上下文中的所有信息均指向由芯片温度(chip temp)触发的调速逻辑。例如,日志中显示 cooling.cpp(26): Error: Failed to update chip temp,表明当前实现的调速机制是基于网卡芯片自身的温度,而非环境温度。

基于上下文的推测与建议

  1. 当前机制:从日志和代码模块(如cooling.cpp)推断,当前风扇调速依赖于成功获取的设备温度数据(TemperatureStatus)。一旦温度数据(Temperature Value)获取失败,调速逻辑便无法正常执行。
  2. 您的目标:如果您希望实现“环温调速”(读取环境温度传感器而非网卡芯片温度),这很可能需要修改 component_drivers 组件中的cooling.cpp或相关的风扇控制模块代码,以引入一个新的温度数据源。
  3. 可能的路径
    • 修改代码:您需要修改cooling.cpp等相关文件,使其不再依赖从网卡获取的chip temp,而是从BMC能够正常读取的其他温度传感器(例如机箱环境温度传感器)获取数据。
    • 参考社区案例:文档提到了一个相似的案例Issue 22311,其中讨论了SF200HT网卡的温度获取问题。虽然情况不完全相同(不支持的协议不同),但可以学习其解决问题的思路和方法。
    • 确认接口:在修改代码前,您需要确认您的硬件平台是否提供了环境温度传感器,以及BMC能否通过OpenUBMC的框架(如D-Bus接口或Redfish)成功读取到该传感器的数据。之后,再考虑如何将这些数据集成到风扇控制逻辑中。
    • 联系社区:邀请您在openUBMC社区论坛发帖,详细介绍您的硬件平台(包含哪些可用的温度传感器)、您的具体需求以及您已尝试的方案,以获得官方开发者和社区成员的更直接帮助。

总结:根据现有信息,component_drivers组件默认不包含“环温调速”功能,它依赖于从设备获取的“芯片温度”。要实现环温调速,您很可能需要进行二次开发,修改风扇控制核心逻辑。