Network card self-adaptive monitoring method and device, storage medium and computer equipment

By binding the network card monitoring method to the startup status of the basic input/output system, and dynamically selecting the monitoring method of SMBus or PCIe bus, the problems of monitoring vacuum period and limited information during server startup are solved, realizing continuous and comprehensive monitoring throughout the entire process, and improving the reliability and adaptability of the monitoring system.

CN122496436APending Publication Date: 2026-07-31NINGCHANG INFORMATION TECH (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NINGCHANG INFORMATION TECH (HANGZHOU) CO LTD
Filing Date
2026-04-27
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing network card monitoring methods suffer from monitoring gaps or can only obtain single temperature information during server startup, failing to achieve continuous and comprehensive monitoring. Furthermore, their reliance on network card firmware leads to monitoring interruptions under abnormal conditions.

Method used

By binding the network card monitoring method to the startup status of the basic input/output system, the monitoring method of SMBus or PCIe bus is dynamically selected. The MCTP protocol is used to achieve intelligent adaptive monitoring at different stages, including the reconstruction and degradation mechanism of the MCTP network, to ensure the continuity and richness of monitoring information.

Benefits of technology

It enables continuous and comprehensive monitoring of the entire server startup process, improving the reliability and information richness of monitoring, avoiding resource waste and command timeouts, and ensuring the adaptive capability and reliability of the monitoring system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122496436A_ABST
    Figure CN122496436A_ABST
Patent Text Reader

Abstract

This application relates to the field of network interface card (NIC) monitoring technology, specifically disclosing a NIC adaptive monitoring method and apparatus, storage medium, and computer equipment. The method includes: monitoring the startup status of the Basic Input / Output System (SIMS) in a server after the monitoring service of the baseboard management controller (BID) is started; dynamically determining the real-time monitoring mode of the target NIC based on the startup status of the SIMS, wherein, when the startup status is incomplete, the real-time monitoring mode is based solely on the SMBus bus; and when the startup status is complete, the real-time monitoring mode prioritizes monitoring based on the PCIe bus; and monitoring the target NIC using the real-time monitoring mode. This application not only achieves continuous and comprehensive monitoring of the entire startup process but also fully utilizes the optimal performance of different buses at different stages, improving the reliability and information richness of the monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network interface card (NIC) monitoring technology, and in particular to a NIC adaptive monitoring method and device, storage medium, and computer equipment. Background Technology

[0002] With the rapid development of cloud computing, big data, and artificial intelligence technologies, the scale of data centers and server clusters is constantly expanding, placing higher demands on the high availability and stable operation of server hardware. As the core interface for server interaction with external networks, the network interface card (NIC) directly affects the communication efficiency and data transmission quality of the entire server. Under high-load server operation, the heat generated by core components such as the processor can cause the internal temperature of the chassis to rise, especially the NIC located at the air outlet of the air-cooling system, which is prone to overheating, thus affecting the stability and reliability of network transmission. Therefore, real-time monitoring of key information such as NIC temperature and dynamically adjusting the cooling strategy based on the monitoring results has become an important means to ensure the continuous and stable operation of servers.

[0003] Currently, existing network interface card (NIC) monitoring methods mainly include two approaches. One is to directly read the NIC's temperature chip via the system management bus. This method is simple to implement and does not rely on the NIC firmware, but it can only obtain the NIC temperature and cannot acquire rich dynamic and static information such as optical module temperature, firmware version, and link status. The other approach is to encapsulate network controller sideband interface or platform-level data model commands based on the management component transmission protocol and communicate with the NIC via the system management bus or high-speed serial computer extension bus. This method can obtain comprehensive monitoring information, but it heavily relies on NIC firmware support and cannot complete monitoring when the NIC's out-of-band management module malfunctions or the system does not support the management component transmission protocol.

[0004] However, neither of the two monitoring methods mentioned above is associated with the server's startup process, making it impossible to achieve continuous and comprehensive monitoring of the entire startup process. Summary of the Invention

[0005] In view of this, this application provides a network interface card (NIC) adaptive monitoring method and apparatus, storage medium, and computer equipment. By dynamically binding the NIC monitoring method to the startup state of the Basic Input / Output System (BIOS), it solves the problem in the prior art of monitoring vacuum periods caused by PCIe unavailability during the initial startup phase or the inability to obtain only single temperature information. The embodiments of this application not only achieve continuous and comprehensive monitoring of the entire startup process but also fully utilize the optimal performance of different buses at different stages, improving the reliability and richness of monitoring information. Simultaneously, it avoids resource waste and command timeouts caused by blindly attempting to monitor when the high-speed bus is not ready.

[0006] According to one aspect of this application, a network interface card (NIC) adaptive monitoring method is provided, applied to a baseboard management controller, the method comprising: After the monitoring service of the baseboard management controller is started, monitor the startup status of the basic input / output system in the server; Based on the startup status of the basic input / output system, the real-time monitoring method of the target network card is dynamically determined. When the startup status is incomplete, the real-time monitoring method is a monitoring method based solely on the SMBus bus. When the startup status is complete, the real-time monitoring method is a monitoring method based primarily on the PCIe bus. The target network card is monitored using the aforementioned real-time monitoring method.

[0007] Beneficial effects: By dynamically binding the network card monitoring method to the startup status of the basic input / output system, the problem of monitoring vacuum period or only being able to obtain single temperature information caused by the unavailability of PCIe at the initial stage of power-on is solved in the prior art. The embodiments of this application not only realize continuous and comprehensive monitoring of the entire startup process, but also make full use of the optimal performance of different buses at different stages, improving the reliability and information richness of monitoring, while avoiding resource waste and command timeouts caused by blindly trying when the high-speed bus is not ready.

[0008] Optionally, monitoring the target network interface card using the monitoring method based solely on the SMBus bus includes: Determine whether an MCTP network has been successfully established between the target network card and the SMBus bus; If successfully created, in each monitoring cycle, based on the MCTP protocol, the command to obtain network card status information is encapsulated and sent to the target network card via the SMBus bus to attempt to obtain network card status information; when the acquisition is successful, the current MCTP monitoring consecutive failure count is cleared to zero; when the acquisition fails, the current MCTP monitoring consecutive failure count is updated, and the temperature chip of the target network card is directly read via the SMBus bus. If creation fails, the temperature chip of the target network card is read directly via the SMBus bus.

[0009] Beneficial effects: Intelligent adaptive monitoring mode is achieved by relying solely on the SMBus bus. This allows for the acquisition of comprehensive network card status information when the MCTP network is available, and automatic switching to basic temperature monitoring when the network fails or is not established, ensuring uninterrupted monitoring. At the same time, the accumulation of consecutive failures in MCTP monitoring provides precise quantitative conditions for triggering subsequent MCTP network reconstruction.

[0010] Optionally, monitoring the target network card using the preferred PCIe bus-based monitoring method includes: Determine whether an MCTP network has been successfully established between the target network card and the PCIe bus; If successfully created, in each monitoring cycle, based on the MCTP protocol, the command to obtain network card status information is encapsulated and sent to the target network card via the PCIe bus to attempt to obtain network card status information; when the acquisition is successful, the current MCTP monitoring consecutive failure count is cleared to zero; when the acquisition fails, the current MCTP monitoring consecutive failure count is updated, and the target network card is monitored through the monitoring method based on the SMBus bus. If creation fails, the target network card will be monitored using the SMBus bus monitoring method.

[0011] Beneficial effects: By first determining the PCIe MCTP status, then prioritizing high-speed PCIe monitoring, and seamlessly downgrading to SMBus monitoring upon failure, a hierarchical design is established to ensure monitoring performance and information integrity while building a multi-redundancy guarantee mechanism. Simultaneously, the shared number of consecutive MCTP monitoring failures provides a unified benchmark for cross-bus MCTP network failure judgment, avoiding false triggering of reconstruction due to single-bus jitter, and significantly improving the reliability and adaptability of the monitoring system.

[0012] Optionally, after updating the current number of consecutive MCTP monitoring failures, the method further includes: If the number of consecutive failures of the updated MCTP monitoring reaches a preset threshold, the MCTP network is determined to be faulty, and the MCTP network reconstruction process is triggered.

[0013] Beneficial effects: It realizes automatic detection and self-healing of MCTP network failures. This method can automatically restore full monitoring capabilities after the monitoring link is interrupted due to events such as network card firmware restart or upgrade without manual intervention. At the same time, by setting reasonable thresholds for the number of failures, it avoids false triggering of reconstruction due to single occasional failures (such as instantaneous bus conflicts), balances the sensitivity and stability of monitoring, and significantly improves the reliability and operation and maintenance efficiency of the server out-of-band management system.

[0014] Alternatively, the MCTP network reconstruction process is implemented based on the following steps: Rescan the network cards on the SMBus or PCIe bus; After the target network interface card (NIC) is identified, an endpoint identifier is reassigned to the target NIC, and the MCTP network between the baseboard management controller and the target NIC is rebuilt based on the reassigned endpoint identifier. After the MCTP network is recreated, a test monitoring command is sent to the target network card to verify whether the monitoring function has been restored based on the test monitoring command; If the monitoring function is restored, the MCTP network reconstruction is confirmed to be successful. Otherwise, return to the step of rescanning the network cards on the SMBus bus or PCIe bus until the reconstruction is successful or the preset reconstruction limit is reached; Accordingly, after confirming the successful reconstruction of the MCTP network, the method further includes: The startup status of the basic input / output system in the server is monitored again, and the real-time monitoring method of the target network card is re-determined based on the newly acquired startup status.

[0015] Beneficial effects: It not only rebuilt the underlying communication link, but also ensured the actual availability of the upper-layer monitoring function through testing and verification; the introduced retry mechanism and the upper limit of the number of attempts balanced the recovery success rate and system resource consumption; in particular, after the reconstruction was successful, the startup status of the basic input and output system was re-evaluated and the monitoring method was adjusted, so that the monitoring strategy after recovery always matched the current hardware status of the server, avoiding suboptimal monitoring caused by state changes during the recovery process.

[0016] Optionally, before monitoring the startup status of the basic input / output system in the server again, the method further includes: Determine the triggering cause of this MCTP network reconstruction; If the triggering reason is that the number of consecutive failures of MCTP monitoring reaches a preset threshold, and the consecutive failures of MCTP monitoring are identified as being caused by the firmware restart event or firmware upgrade event of the target network card, then the temperature chip of the target network card is directly read through the SMBus bus. Accordingly, the method further includes: After the number of monitoring cycles of the temperature chip of the target network card directly read via the SMBus bus reaches a preset number, the step of monitoring the startup status of the basic input / output system in the server again is executed.

[0017] Beneficial effects: In passive recovery scenarios, a transitional fallback monitoring mechanism is introduced. By identifying continuous failures caused by firmware restarts or upgrades, it proactively avoids monitoring methods that rely on firmware and adopts the most stable direct temperature reading method as a temporary measure. It uses a preset number of successful cycles as a stabilization period judgment to ensure that the network card firmware is fully restored before switching back to the efficient monitoring mode.

[0018] Optionally, during the process of triggering the MCTP network reconstruction procedure, the method further includes: When starting the MCTP network reconstruction process, a temperature monitoring channel is created simultaneously. The temperature monitoring channel continuously reads the temperature chip of the target network card through the SMBus bus at the initial heartbeat cycle and records the temperature value and the corresponding timestamp for each reading. For each temperature value read, when the temperature value is lower than the first preset threshold, the initial heartbeat cycle is maintained as the current heartbeat cycle; when the temperature value reaches or exceeds the first preset threshold but is lower than the second preset threshold, the current heartbeat cycle is shortened to the first preset cycle; when the temperature value reaches or exceeds the second preset threshold, the MCTP network reconstruction process is terminated, an emergency heat dissipation operation is performed, and a temperature alarm log is generated. Accordingly, the method further includes: After the MCTP network is successfully rebuilt, the temperature monitoring channel is shut down, and the network card status information of the target network card is restored through the SMBus bus or PCIe bus; and, After the MCTP network reconstruction is aborted, the current heartbeat cycle is shortened to a second preset cycle, and the temperature chip of the target network card is read through the temperature monitoring channel until the read temperature value falls below the preset safety threshold. Then the MCTP network reconstruction process is restarted, wherein the second preset cycle is shorter than the first preset cycle.

[0019] Beneficial effects: During the MCTP network reconstruction process, the network card temperature is always under control and can respond in stages according to the severity of the temperature. At the same time, it maintains high-frequency monitoring after the MCTP network reconstruction is interrupted and automatically retryes reconstruction when the temperature is safe. This design not only avoids the risk of hardware damage caused by temperature runaway during reconstruction, but also balances monitoring overhead and response speed through adaptive heartbeat cycle, which significantly improves the security and intelligence level of the server out-of-band management system.

[0020] Optionally, the method further includes: When an out-of-band command for restarting or upgrading the target network interface card is received, the active rebuild flag is set; After completing the restart or upgrade operation of the target network card based on the out-of-band instruction, the current startup status of the basic input / output system is obtained according to the active reconstruction flag; If the basic input / output system fails to start, the MCTP network reconstruction process based on the SMBus bus is triggered; otherwise, the MCTP network reconstruction process based on the PCIe bus is triggered. Clear the active reconstruction flag.

[0021] Beneficial effects: By setting an active reconstruction flag, obtaining the basic input / output system startup status after the operation is completed, selecting the reconstruction bus according to the startup status, and clearing the active reconstruction flag, accurate and adaptive MCTP network reconstruction triggered by out-of-band instructions is achieved.

[0022] Optionally, when multiple network interface cards (NICs) exist and the real-time monitoring method is an SMBus-based monitoring method, before monitoring the target NIC using the real-time monitoring method, the method further includes: A channel selection command is sent to the bus switch chip to select the downstream port connected to the target network card, so as to establish a communication connection with the target network card through the SMBus bus, and to perform monitoring based on the SMBus bus through the downstream port. The baseboard management controller is connected to the bus switch chip through the I2C bus, and the multiple downstream ports of the bus switch chip are respectively connected to multiple network cards one by one. Each network card has the same device address on the SMBus bus. Accordingly, after monitoring the target network card through the real-time monitoring method, the method further includes: A channel switching command is sent to the bus switch chip to select the downstream port corresponding to the next network card, so that the next network card can be used as a new target network card for monitoring.

[0023] Beneficial effect: By introducing a bus switch chip, the hardware conflict problem of multiple network cards being unable to access devices concurrently due to the same device address on the SMBus bus is solved.

[0024] According to another aspect of this application, a network interface card (NIC) adaptive monitoring device is provided, applied to a baseboard management controller, the device comprising: The server monitoring module is used to monitor the startup status of the basic input / output system in the server after the monitoring service of the baseboard management controller is started. The monitoring method determination module is used to dynamically determine the real-time monitoring method of the target network card based on the startup status of the basic input / output system. When the startup status is not completed, the real-time monitoring method is a monitoring method based solely on the SMBus bus. When the startup status is completed, the real-time monitoring method is a monitoring method based primarily on the PCIe bus. The monitoring module is used to monitor the target network card through the real-time monitoring method.

[0025] According to another aspect of this application, a storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the above-described network interface card adaptive monitoring method.

[0026] According to another aspect of this application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the program to implement the above-described network interface card adaptive monitoring method.

[0027] By employing the above technical solutions, this application provides a network interface card (NIC) adaptive monitoring method and device, storage medium, and computer equipment. By dynamically binding the NIC monitoring method to the startup state of the Basic Input / Output System (BIOS), it solves the problem in existing technologies where the PCIe is unavailable during the initial startup phase, resulting in a monitoring vacuum or the inability to obtain only single temperature information. The embodiments of this application not only achieve continuous and comprehensive monitoring throughout the entire startup process but also fully utilize the optimal performance of different buses at different stages, improving the reliability and richness of monitoring information. Simultaneously, it avoids resource waste and command timeouts caused by blindly attempting monitoring when the high-speed bus is not ready.

[0028] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0029] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating a network interface card (NIC) adaptive monitoring method provided in an embodiment of this application is shown. Figure 2 A flowchart illustrating another network interface card adaptive monitoring method provided in an embodiment of this application is shown; Figure 3 This illustration shows a schematic diagram of a network interface card adaptive monitoring device provided in an embodiment of this application; Figure 4 A schematic diagram of the device structure of a computer device provided in an embodiment of this application is shown. Detailed Implementation

[0030] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.

[0031] This embodiment provides a network interface card (NIC) adaptive monitoring method, applied to a baseboard management controller, such as... Figure 1 As shown, the method includes: Step 101: After the monitoring service of the baseboard management controller is started, monitor the startup status of the basic input / output system in the server.

[0032] Step 102: Based on the startup status of the basic input / output system, dynamically determine the real-time monitoring method of the target network card. When the startup status is "not started", the real-time monitoring method is a monitoring method based solely on the SMBus bus. When the startup status is "startup completed", the real-time monitoring method is a monitoring method based primarily on the PCIe bus.

[0033] Step 103: Monitor the target network card using the real-time monitoring method.

[0034] This application provides a network interface card (NIC) adaptive monitoring method that enables the baseboard management controller to dynamically select the most suitable NIC monitoring mode based on the startup process of the basic input / output system (BIS). This adaptive adjustment mechanism fills the gap in monitoring methods during the server startup phase, achieving seamless and efficient monitoring throughout the entire process from server power-on to operation.

[0035] Specifically, after the Baseboard Management Controller (BMC) starts its monitoring service, it can proactively monitor the startup status of the Basic Input / Output System (BIOS) in the server. The server goes through multiple stages from power-on to full operating system operation. The BIOS startup process gradually initializes various hardware interfaces, and the availability of different buses (such as SMBus and PCIe) dynamically changes with each startup stage. By continuously or through event-triggered methods to obtain the BIOS startup progress—for example, by polling the BIOS status register or receiving startup completion signals from the BIOS—the BMC can accurately determine whether the server is in the early or late stages of startup, laying the foundation for selecting appropriate monitoring methods.

[0036] Next, the real-time monitoring method for the target network card can be dynamically determined based on the startup status of the Basic Input / Output System (BIOS). Specifically, when the BIOS has not yet completed startup, such as during power-on self-test (POST) or early hardware initialization, the baseboard management controller can use a monitoring method based solely on the SMBus bus, since the high-speed PCIe bus typically requires the BIOS to complete enumeration before it can function properly. SMBus can interact with the network card without waiting for the BIOS to complete, but due to bandwidth and protocol limitations, it can only obtain limited information such as network card temperature. However, once the BIOS has completed startup and the PCIe bus is ready, the baseboard management controller will prioritize the PCIe-based monitoring method. This is because PCIe supports full-duplex high-speed communication and can encapsulate NCSI or PLDM commands via MCTP (Management Component Transport Protocol) to obtain rich dynamic and static information such as network card temperature, optical module status, firmware version, and link speed. This dynamic adjustment mechanism ensures that the most reliable and comprehensive monitoring method is selected at different startup stages.

[0037] Finally, the target network interface card (NIC) can be monitored using a defined real-time monitoring method. Specifically, after determining the monitoring method suitable for the current startup phase, the baseboard management controller can periodically send monitoring commands to the target NIC using the corresponding hardware link and protocol, and receive the returned NIC status data. For example, before the Basic Input / Output System (BIOS) startup is complete, the baseboard management controller monitors the target NIC via the SMBus bus; after the BIOS startup is complete, it obtains detailed NIC status information via the PCIe bus. This monitoring data can be stored, analyzed, and used to trigger thermal adjustments (such as increasing fan speed) or generate alarm logs, thereby ensuring the stable operation of the target NIC throughout the server's entire operating cycle.

[0038] By applying the technical solution of this embodiment, and dynamically binding the network card monitoring method with the startup state of the basic input / output system, the problem of monitoring vacuum period or only being able to obtain single temperature information caused by the unavailability of PCIe at the initial stage of power-on is solved in the prior art. This embodiment not only achieves continuous and comprehensive monitoring of the entire startup process, but also fully utilizes the optimal performance of different buses at different stages, improving the reliability and richness of monitoring information, while avoiding resource waste and command timeouts caused by blindly attempting to monitor when the high-speed bus is not ready.

[0039] In this embodiment of the application, optionally, monitoring the target network card using the monitoring method based solely on the SMBus bus includes: determining whether an MCTP network has been successfully established between the target network card and the SMBus bus; if successfully established, in each monitoring cycle, based on the MCTP protocol, encapsulating a command to obtain network card status information and sending it to the target network card via the SMBus bus to attempt to obtain network card status information; when the acquisition is successful, resetting the current consecutive MCTP monitoring failure count to zero; when the acquisition fails, updating the current consecutive MCTP monitoring failure count and directly reading the temperature chip of the target network card via the SMBus bus; if the network card is not successfully established, directly reading the temperature chip of the target network card via the SMBus bus.

[0040] In this embodiment, in the monitoring method based solely on the SMBus bus, the baseboard management controller first determines whether an MCTP network has been successfully established with the target network card. If it has been established, the controller prioritizes sending commands via the MCTP protocol to obtain network card status information in each monitoring cycle; if the MCTP network has not been established, the controller directly reads the temperature chip via the SMBus bus, thereby ensuring that the network card status information of the target network card can be obtained under any circumstances.

[0041] Specifically, when monitoring a target network interface card (NIC) using only SMBus-based monitoring, the baseboard management controller (BMC) first needs to determine whether an MCTP network has been successfully established between it and the target NIC using the SMBus bus. MCTP is a data link layer protocol independent of the physical bus, used for efficient communication between the BMC and the target NIC; the SMBus bus, as a physical transmission channel, does not guarantee the existence of an MCTP session. The availability of the MCTP network determines whether richer in-band commands can be used to obtain NIC information. If the network is established, subsequent attempts can be made to obtain complete monitoring data, including temperature, optical module status, firmware version, etc.; if it is not yet established, it can only revert to the most basic temperature reading method.

[0042] If the MCTP network has been successfully established, in each monitoring cycle, the baseboard management controller can encapsulate commands (such as NCSI or PLDM format commands) used to obtain network interface card (NIC) status information into MCTP messages based on the MCTP protocol, and send them to the target NIC via the SMBus bus to attempt to obtain detailed NIC status information. This process utilizes the multi-command encapsulation capability of the MCTP protocol, enabling the acquisition of much richer monitoring data than simple temperature readings, such as link status, optical module temperature, error count, firmware version, etc. Simultaneously, since the target NIC may be temporarily unresponsive due to firmware restarts, bus conflicts, or other reasons, the execution result is divided into success and failure scenarios, which need to be handled separately to maintain monitoring continuity.

[0043] (1) When the network card status information is successfully obtained via MCTP, it indicates that the current MCTP network is working normally and the target network card is responding promptly. At this time, the baseboard management controller can reset the current MCTP monitoring consecutive failure count to zero. Here, the MCTP monitoring consecutive failure count is a cumulative count across monitoring cycles, specifically recording the number of consecutive failures via MCTP. Once the network card status information is successfully obtained, it indicates that the previous consecutive failure state has ended, so the cumulative count can be reset to start counting again for the next round of consecutive failure judgment.

[0044] (2) When obtaining network card status information via MCTP fails, it indicates that the target network card is not responding, the command has timed out, or an error code has been returned. In this case, the baseboard management controller can update the current number of consecutive MCTP monitoring failures (usually by incrementing the count by 1) and immediately switch to a more basic monitoring method, that is, directly reading the target network card's temperature chip via the SMBus bus. This degradation process ensures that even if the MCTP network experiences a temporary failure, the temperature information of the target network card can still be obtained in this monitoring cycle, thus maintaining the most basic input for heat dissipation control. At the same time, the accumulation of the number of consecutive MCTP monitoring failures also provides a quantitative basis for subsequent judgment on whether to trigger MCTP network reconstruction.

[0045] Correspondingly, if the MCTP network fails to be created—for example, if the target network card does not support MCTP, bus initialization fails, or endpoint identifiers are not assigned—the baseboard management controller skips all MCTP attempts and directly reads the target network card's temperature chip via the SMBus bus. This is the lowest-level fallback solution, independent of any advanced protocols or network card firmware. As long as the target network card is powered on and the SMBus link is intact, temperature data can be reliably acquired, ensuring that the monitoring system can still provide critical temperature information even in the worst-case scenario.

[0046] This application embodiment achieves intelligent adaptive monitoring by first determining the MCTP network status, then prioritizing monitoring based on the MCTP protocol, and downgrading to temperature reading upon failure. This is achieved by relying solely on the SMBus bus. This allows for comprehensive network card status information to be obtained when the MCTP network is available, and automatic switching to basic temperature monitoring when the network fails or is not established, ensuring uninterrupted monitoring. At the same time, by accumulating the number of consecutive MCTP monitoring failures, precise quantitative conditions are provided for triggering subsequent MCTP network reconstruction, avoiding accidental reconstruction due to a single, occasional failure, and significantly improving the robustness and self-healing capability of the monitoring system.

[0047] In this embodiment of the application, optionally, monitoring the target network card using the PCIe bus-based monitoring method includes: determining whether an MCTP network has been successfully established between the target network card and the PCIe bus; if successfully established, in each monitoring cycle, encapsulating a command to obtain network card status information based on the MCTP protocol and sending it to the target network card via the PCIe bus to attempt to obtain network card status information; when the acquisition is successful, resetting the current MCTP monitoring consecutive failure count to zero; when the acquisition fails, updating the current MCTP monitoring consecutive failure count and monitoring the target network card using the SMBus bus-based monitoring method; if the establishment is unsuccessful, monitoring the target network card using the SMBus bus-based monitoring method.

[0048] In this embodiment, in the PCIe bus-based monitoring method, the baseboard management controller first determines whether an MCTP network has been successfully established on the PCIe link with the target network card. If it has been established, the controller prioritizes sending MCTP commands via the PCIe bus to obtain network card status information during each monitoring cycle. If the PCIe MCTP network has not been established, the monitoring method based on the SMBus bus is directly adopted, thereby ensuring monitoring performance while using SMBus as a backup channel to ensure uninterrupted monitoring.

[0049] Specifically, in the PCIe bus-based monitoring method, the baseboard management controller first determines whether an MCTP network has been successfully established between it and the target network interface card (NIC) via the PCIe bus. The PCIe bus features full-duplex operation and high bandwidth, supporting faster and richer out-of-band management communication. MCTP, on the other hand, is a logical communication protocol built on top of the PCIe physical layer, used to carry monitoring commands such as NCSI or PLDM. Only when an MCTP network is successfully established on the PCIe link can the high performance of PCIe be utilized to obtain comprehensive NIC status information. If it has not yet been established, a fallback to the more mature but relatively limited SMBus bus monitoring solution is needed to ensure monitoring continuity.

[0050] If the PCIe MCTP network has been successfully created, in each monitoring cycle, the baseboard management controller can encapsulate commands (such as NCSI or PLDM format) used to obtain network interface card (NIC) status information into MCTP messages based on the MCTP protocol and send them to the target NIC via the PCIe bus to attempt to obtain detailed NIC status information. This process utilizes the high-speed transmission capability of the PCIe bus, enabling command issuance and data return to be completed in a very short time, thereby supporting higher-frequency monitoring and richer data acquisition, such as NIC temperature, optical module temperature, firmware version, link speed, error count, etc. Simultaneously, since the target NIC may fail to respond due to firmware restart, link training, or momentary overload, the execution result is also divided into success and failure scenarios, which need to be handled separately.

[0051] (1) When the network card status information is successfully obtained through PCIe MCTP, it indicates that the MCTP network on the current PCIe link is working normally and the network card firmware responds in a timely manner. At this time, the baseboard management controller can reset the current number of consecutive MCTP monitoring failures to zero. Here, the number of consecutive MCTP monitoring failures is a cumulative count shared across monitoring cycles and buses, specifically recording the number of consecutive failures through MCTP (whether PCIe or SMBus). Once the network card status information is successfully obtained through PCIe, it indicates that the MCTP network has returned to normal. Therefore, it is necessary to reset the cumulative count to restart the counting for subsequent consecutive failure judgments.

[0052] (2) When obtaining network card status information via PCIe MCTP fails, the baseboard management controller can update the current number of consecutive MCTP monitoring failures (usually incrementing the count by 1) and immediately switch to monitoring via SMBus bus. This degradation process utilizes the SMBus bus as a backup channel. Although SMBus is slower and its information richness may not be as good as PCIe, it may still function normally when a temporary failure occurs in the PCIe link, thus ensuring that at least some network card status information can be obtained in this monitoring cycle. Specifically, if MCTP on SMBus is available, network card status information is obtained based on SMBus MCTP; otherwise, the temperature of the target network card is obtained by reading its temperature chip via SMBus. At the same time, the accumulation of consecutive MCTP monitoring failures also provides a basis for subsequent judgment on whether MCTP network reconstruction needs to be triggered.

[0053] If the PCIe MCTP network fails to be created—for example, if the basal input / output system has not completed PCIe enumeration, the network card driver is not loaded, or there is a bus address conflict—the baseboard management controller will abandon the PCIe method and switch entirely to monitoring the target network card using an SMBus-based monitoring method. This path is a fallback strategy when PCIe is unavailable. It reuses the monitoring logic based solely on the SMBus bus (i.e., first attempts SMBus MCTP, then degrades to direct temperature reading if it fails), thereby ensuring that the monitoring system can still maintain basic data acquisition capabilities during early server startup or when PCIe fails, preventing complete blind spots.

[0054] This application's embodiments employ a hierarchical design that first determines the PCIe MCTP status, then prioritizes high-speed PCIe monitoring, and seamlessly downgrades to SMBus monitoring upon failure. This hierarchical approach prioritizes monitoring performance and information integrity while constructing a multi-redundancy protection mechanism. Furthermore, the shared number of consecutive MCTP monitoring failures provides a unified benchmark for cross-bus MCTP network failure determination, preventing accidental reconstruction triggered by single-bus jitter and significantly improving the reliability and adaptability of the monitoring system.

[0055] In this embodiment of the application, optionally, after "updating the current number of consecutive MCTP monitoring failures", the method further includes: if the updated number of consecutive MCTP monitoring failures reaches a preset threshold, then the MCTP network is determined to be faulty, and the MCTP network reconstruction process is triggered.

[0056] In this embodiment, the baseboard management controller continuously records the number of consecutive failures of MCTP monitoring commands. When the number of consecutive failures reaches a preset threshold, the MCTP network is determined to be in overall failure, and the network reconstruction process is automatically triggered. This mechanism enables rapid self-healing after monitoring link failure, while the preset threshold setting avoids false triggering caused by occasional faults.

[0057] Specifically, after failing to obtain network interface card (NIC) status information via MCTP, the baseboard management controller can update the current consecutive MCTP monitoring failure count. When the updated consecutive MCTP monitoring failure count reaches a preset threshold, the baseboard management controller determines that the current MCTP network has failed entirely. Here, the preset threshold can be a configurable positive integer used to distinguish between occasional temporary failures and persistent network failures; reaching this threshold indicates that in multiple consecutive monitoring cycles, all attempted MCTP methods (whether via SMBus or PCIe) have failed to successfully obtain NIC status information, thus inferring that the NIC's MCTP out-of-band management module (e.g., firmware or endpoint identifier) ​​may be malfunctioning, requiring active intervention.

[0058] Upon determining that the MCTP network has failed, the baseboard management controller immediately triggers the MCTP network reconstruction process. This reconstruction process includes rescanning the network interface cards (NICs) on the corresponding bus, reassigning endpoint identifiers (EIDs) to the target NIC, and re-establishing the MCTP communication link between the baseboard management controller and the target NIC based on the newly assigned EID. Reconstruction resolves monitoring link interruptions caused by NIC firmware reboots, upgrades, or lost endpoint identifiers, allowing subsequent monitoring cycles to attempt to obtain complete NIC status information using MCTP.

[0059] In one specific embodiment, when MCTP network reconstruction is triggered, the selected bus depends on the current startup status of the basic input / output system: if the basic input / output system has not yet completed startup, MCTP network reconstruction based on the SMBus bus is triggered; if the basic input / output system has completed startup, MCTP network reconstruction based on the PCIe bus is triggered.

[0060] This application embodiment realizes automatic detection and self-healing of MCTP network failures. The method does not require manual intervention and can automatically restore the full monitoring capability after the monitoring link is interrupted due to events such as network card firmware restart or upgrade. At the same time, by setting a reasonable number of times threshold, it avoids falsely triggering reconstruction due to single occasional failures (such as bus momentary conflicts), balances the sensitivity and stability of monitoring, and significantly improves the reliability and operation and maintenance efficiency of the server out-of-band management system.

[0061] In this embodiment of the application, optionally, the MCTP network reconstruction process is implemented based on the following steps: rescanning the network cards on the SMBus bus or PCIe bus; after identifying the target network card, reassigning endpoint identifiers to the target network card, and reconstructing the MCTP network between the baseboard management controller and the target network card based on the reassigned endpoint identifiers; after the MCTP network is recreated, sending a test monitoring command to the target network card to verify whether the monitoring function has been restored based on the test monitoring command; if the monitoring function is restored, confirming that the MCTP network reconstruction is successful; otherwise, returning to the step of rescanning the network cards on the SMBus bus or PCIe bus until reconstruction is successful or the preset reconstruction limit is reached; correspondingly, after "confirming that the MCTP network reconstruction is successful", the method further includes: monitoring the startup status of the basic input / output system in the server again, and redetermining the real-time monitoring mode of the target network card based on the re-acquired startup status.

[0062] In this embodiment, MCTP network reconstruction first rescans the network interface cards (NICs) on the corresponding bus based on the startup status of the Basic Input / Output System (BIOS), assigns endpoint identifiers to the target NIC to restore the communication link, and verifies whether the function has been restored by testing and monitoring commands. If it fails, it retryes until it succeeds or reaches the upper limit. After successful reconstruction, the startup status of the BIOS is monitored again, and the real-time monitoring method of the target NIC is re-determined accordingly.

[0063] Specifically, after the MCTP network reconstruction process is initiated, the baseboard management controller first rescans the network interface cards (NICs) on either the SMBus or PCIe bus. The SMBus and PCIe buses are two different physical communication links, each corresponding to a different monitoring method. Which bus is scanned depends on the Basic Input / Output System (BIOS) startup status used to trigger the reconstruction (SMBus is scanned if startup is incomplete, and PCIe is scanned if startup is complete). The purpose of this scan is to re-detect the NICs connected to the bus, obtain their physical addresses or bus locations, and lay the foundation for subsequent endpoint identifier allocation, as NICs may be temporarily invisible after firmware reboots or upgrades.

[0064] After identifying the target network interface card (NIC), the baseboard management controller (BMC) reassigns an Endpoint Identifier (EID) to the NIC and rebuilds the MCTP network between the BMC and the target NIC based on the reassigned EID. The Endpoint Identifier is an 8-bit address in the MCTP protocol used to uniquely identify logical communication terminals in the network, similar to an IP address. A NIC firmware reboot or upgrade will cause the loss of its original EID; therefore, the rebuild process must reassign a new EID. After the reassignment is complete, the communication link based on the MCTP protocol is re-established between the BMC and the target NIC, allowing them to exchange monitoring commands and response data again via MCTP messages.

[0065] After the MCTP network is recreated, the baseboard management controller can send a test monitoring command to the target network interface card (NIC), such as a command to obtain the NIC's temperature or link status, to verify whether the monitoring function has truly been restored. Only by successfully receiving a correct response from the target NIC can it be proven that the MCTP network is not only physically connected, but also that the target NIC's firmware is ready to respond to monitoring requests normally, thus avoiding monitoring blind spots caused by successful link reconstruction but the upper-layer services not yet being restored.

[0066] If the monitoring function is restored, i.e., the test monitoring command is successfully executed and returns the expected result, the baseboard management controller confirms that the MCTP network reconstruction is successful. At this point, the entire reconstruction process is complete, and the monitoring system can recover from the fault state to the normal monitoring state. Subsequent monitoring cycles will attempt to obtain network card status information again using the SMBus bus or PCIe bus according to priority.

[0067] If the monitoring function fails to recover, such as due to test command timeout, error return, or network card unresponsiveness, the baseboard management controller returns to the step of rescanning the network cards on the SMBus or PCIe bus, repeating the entire reconstruction process until reconstruction is successful or the preset reconstruction limit is reached. This cyclic retry mechanism can handle temporary problems such as network card startup delays and transient bus instability, improving the reconstruction success rate through multiple attempts; at the same time, the preset reconstruction limit can prevent infinite loops, promptly stopping reconstruction and triggering an alarm when the network card completely fails.

[0068] Accordingly, after confirming the successful reconstruction of the MCTP network, the baseboard management controller can re-monitor the startup status of the basic input / output system in the server and re-determine the real-time monitoring method for the target network interface card based on the re-acquired startup status. This is because the startup status of the server's basic input / output system may have changed during the period between the MCTP network failure and successful reconstruction, and the original monitoring method priority may no longer be applicable. After re-acquiring the startup status of the basic input / output system, the controller can re-select the optimal monitoring method according to the principle of prioritizing SMBus when startup is incomplete and prioritizing PCIe when startup is complete, achieving seamless adaptive adjustment after reconstruction.

[0069] This application not only reconstructs the underlying communication link but also ensures the actual availability of the upper-layer monitoring function through testing and verification. The introduced retry mechanism and maximum number of attempts balance the recovery success rate with system resource consumption. In particular, after successful reconstruction, the startup status of the basic input / output system is reassessed and the monitoring method is adjusted, ensuring that the post-recovery monitoring strategy always matches the current hardware status of the server, avoiding suboptimal monitoring caused by state changes during the recovery process. This significantly improves the self-healing capability and long-term reliability of the server's out-of-band management system.

[0070] Optionally, before "monitoring the startup status of the basic input / output system in the server again", the method further includes: determining the triggering reason for this MCTP network reconstruction; if the triggering reason is that the number of consecutive failures of MCTP monitoring reaches a preset threshold, and the consecutive failures of MCTP monitoring are identified as being caused by a firmware restart event or firmware upgrade event of the target network card, then the temperature chip of the target network card is directly read through the SMBus bus; correspondingly, the method further includes: after the number of monitoring cycles of directly reading the temperature chip of the target network card through the SMBus bus reaches a preset number, the step of monitoring the startup status of the basic input / output system in the server again is executed.

[0071] In this embodiment, if the triggering reason for the current MCTP network reconstruction is that the number of consecutive MCTP monitoring failures reaches a preset threshold and is caused by firmware restart or upgrade, the MCTP mode will not be restored for the time being. Instead, the temperature will be read directly from SMBus as a transition, which avoids repeated reconstruction during the firmware instability period and ensures stable self-healing of monitoring.

[0072] Specifically, before monitoring the basic input / output system startup status in the server again, the baseboard management controller first needs to determine the triggering reason for this MCTP network reconstruction. MCTP network reconstruction may be triggered by two different conditions: one is passive recovery, where the cumulative number of consecutive MCTP monitoring failures reaches a preset threshold; the other is active recovery, where the baseboard management controller actively performs an out-of-band reboot or upgrade operation. The purpose of distinguishing the triggering reason is that only in the passive recovery scenario is an additional transition step required, because in the case of active recovery, the baseboard management controller clearly knows that the target network card has completed the operation and the firmware is stable, and can directly select the monitoring method again.

[0073] If the triggering reason is that the number of consecutive MCTP monitoring failures reaches a preset threshold, and this consecutive failure event is identified as being caused by a firmware reboot or upgrade event of the target network card, then the baseboard management controller will temporarily not select the monitoring method based on PCIe MCTP or SMBus MCTP according to priority, but will directly read the temperature chip of the target network card through the SMBus bus. Here, the identification process can be achieved through failure mode analysis or status query. When the network card firmware has just been rebooted or upgraded, its MCTP out-of-band management module may not be fully ready. If the monitoring method relying on MCTP is immediately attempted, it is very easy to trigger consecutive failures again and cause repeated rebuilds; while the monitoring method of directly reading the temperature does not rely on any firmware logic, and can stably obtain temperature data even if the network card firmware is in an unstable state, thus serving as a safe monitoring method during the transition period.

[0074] Accordingly, after the number of monitoring cycles for directly reading the target network card's temperature chip via the SMBus bus reaches a preset number, the baseboard management controller executes the step of re-monitoring the basic input / output system's startup status. This preset number can be an empirical threshold to ensure that the network card firmware has passed the instability period following a reboot or upgrade and has recovered to a state capable of reliably responding to MCTP commands. Only after this condition is met is the startup status of the basic input / output system reassessed, and the optimal monitoring method is re-selected according to priority. For example, PCIe MCTP might be prioritized after the basic input / output system is completed, thus achieving a safe and smooth transition from temporary fallback monitoring to comprehensive intelligent monitoring.

[0075] This application's embodiments introduce a transitional fallback monitoring mechanism in passive recovery scenarios. By identifying continuous failures caused by firmware reboots or upgrades, it proactively avoids firmware-dependent monitoring methods and adopts the most stable direct temperature reading method as a temporary measure. A preset number of successful cycles is used as a stabilization period criterion, ensuring that the network card firmware is fully restored before switching back to efficient monitoring mode. This avoids repeated MCTP reconstructions due to firmware instability immediately after a reboot and ensures uninterrupted temperature monitoring during the transition period, significantly improving the robustness and intelligent decision-making capabilities of the monitoring system.

[0076] Optionally, in the process of triggering the MCTP network reconstruction process, the method further includes: simultaneously creating a temperature monitoring channel when starting the MCTP network reconstruction process, wherein the temperature monitoring channel continuously reads the temperature chip of the target network card through the SMBus bus at an initial heartbeat cycle, and records the temperature value read each time and the corresponding timestamp; for each temperature value read, when the temperature value is lower than a first preset threshold, the initial heartbeat cycle is maintained as the current heartbeat cycle; when the temperature value reaches or exceeds the first preset threshold and is lower than a second preset threshold, the current heartbeat cycle is shortened to the first preset cycle; when the temperature value reaches or exceeds the first preset threshold and is lower than a second preset threshold, the current heartbeat cycle is shortened to the first preset cycle; when the temperature value reaches or exceeds the first preset threshold and is lower than a second preset threshold, the current heartbeat cycle is shortened to the first preset cycle; when the temperature value reaches or exceeds the first preset threshold and is lower than a second preset threshold, the current heartbeat cycle is shortened to the first preset cycle. When the second preset threshold is reached, the MCTP network reconstruction process is terminated, an emergency cooling operation is performed, and a temperature alarm log is generated. Accordingly, the method further includes: after the MCTP network reconstruction is successful, the temperature monitoring channel is closed, and the network card status information of the target network card is obtained through the SMBus bus or PCIe bus; and after the MCTP network reconstruction is terminated, the current heartbeat cycle is shortened to a second preset cycle, and the temperature chip of the target network card is read through the temperature monitoring channel until the read temperature value falls below the preset safety threshold, and the MCTP network reconstruction process is restarted, wherein the second preset cycle is less than the first preset cycle.

[0077] In this embodiment, during the MCTP network reconstruction process, an independent temperature monitoring channel is created simultaneously to continuously read the network card temperature with a dynamic heartbeat cycle, and the sampling frequency is adjusted according to the temperature threshold. If the reconstruction is successful, the channel is closed to restore full monitoring. If the reconstruction is aborted, the cycle is further shortened while monitoring is maintained. After the temperature drops, the reconstruction is automatically restarted, thereby realizing a parallel security design of reconstruction and monitoring at the same time.

[0078] Specifically, when initiating the MCTP network reconstruction process, the baseboard management controller can simultaneously create a temperature monitoring channel independent of the MCTP network. This channel directly reads the target network card's temperature chip via the SMBus bus, continuously acquiring the target network card's temperature value at the initial heartbeat cycle and recording the temperature and its corresponding timestamp for each reading. Thus, during MCTP network reconstruction, all monitoring methods relying on MCTP are unavailable, but the temperature monitoring channel, which does not depend on any advanced protocols or network card firmware, can operate independently during the reconstruction process, thereby filling the monitoring vacuum period and ensuring that network card temperature data is not lost.

[0079] For each temperature reading, the baseboard management controller can execute a three-level dynamic heartbeat adjustment strategy. When the temperature value is below the first preset threshold, it indicates that the target network card is within a safe temperature range. In this case, the initial heartbeat cycle remains unchanged, saving system resources with a lower monitoring frequency. When the temperature value reaches or exceeds the first preset threshold but is below the second preset threshold, it indicates that the temperature has entered the attention zone. The current heartbeat cycle is shortened to the first preset cycle, and the sampling frequency is increased to capture temperature change trends more promptly. When the temperature value reaches or exceeds the second preset threshold, it is determined that the target network card has an overheating risk. The current MCTP network reconstruction process is immediately stopped, and emergency cooling operations are performed, such as increasing the server fan speed to the highest setting, and a temperature alarm log is generated to notify the administrator. This tiered response mechanism can automatically strengthen monitoring when the temperature rises, prioritizing hardware safety over continued reconstruction when the temperature is too high.

[0080] Accordingly, different follow-up actions can be taken depending on the different results of MCTP network reconstruction. After successful MCTP network reconstruction, the temperature monitoring channel is shut down, and the network card status information of the target network card is resumed via the SMBus bus or PCIe bus. Since the MCTP link has now returned to normal, there is no need to occupy additional resources for independent temperature monitoring. However, if MCTP network reconstruction is interrupted, for example, due to excessive temperature, the current heartbeat cycle can be further shortened to a second preset cycle. The temperature chip is read through the temperature monitoring channel, and high-frequency monitoring of the network card temperature is maintained until the read temperature value falls below a preset safety threshold. Then, the MCTP network reconstruction process is restarted. The second preset cycle is shorter than the first preset cycle, meaning the monitoring frequency is further increased after the temperature exceeds the limit, ensuring that the temperature drop is detected as quickly as possible and the MCTP network is restored.

[0081] This application embodiment achieves a parallel security design of simultaneous reconstruction and monitoring by simultaneously enabling an independent temperature monitoring channel during MCTP network reconstruction and introducing a dynamic adjustment mechanism for the heartbeat cycle based on temperature thresholds. During reconstruction, the network interface card (NIC) temperature remains under control, responding in tiers according to the severity of the temperature fluctuations. Furthermore, after MCTP network reconstruction is interrupted, high-frequency monitoring is maintained, and reconstruction is automatically retried when the temperature is safe. This design not only avoids the risk of hardware damage due to temperature runaway during reconstruction but also balances monitoring overhead and response speed through an adaptive heartbeat cycle, significantly improving the security and intelligence level of the out-of-band management system for servers.

[0082] Optionally, in this embodiment, the method further includes: when receiving an out-of-band instruction for restarting or upgrading the target network card, setting an active rebuild flag; after completing the restart or upgrade operation of the target network card based on the out-of-band instruction, obtaining the current startup status of the basic input / output system according to the active rebuild flag; if the basic input / output system has not completed startup, triggering an MCTP network rebuild process based on the SMBus bus, otherwise triggering an MCTP network rebuild process based on the PCIe bus; and clearing the active rebuild flag.

[0083] In this embodiment, when the baseboard management controller actively restarts or upgrades the network card via out-of-band commands, after the operation is completed, it selects the corresponding bus to trigger MCTP network reconstruction based on the current startup status of the basic input / output system, thereby achieving fast and accurate self-healing of the monitoring link in the active recovery scenario.

[0084] Specifically, when the baseboard management controller receives an out-of-band command for restarting or upgrading the target network interface card (NIC), an active rebuild flag can be set. Here, an out-of-band command refers to a command issued through a dedicated management channel independent of the operating system and service network, such as a NIC firmware upgrade or reset operation initiated through the baseboard management controller's web interface, IPMI tool, or command line. The active rebuild flag can be a status bit stored in the baseboard management controller's memory or registers, used to mark that this NIC operation was actively initiated by the baseboard management controller, distinguishing it from a passive restart triggered by the operating system. The purpose of setting this flag is to allow the baseboard management controller to recognize that this operation belongs to an active recovery scenario in subsequent processes, thus triggering rebuilding directly without waiting for continuous monitoring command failures.

[0085] After completing the target network interface card (NIC) reboot or upgrade operation based on out-of-band instructions, the baseboard management controller (BMC) can proactively obtain the current boot status of the basic input / output (BIOS) system based on the previously set proactive rebuild flag. Since the reboot or upgrade operation of the target NIC may take several seconds to complete, the BMC can wait for the operation to finish and then immediately read the BIOS boot progress, for example, by querying the BIOS status register or checking the PCIe bus enumeration completion flag. This ensures that the rebuilt bus matches the server's current hardware readiness state, avoiding the reconstruction of the wrong bus at an inappropriate time.

[0086] Subsequently, the baseboard management controller determines which bus's MCTP network reconstruction process to trigger based on the acquired Basic Input / Output System (BIOS) startup status: if the BIOS has not yet completed startup, for example, if the server is still in the Power-On Self-Test (POST) or early initialization phase, the MCTP network reconstruction process based on the SMBus bus is triggered; otherwise, the MCTP network reconstruction process based on the PCIe bus is triggered. The SMBus bus is available early in the server's boot process, while the PCIe bus requires the baseboard management controller to complete enumeration before it can function properly. Therefore, this conditional branching ensures that the reconstruction operation is adapted to the current hardware environment, avoiding blind reconstruction before PCIe is ready, which could lead to failure or timeout.

[0087] Finally, the baseboard management controller clears the active reconstruction flag. Since this active recovery is complete, this flag no longer needs to be retained; clearing it prevents misinterpretation as a new active operation in subsequent monitoring cycles and also avoids conflicts with passive recovery scenarios. After the entire process is completed, it will continue operating according to the reconstructed MCTP network state.

[0088] This application embodiment achieves precise and adaptive MCTP network reconstruction triggered by out-of-band commands through the steps of setting an active reconstruction flag, obtaining the basic input / output system startup status after the operation is completed, selecting the reconstruction bus based on the startup status, and clearing the active reconstruction flag. In the active recovery scenario, there is no need to rely on passive detection of continuous monitoring command failures; reconstruction can be initiated immediately, significantly reducing monitoring interruption time. Simultaneously, the selection of the reconstruction bus is dynamically bound to the basic input / output system startup status, avoiding blind reconstruction on unsuitable buses and improving reconstruction success rate and system efficiency. This adaptive recovery mechanism, combining active and passive approaches, significantly enhances the response speed and reliability of out-of-band server management.

[0089] In this embodiment, optionally, when there are multiple network cards and the real-time monitoring method is an SMBus-based monitoring method, before step 103, the method further includes: sending a channel selection command to the bus switch chip to select the downstream port connected to the target network card, so as to establish a communication connection with the target network card through the SMBus bus, and to execute the SMBus-based monitoring method through the downstream port. The baseboard management controller is connected to the bus switch chip via an I2C bus, and the multiple downstream ports of the bus switch chip are respectively connected to multiple network cards one-to-one. Each network card has the same device address on the SMBus bus. Correspondingly, after step 103, the method further includes: sending a channel switching command to the bus switch chip to select the downstream port corresponding to the next network card, so as to monitor the next network card as a new target network card.

[0090] In this embodiment, when multiple network cards share the same SMBus bus and there is an address conflict, the baseboard management controller uses a bus switch chip to select the downstream ports of each network card in a time-division manner, establishes communication connections sequentially to perform monitoring, and switches to the next network card after monitoring is completed, thereby realizing sequential polling monitoring of multiple network cards.

[0091] Specifically, when multiple network interface cards (NICs) coexist and the current real-time monitoring method is based on the SMBus bus, the baseboard management controller can send a channel selection command to the bus switch chip before officially monitoring the target NIC, selecting the downstream port connected to the target NIC. Here, the bus switch chip is a multiplexer; its upstream receives instructions from the baseboard management controller via the I2C bus, and its downstream branches out into multiple ports, each independently connecting to a NIC. Since all NICs are pre-configured with the same device address on the SMBus bus, direct parallel connection would cause address conflicts. Therefore, the bus switch chip must physically isolate the NIC to be monitored, allowing it to communicate independently with the baseboard management controller's SMBus.

[0092] After selecting the downstream port, the baseboard management controller can establish a communication connection with the target network interface card (NIC) via the SMBus bus and execute SMBus-based monitoring through that downstream port. Specifically, if the MCTP network has been created, the packaged commands are sent using the SMBus MCTP monitoring method to obtain rich information; if it has not been created or has failed, the system degrades to directly reading the temperature chip via the SMBus bus. Since the SMBus bus can only communicate with one device at a time, the baseboard management controller can establish exclusive connections with different NICs in different time slices by utilizing the time-division multiplexing mechanism of the bus switch chip, thereby avoiding address conflicts and realizing time-division monitoring of multiple NICs sharing the same SMBus bus.

[0093] After completing monitoring of the current target network interface card (NIC), the baseboard management controller sends a channel switching command to the bus switch chip to select the downstream port corresponding to the next NIC, thus making the next NIC the new target NIC for monitoring. The channel switching command can disconnect the current NIC from the SMBus bus and simultaneously connect the next NIC, allowing the baseboard management controller to poll all NICs sequentially. Throughout the process, the baseboard management controller needs to maintain a list of NICs and the current monitoring index. After completing the monitoring cycle of one NIC, it switches to the next, repeating this cycle to achieve time-sharing sequential monitoring of multiple NICs.

[0094] This application's embodiments resolve the hardware conflict issue of multiple network interface cards (NICs) being unable to access each other concurrently due to identical device addresses on the SMBus bus by introducing a bus switch chip. Specifically, using only one SMBus bus and a set of standard addresses, coupled with the low-cost channel switching of the bus switch chip, polling monitoring of multiple NICs can be achieved without the need for separate wiring or different address allocation for each NIC. Furthermore, the channel selection and switching actions are strictly synchronized with the monitoring cycle, ensuring real-time monitoring and fairness. This significantly improves hardware resource utilization efficiency and reduces system complexity in server multi-NIC scenarios.

[0095] Furthermore, as a refinement and extension of the specific implementation methods of the above embodiments, and to fully illustrate the specific implementation process of this embodiment, another network interface card adaptive monitoring method is provided, such as... Figure 2 As shown, the method includes: The baseboard management controller first determines if the server is powered on: if not, monitoring ends; if powered on, it further determines if the Basic Input / Output System (BIOS) has completed startup. If the BIOS has not yet completed startup, it checks if the MCTP SMBus network has been established: if established, it prioritizes monitoring the target network card through this network; if monitoring is normal, the process is successful; otherwise, it accumulates the network monitoring error count (i.e., the number of consecutive MCTP monitoring failures mentioned above) and directly reads the target network card's temperature chip via the SMBus bus; if the MCTP SMBus network has not been established, it directly reads the target network card's temperature chip via the SMBus bus. If the BIOS has completed startup, it checks if the MCTP PCIe network has been established: if established, it prioritizes monitoring through the PCIe network; if monitoring is normal, the process is successful; otherwise, it accumulates the network monitoring error count and may switch to SMBus mode; if the MCTP PCIe network has not been established, it reverts to the SMBus-based monitoring mode. The entire process dynamically adapts to the startup phase, ensuring monitoring continuity and information comprehensiveness.

[0096] Furthermore, as Figure 1 In terms of specific implementation, this application provides a network interface card (NIC) adaptive monitoring device applied to a baseboard management controller, such as... Figure 3 As shown, the device includes: The server monitoring module is used to monitor the startup status of the basic input / output system in the server after the monitoring service of the baseboard management controller is started. The monitoring method determination module is used to dynamically determine the real-time monitoring method of the target network card based on the startup status of the basic input / output system. When the startup status is not completed, the real-time monitoring method is a monitoring method based solely on the SMBus bus. When the startup status is completed, the real-time monitoring method is a monitoring method based primarily on the PCIe bus. The monitoring module is used to monitor the target network card through the real-time monitoring method.

[0097] Optionally, the monitoring module is used for: Determine whether an MCTP network has been successfully established between the target network card and the SMBus bus; If successfully created, in each monitoring cycle, based on the MCTP protocol, the command to obtain network card status information is encapsulated and sent to the target network card via the SMBus bus to attempt to obtain network card status information; when the acquisition is successful, the current MCTP monitoring consecutive failure count is cleared to zero; when the acquisition fails, the current MCTP monitoring consecutive failure count is updated, and the temperature chip of the target network card is directly read via the SMBus bus. If creation fails, the temperature chip of the target network card is read directly via the SMBus bus.

[0098] Optionally, the monitoring module is further configured to: Determine whether an MCTP network has been successfully established between the target network card and the PCIe bus; If successfully created, in each monitoring cycle, based on the MCTP protocol, the command to obtain network card status information is encapsulated and sent to the target network card via the PCIe bus to attempt to obtain network card status information; when the acquisition is successful, the current MCTP monitoring consecutive failure count is cleared to zero; when the acquisition fails, the current MCTP monitoring consecutive failure count is updated, and the target network card is monitored through the monitoring method based on the SMBus bus. If creation fails, the target network card will be monitored using the SMBus bus monitoring method.

[0099] Optionally, the apparatus further includes a network reconstruction module; the network reconstruction module is used for: After updating the current number of consecutive MCTP monitoring failures, if the updated number of consecutive MCTP monitoring failures reaches a preset threshold, the MCTP network is determined to be faulty, and the MCTP network reconstruction process is triggered.

[0100] Alternatively, the MCTP network reconstruction process is implemented based on the following steps: Rescan the network cards on the SMBus or PCIe bus; After the target network interface card (NIC) is identified, an endpoint identifier is reassigned to the target NIC, and the MCTP network between the baseboard management controller and the target NIC is rebuilt based on the reassigned endpoint identifier. After the MCTP network is recreated, a test monitoring command is sent to the target network card to verify whether the monitoring function has been restored based on the test monitoring command; If the monitoring function is restored, the MCTP network reconstruction is confirmed to be successful. Otherwise, return to the step of rescanning the network cards on the SMBus bus or PCIe bus until the reconstruction is successful or the preset reconstruction limit is reached; Accordingly, the device further includes a monitoring mode re-determination module; the monitoring mode re-determination module is used for: After confirming the successful reconstruction of the MCTP network, the startup status of the basic input / output system in the server is monitored again. Based on the newly acquired startup status, the real-time monitoring method of the target network card is re-determined.

[0101] Optionally, the device further includes a trigger cause determination module; the trigger cause determination module is configured to: Before monitoring the startup status of the basic input / output system in the server again, determine the triggering reason for this MCTP network reconstruction; If the triggering reason is that the number of consecutive failures of MCTP monitoring reaches a preset threshold, and the consecutive failures of MCTP monitoring are identified as being caused by the firmware restart event or firmware upgrade event of the target network card, then the temperature chip of the target network card is directly read through the SMBus bus. Accordingly, the device further includes a counting module; the counting module is used for: After the number of monitoring cycles of the temperature chip of the target network card directly read via the SMBus bus reaches a preset number, the step of monitoring the startup status of the basic input / output system in the server again is executed.

[0102] Optionally, the device further includes a heart rate cycle adjustment module; the heart rate cycle adjustment module is used for: During the MCTP network reconstruction process, a temperature monitoring channel is created simultaneously when the MCTP network reconstruction process is started. The temperature monitoring channel continuously reads the temperature chip of the target network card through the SMBus bus at the initial heartbeat cycle and records the temperature value and the corresponding timestamp for each reading. For each temperature value read, when the temperature value is lower than the first preset threshold, the initial heartbeat cycle is maintained as the current heartbeat cycle; when the temperature value reaches or exceeds the first preset threshold but is lower than the second preset threshold, the current heartbeat cycle is shortened to the first preset cycle; when the temperature value reaches or exceeds the second preset threshold, the MCTP network reconstruction process is terminated, an emergency heat dissipation operation is performed, and a temperature alarm log is generated. Accordingly, the heart rate cycle adjustment module is also used for: After the MCTP network is successfully rebuilt, the temperature monitoring channel is shut down, and the network card status information of the target network card is restored through the SMBus bus or PCIe bus; and, After the MCTP network reconstruction is aborted, the current heartbeat cycle is shortened to a second preset cycle, and the temperature chip of the target network card is read through the temperature monitoring channel until the read temperature value falls below the preset safety threshold. Then the MCTP network reconstruction process is restarted, wherein the second preset cycle is shorter than the first preset cycle.

[0103] Optionally, the device further includes an active reconstruction module; the active reconstruction module is used for: When an out-of-band command for restarting or upgrading the target network interface card is received, the active rebuild flag is set; After completing the restart or upgrade operation of the target network card based on the out-of-band instruction, the current startup status of the basic input / output system is obtained according to the active reconstruction flag; If the basic input / output system fails to start, the MCTP network reconstruction process based on the SMBus bus is triggered; otherwise, the MCTP network reconstruction process based on the PCIe bus is triggered. Clear the active reconstruction flag.

[0104] Optionally, when multiple network interface cards (NICs) exist and the real-time monitoring method is an SMBus-based monitoring method, the device further includes a NIC selection module; the NIC selection module is used for: Before monitoring the target network card through the real-time monitoring method, a channel selection command is sent to the bus switch chip to select the downstream port connected to the target network card, so as to establish a communication connection with the target network card through the SMBus bus, and to execute the monitoring method based on the SMBus bus through the downstream port. The baseboard management controller is connected to the bus switch chip through the I2C bus, and the multiple downstream ports of the bus switch chip are respectively connected to multiple network cards one by one. Each network card has the same device address on the SMBus bus. Accordingly, the network card selection module is also used for: After monitoring the target network card through the real-time monitoring method, a channel switching command is sent to the bus switch chip to select the downstream port corresponding to the next network card, so as to monitor the next network card as a new target network card.

[0105] It should be noted that other corresponding descriptions of the functional units involved in the network card adaptive monitoring device provided in this application embodiment can be found by referring to... Figures 1 to 2 The corresponding descriptions in the method will not be repeated here.

[0106] This application also provides a computer device, which may specifically be a personal computer, a server, a network device, etc. Figure 4 As shown, the computer device includes a bus, a processor, memory, and a communication interface, and may also include an input / output interface and a display device. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores location information. The network interface allows communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps in the various method embodiments.

[0107] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0108] In one embodiment, a computer-readable storage medium is provided, which may be non-volatile or volatile, having stored thereon a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0109] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0110] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0111] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0112] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0113] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A network interface card (NIC) adaptive monitoring method, characterized in that, Applied to a baseboard management controller, the method includes: After the monitoring service of the baseboard management controller is started, monitor the startup status of the basic input / output system in the server; Based on the startup status of the basic input / output system, the real-time monitoring method of the target network card is dynamically determined. When the startup status is incomplete, the real-time monitoring method is a monitoring method based solely on the SMBus bus. When the startup status is complete, the real-time monitoring method is a monitoring method based primarily on the PCIe bus. The target network card is monitored using the aforementioned real-time monitoring method.

2. The method according to claim 1, characterized in that, Monitoring the target network interface card using the SMBus-based monitoring method includes: Determine whether an MCTP network has been successfully established between the target network card and the SMBus bus; If successfully created, in each monitoring cycle, based on the MCTP protocol, the command to obtain network card status information is encapsulated and sent to the target network card via the SMBus bus to attempt to obtain network card status information; when the acquisition is successful, the current MCTP monitoring consecutive failure count is cleared to zero; when the acquisition fails, the current MCTP monitoring consecutive failure count is updated, and the temperature chip of the target network card is directly read via the SMBus bus. If creation fails, the temperature chip of the target network card is read directly via the SMBus bus.

3. The method according to claim 2, characterized in that, Monitoring the target network card using the PCIe bus-based monitoring method includes: Determine whether an MCTP network has been successfully established between the target network card and the PCIe bus; If successfully created, in each monitoring cycle, based on the MCTP protocol, the command to obtain network card status information is encapsulated and sent to the target network card via the PCIe bus to attempt to obtain network card status information; when the acquisition is successful, the current MCTP monitoring consecutive failure count is cleared to zero; when the acquisition fails, the current MCTP monitoring consecutive failure count is updated, and the target network card is monitored through the monitoring method based on the SMBus bus. If creation fails, the target network card will be monitored using the SMBus bus monitoring method.

4. The method according to claim 2 or 3, characterized in that, After updating the current number of consecutive MCTP monitoring failures, the method further includes: If the number of consecutive failures of the updated MCTP monitoring reaches a preset threshold, the MCTP network is determined to be faulty, and the MCTP network reconstruction process is triggered.

5. The method according to claim 4, characterized in that, The MCTP network reconstruction process is based on the following steps: Rescan the network cards on the SMBus or PCIe bus; After the target network interface card (NIC) is identified, an endpoint identifier is reassigned to the target NIC, and the MCTP network between the baseboard management controller and the target NIC is rebuilt based on the reassigned endpoint identifier. After the MCTP network is recreated, a test monitoring command is sent to the target network card to verify whether the monitoring function has been restored based on the test monitoring command; If the monitoring function is restored, the MCTP network reconstruction is confirmed to be successful. Otherwise, return to the step of rescanning the network cards on the SMBus bus or PCIe bus until the reconstruction is successful or the preset reconstruction limit is reached; Accordingly, after confirming the successful reconstruction of the MCTP network, the method further includes: The startup status of the basic input / output system in the server is monitored again, and the real-time monitoring method of the target network card is re-determined based on the newly acquired startup status.

6. The method according to claim 5, characterized in that, Before monitoring the startup status of the basic input / output system in the server again, the method further includes: Determine the triggering cause of this MCTP network reconstruction; If the triggering reason is that the number of consecutive failures of MCTP monitoring reaches a preset threshold, and the consecutive failures of MCTP monitoring are identified as being caused by the firmware restart event or firmware upgrade event of the target network card, then the temperature chip of the target network card is directly read through the SMBus bus. Accordingly, the method further includes: After the number of monitoring cycles of the temperature chip of the target network card directly read via the SMBus bus reaches a preset number, the step of monitoring the startup status of the basic input / output system in the server again is executed.

7. The method according to claim 4, characterized in that, The method further includes the following steps during the MCTP network reconstruction process: When starting the MCTP network reconstruction process, a temperature monitoring channel is created simultaneously. The temperature monitoring channel continuously reads the temperature chip of the target network card through the SMBus bus at the initial heartbeat cycle and records the temperature value and the corresponding timestamp for each reading. For each temperature value read, when the temperature value is lower than the first preset threshold, the initial heartbeat cycle is maintained as the current heartbeat cycle; when the temperature value reaches or exceeds the first preset threshold but is lower than the second preset threshold, the current heartbeat cycle is shortened to the first preset cycle; when the temperature value reaches or exceeds the second preset threshold, the MCTP network reconstruction process is terminated, an emergency heat dissipation operation is performed, and a temperature alarm log is generated. Accordingly, the method further includes: After the MCTP network is successfully rebuilt, the temperature monitoring channel is shut down, and the network card status information of the target network card is restored through the SMBus bus or PCIe bus; and, After the MCTP network reconstruction is aborted, the current heartbeat cycle is shortened to a second preset cycle, and the temperature chip of the target network card is read through the temperature monitoring channel until the read temperature value falls below the preset safety threshold. Then the MCTP network reconstruction process is restarted, wherein the second preset cycle is shorter than the first preset cycle.

8. The method according to claim 1, characterized in that, The method further includes: When an out-of-band command for restarting or upgrading the target network interface card is received, the active rebuild flag is set; After completing the restart or upgrade operation of the target network card based on the out-of-band instruction, the current startup status of the basic input / output system is obtained according to the active reconstruction flag; If the basic input / output system fails to start, the MCTP network reconstruction process based on the SMBus bus is triggered; otherwise, the MCTP network reconstruction process based on the PCIe bus is triggered. Clear the active reconstruction flag.

9. The method according to claim 1, characterized in that, When multiple network interface cards (NICs) exist and the real-time monitoring method is an SMBus-based monitoring method, before monitoring the target NIC using the real-time monitoring method, the method further includes: A channel selection command is sent to the bus switch chip to select the downstream port connected to the target network card, so as to establish a communication connection with the target network card through the SMBus bus, and to perform monitoring based on the SMBus bus through the downstream port. The baseboard management controller is connected to the bus switch chip through the I2C bus, and the multiple downstream ports of the bus switch chip are respectively connected to multiple network cards one by one. Each network card has the same device address on the SMBus bus. Accordingly, after monitoring the target network card through the real-time monitoring method, the method further includes: A channel switching command is sent to the bus switch chip to select the downstream port corresponding to the next network card, so that the next network card can be used as a new target network card for monitoring.

10. A network card adaptive monitoring device, characterized in that, The device, applied to a substrate management controller, includes: The server monitoring module is used to monitor the startup status of the basic input / output system in the server after the monitoring service of the baseboard management controller is started. The monitoring method determination module is used to dynamically determine the real-time monitoring method of the target network card based on the startup status of the basic input / output system. When the startup status is not completed, the real-time monitoring method is a monitoring method based solely on the SMBus bus. When the startup status is completed, the real-time monitoring method is a monitoring method based primarily on the PCIe bus. The monitoring module is used to monitor the target network card through the real-time monitoring method.

11. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 9.

12. A computer device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 9.