An expansion card monitoring method and device, electronic equipment and storage medium
By decoupling the BMC code through the topological relationship configuration file between the in-place pins and the expansion cards, efficient and accurate monitoring of different expansion cards is achieved, solving the problems of low monitoring efficiency and high error risk in the existing technology, and improving the adaptability and reliability of the system.
Patent Information
- Application Number
- CN202510935045.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-07-08
AI Technical Summary
In the prior art, BMC monitoring of riser cards relies on hard coding, which results in low efficiency and high error risk, and is difficult to adapt to configuration changes of expansion cards of different models and quantities.
By loading the target configuration file from the memory into the internal memory, recording the topological relationship between the in-place pins and the expansion card, and using the topological relationship to perform configuration compliance detection of the expansion card, the controller code and hardware configuration are decoupled, and dynamic adaptation to different expansion card configurations is achieved.
It improves the efficiency and accuracy of expansion card monitoring, simplifies the adaptation process, reduces manual intervention, enhances the flexibility and maintainability of the system, and ensures the compliance detection of expansion cards.
Smart Images

Figure CN120429202B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an expansion card monitoring method, device, electronic device, and storage medium. Background Art
[0002] In server design, the chassis, motherboard, CPU (Central Processing Unit), and memory components typically remain consistent, while functionality is expanded through varying models and quantities of expansion cards (riser cards) to meet specific needs. However, the increasing number of expansion card models poses challenges to monitoring and management of the Baseboard Management Controller (BMC).
[0003] In the related art, the BMC relies on hard-coding to monitor the riser card. This method requires the BMC to modify the code logic for each different riser card situation. This is not only inefficient, but also increases the risk of errors due to frequent manual intervention.
[0004] Therefore, how to improve the efficiency and accuracy of expansion card monitoring is a technical problem that those skilled in the art need to solve. Summary of the Invention
[0005] The present application provides an expansion card monitoring method, device, electronic device, and storage medium, which improve the efficiency and accuracy of expansion card monitoring.
[0006] This application provides an expansion card monitoring method, including:
[0007] Loading a target configuration file from the storage into the internal memory; wherein the target configuration file is used to record a topological relationship between the in-position pin and the expansion card, the topological relationship including a mapping relationship between the in-position pin identifier, the address information of the expansion card connected to the in-position pin, and the expansion card model supported by the in-position pin;
[0008] Read the status of the in-position pin in the target configuration file, detect the address information in the target configuration file to obtain the address detection result;
[0009] The expansion card is configured for compliance testing based on the status of the in-position pins and the address detection results.
[0010] The present application also provides an expansion card monitoring device, comprising:
[0011] A loading module is used to load a target configuration file from the storage into the internal memory; wherein the target configuration file is used to record the topological relationship between the in-position pin and the expansion card, the topological relationship including the mapping relationship between the in-position pin identifier, the address information of the expansion card connected to the in-position pin, and the expansion card model supported by the in-position pin;
[0012] A detection module is used to read the status of the in-position pin in the target configuration file and detect the address information in the target configuration file to obtain the address detection result;
[0013] The detection module is used to perform configuration compliance detection on the expansion card based on the status of the in-position pins and the address detection results.
[0014] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned expansion card monitoring methods when executing the computer program.
[0015] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned expansion card monitoring methods are implemented.
[0016] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above expansion card monitoring methods when executed by a processor.
[0017] The expansion card monitoring method provided by this application maintains the topological relationship between the in-place pins and the expansion card through a target configuration file, which is loaded from the memory into the internal memory when in use. This mechanism achieves the decoupling of the controller code and the expansion card configuration, so that the topological relationship between the in-place pins and the expansion card in different situations does not need to be modified in the controller code. By dynamically loading the target configuration file, the same set of monitoring code logic can be applied to different expansion card configurations, simplifying the adaptation process, reducing manual intervention, and improving the efficiency of expansion card monitoring. Furthermore, the universal expansion card monitoring logic provided by this application is: the compliance of the expansion card is detected based on the status of the in-place pins and the address detection results of the expansion card. The status of the in-place pins reflects whether the expansion card is physically plugged in, while the address detection results verify whether the expansion card complies with the expected communication protocol and type. By comprehensively analyzing these two pieces of information, it is possible to accurately determine whether the currently connected expansion card is compliant, thereby improving the accuracy of expansion card monitoring. This application also discloses an expansion card monitoring device, an electronic device, a computer-readable storage medium, and a computer program product, which can also achieve the above technical effects.
[0018] It should be understood that the foregoing general description and the following detailed description are merely illustrative and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0020] Figure 1 This is a flow chart of a method for monitoring an expansion card according to an exemplary embodiment;
[0021] Figure 2 This is a flow chart showing an expansion card verification method according to an exemplary embodiment;
[0022] Figure 3 The following is a workflow diagram of a configuration file monitoring thread according to an exemplary embodiment;
[0023] Figure 4 is a structural diagram of an expansion card monitoring device according to an exemplary embodiment;
[0024] Figure 5 The figure is a structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0025] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0026] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0027] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0028] An embodiment of the present application provides an expansion card monitoring method, and the method is described in detail in conjunction with the execution flow of the expansion card monitoring method.
[0029] See also Figure 1 , according to an exemplary embodiment, a flow chart of an expansion card monitoring method is shown, as shown in FIG. Figure 1 Shown, including:
[0030] S101: Loading a target configuration file from a storage device into a memory; wherein the target configuration file is used to record a topological relationship between an in-position pin and an expansion card, wherein the topological relationship includes a mapping relationship between an identifier of the in-position pin, address information of the expansion card connected to the in-position pin, and an expansion card model supported by the in-position pin;
[0031] The execution subject of this embodiment may be a controller, specifically a BMC. In this step, the controller reads a specific target configuration file from the non-volatile memory and loads it into the memory. This target configuration file records in detail the topological relationship between the in-place pins and the expansion cards, including but not limited to the identification of the in-place pins, the address information of the expansion card connected to the pins, and the mapping relationship between the supported expansion card models. An in-place pin refers to a hardware connection used to indicate whether a component is inserted, which can be implemented through a GPIO (General Purpose Input / Output) pin. An expansion card refers to a circuit board such as a riser card, which provides additional expansion slots to increase the functionality of the server. By concentrating this information in a target configuration file in a standardized format, such as riser_map.yaml in YAML format (a data serialization format), the controller can load it when in use, thereby dynamically obtaining the latest hardware configuration.
[0032] It can be seen that this step decouples the controller code from the specific hardware configuration, making the same set of monitoring logic in subsequent steps applicable to various hardware configurations, thereby improving the flexibility and maintainability of the system.
[0033] As a feasible implementation, this embodiment further includes: establishing a topological relationship between the in-place pins and the expansion cards based on the identifiers of the respective in-place pins, the address information of the expansion cards connected to the respective in-place pins, and the expansion card models supported by the respective in-place pins; wherein the address information includes a bus address and a device address, such as an I2C Bus (Inter-Integrated Circuit Bus) and an I2C Slave (Inter-Integrated Circuit Slave). In the topological relationship, in-place pins corresponding to the same bus address correspond to different device addresses; generating a target configuration file based on the topological relationship between the in-place pins and the expansion cards, storing the target configuration file in a memory, and generating a timestamp for the target configuration file.
[0034] In a specific implementation, a topological relationship between the in-position pins and the expansion cards is created based on the identifiers of the in-position pins, the address information of the expansion cards connected to the in-position pins, and the supported expansion card models. For example, the topological relationship between the in-position pins and the expansion cards is shown in Table 1:
[0035] Table 1
[0036]
[0037] Furthermore, a target configuration file is generated based on the topological relationships created above, and the timestamp of its generation is recorded in the target configuration file. The generated target configuration file is stored in non-volatile memory. This step ensures that subsequent operations can be dynamically adjusted based on the latest hardware configuration without modifying the underlying code logic, improving the flexibility and maintainability of the system.
[0038] As a feasible implementation method, after generating the target configuration file based on the topological relationship between the in-place pin and the expansion card, it also includes: if there is an update to the topological relationship between the in-place pin and the expansion card, updating the target configuration file in the memory based on the updated topological relationship between the in-place pin and the expansion card, and updating the timestamp of the target configuration file in the memory.
[0039] In specific implementations, when the topological relationship between the in-place pins and the expansion card changes, the target configuration file is regenerated and written to the memory, and the file's timestamp is updated. This update mechanism can be manually triggered or automatically generate a new file after hardware changes are detected. For example, if the server platform is upgraded from supporting Riser1 to supporting Riser8, the corresponding in-place pin support model list and address information need to be modified, and then a new target configuration file is generated and overwritten with the old version, and the timestamp is updated to the latest time. This process ensures that the configuration file always reflects the latest hardware status and improves the adaptability to changes in expansion cards.
[0040] As a feasible implementation method, after loading the target configuration file from the storage into the memory, it also includes: starting the target configuration file monitoring thread, using the target configuration file monitoring thread to read the timestamp of the target configuration file in the memory; determining whether the timestamp of the target configuration file loaded into the memory is consistent with the timestamp of the target configuration file in the memory; if not, reloading the target configuration file from the storage into the memory.
[0041] In specific implementations, after the target configuration file is loaded into memory, a dedicated configuration file monitoring thread is started. This thread periodically reads the timestamp of the current target configuration file in memory and compares it with the timestamp of the configuration file loaded in memory. If the two are inconsistent, it means that the configuration file has been updated, and the system will reload the latest version of the target configuration file from memory into memory. For example, the BMC checks the timestamp of the configuration file every 10 seconds. If the timestamps are found to be different, the reloading process is triggered to ensure that the latest configuration is used. This implements a dynamic update and synchronization mechanism for the configuration file, avoiding misjudgments or monitoring failures caused by the use of expired configurations, and improving the real-time performance and stability of the system.
[0042] S102: Read the status of the in-position pin in the target configuration file, detect the address information in the target configuration file to obtain the address detection result;
[0043] In this step, the status of the in-position pin is read, which reflects whether the expansion card is correctly inserted into the corresponding slot. This can be done by detecting the pin level. Further, the address information of the expansion card is detected. The address detection result reflects whether the expansion card meets the expected communication protocol and type.
[0044] As a feasible implementation method, detecting the address information in the target configuration file to obtain the address detection result includes: performing data read and write operations based on the address information in the target configuration file; if the data read and write operations are successful, the address detection result is a detection success; if the data read and write operations fail, the address detection result is a detection failure.
[0045] In specific implementations, standard read and write operation requests are sent to the corresponding bus based on the address information recorded in the target configuration file, attempting to establish communication with the expansion card. For example, for RISER_4_PRESET_N, read and write operations are initiated on the I2C12 bus to address 0xD6. If communication is successful and a valid response is received, the address detection result is considered a success; conversely, if communication fails, the detection result is considered a failure. By verifying the presence of the expansion card and the correct address through actual communication, the accuracy of address detection is improved, providing a reliable basis for subsequent compliance assessments.
[0046] S103: Perform configuration compliance detection on the expansion card according to the status of the in-position pin and the address detection result.
[0047] In this step, the expansion card is configured for compliance checking based on the status of the in-position pins and the address detection results.
[0048] As a feasible implementation method, the configuration compliance of the expansion card is checked based on the status of the in-position pin and the address detection result, including: if the status of the in-position pin is valid and the address detection result is a detection success, then the configuration of the expansion card corresponding to the in-position pin is determined to be compliant; if the status of the in-position pin is valid and the address detection result is a detection failure, then the configuration of the expansion card corresponding to the in-position pin is determined to be non-compliant; if the status of the in-position pin is invalid, then the configuration of the expansion card corresponding to the in-position pin is determined to be non-compliant.
[0049] In a specific implementation, if the in-position pin status is valid and the address detection result is successful, the expansion card configuration is considered compliant. For example, if the in-position pin status of RISER_2_PRESET_N is valid and a valid expansion card is detected at address 0xD4 on the I2C12 bus, the expansion card configuration is considered compliant. Conversely, if the in-position pin status is valid but the address detection fails, or if the in-position pin status is invalid, the expansion card configuration is considered non-compliant. This dual verification mechanism (in-position pin status plus address detection result) enables accurate judgment of the expansion card configuration status, effectively identifying illegal or incorrectly configured expansion cards.
[0050] As a feasible implementation, after determining that the expansion card configuration corresponding to the in-position pin is compliant, the method further includes: starting a monitoring thread for the expansion card corresponding to the in-position pin, so as to monitor the expansion card corresponding to the in-position pin using the monitoring thread.
[0051] In practice, once compliance is confirmed for an expansion card corresponding to a pin in place, the system initiates a dedicated monitoring thread to continuously monitor the card. For example, once compliance is confirmed for the expansion card corresponding to pin "RISER_5_PRESET_N," a background thread is initiated to regularly perform health checks, temperature readings, and status reporting to ensure the card remains in good condition throughout operation. This enables full lifecycle management of compliant expansion cards, improves the system's ability to monitor the card's operating status, and enhances the overall maintainability and reliability of the server.
[0052] The expansion card monitoring method provided in the embodiment of the present application maintains the topological relationship between the in-place pins and the expansion card through a target configuration file, and the target configuration file is loaded from the memory to the internal memory when in use. This mechanism realizes the decoupling of the controller code and the expansion card configuration, so that there is no need to modify the controller code for the topological relationship between the in-place pins and the expansion card in different situations. By dynamically loading the target configuration file, the same set of monitoring code logic can be applied to different expansion card configurations, which simplifies the adaptation process, reduces manual intervention, and improves the efficiency of expansion card monitoring. Furthermore, the universal expansion card monitoring logic provided by the present application is: the compliance of the expansion card is detected according to the state of the in-place pins and the address detection results of the expansion card. The state of the in-place pins reflects whether the expansion card is physically plugged in, and the address detection result verifies whether the expansion card complies with the expected communication protocol and type. Through the comprehensive analysis of these two pieces of information, it is possible to accurately determine whether the currently connected expansion card is compliant, thereby improving the accuracy of expansion card monitoring.
[0053] Based on the above embodiment, as a preferred implementation, it further includes:
[0054] S201: Collect expansion card operation data;
[0055] While the expansion card monitoring thread is running, it collects real-time operating data from the expansion card, including but not limited to key parameters such as temperature, voltage, current, communication delay, and error count. This data is obtained from the expansion card's sensors or interfaces through the monitoring thread and stored in a temporary data buffer in memory for subsequent analysis.
[0056] S202: Establishing a fault prediction model based on historical data;
[0057] Based on previously collected historical expansion card operating data, a fault prediction model is established using machine learning algorithms (such as linear regression, decision trees, or neural networks). This model can predict the types and probabilities of expansion card failures that may occur in the future based on the currently collected operating data. The training data for the fault prediction model includes known failure cases and their corresponding operating parameter change trends.
[0058] S203: Real-time assessment of expansion card failure risk;
[0059] In the expansion card monitoring thread, real-time operational data is regularly collected and fed into the fault prediction model to calculate the current expansion card's fault risk level. This level can be categorized as low, medium, or high based on the probability of failure. For example, when the probability of failure exceeds a preset threshold (e.g., 80%), the risk is considered high.
[0060] S204: Generate fault warning information;
[0061] When the failure risk level of an expansion card reaches the preset high-risk threshold, a fault warning message is generated and notified to the system administrator through the system log, alarm signal, or user interface. The warning message includes the expansion card ID, predicted failure type, estimated failure time range, and recommended preventive measures (such as premature replacement or repair).
[0062] S205: Recording the comparison data between the fault prediction and the actual fault;
[0063] After an expansion card failure occurs, the prediction model's prediction results are recorded and compared with the actual failure situation to optimize the accuracy and reliability of the failure prediction model. By continuously updating the model parameters, the accuracy of subsequent failure predictions is improved.
[0064] Thus, by introducing an expansion card failure prediction and early warning mechanism, this embodiment can proactively identify potential expansion card failure risks, providing system administrators with ample time to perform preventative maintenance or troubleshooting. This mechanism significantly reduces system downtime caused by sudden expansion card failures, improving system availability and reliability. Furthermore, through continuous optimization of the fault prediction model, the accuracy of fault prediction is further improved, false positives and missed positives are reduced, and the system's intelligence is enhanced.
[0065] The following introduces an application embodiment provided by the present application, which proposes an expansion card monitoring method, which is particularly suitable for the adaptation and management of riser cards in servers. By introducing a dynamically loaded configuration file mechanism in the BMC, unified management and automated monitoring of riser cards of different models and numbers can be achieved. This solution effectively solves the problem of frequent modification of code logic due to changes in hardware configuration in traditional methods, realizes the decoupling between BMC and specific server configuration, and enables the same set of code logic to be applicable to all platforms, significantly simplifying the adaptation process for different models. Even in the face of new customer needs, as long as they comply with this adaptation solution, the BMC's code logic and configuration files can be quickly adapted without any changes.
[0066] In this embodiment, a maximized riser card configuration table is first developed. This table maps in detail the topological relationship between the in-place pin (pin) status and the riser card, including the in-place pin, I2C bus, and I2C slave. The riser card's topological relationship refers to its bus address and slave address information on the I2C bus. Based on this mapping relationship, the BMC can accurately identify and monitor a riser card after determining the I2C bus and I2C slave address on which the riser card is located. Based on the design capabilities and product planning of the server motherboard, the maximum number of riser cards supported on each I2C bus is clearly defined, and the slave addresses of each riser card are rationally arranged to ensure that address conflicts do not occur on the same I2C bus. In addition, riser cards with the same I2C bus and slave address, regardless of model, must have the same in-place pin identifier to ensure configuration consistency and verifiability.
[0067] Subsequently, the correspondence between the above-mentioned in-place Pin, I2C Bus, and I2C Slave is written into a standardized configuration file riser_map.yaml. During the operation of the BMC, the configuration file will be loaded from the storage into the memory area, and subsequent expansion card monitoring operations will be performed based on the topological relationship defined therein. This method of dynamically loading the configuration file through the program makes the topological relationship mapping rules of the riser card independent of the BMC main program, avoiding the tedious process of modifying the code due to hardware changes. When the server hardware configuration changes or the adaptation strategy needs to be adjusted, it is only necessary to update the configuration file content to complete the adaptation without recompiling or restarting the BMC.
[0068] like Figure 2 As shown in the figure, the BMC reads and verifies riser card information in the following order: The expansion card monitoring thread starts, retrieves the expansion card mapping table from the cache, polls the status of the pins in place and the topology of the expansion card, and determines whether the detection results match. If they match, it continues to obtain expansion card information; if not, it triggers an expansion card non-compliance alarm. This process ensures real-time monitoring and verification of expansion card status, allowing for timely detection and resolution of non-compliance issues.
[0069] To further enhance the dynamic adaptability and real-time performance, this embodiment also designs a configuration file monitoring thread specifically for monitoring and updating the configuration information of the riser card. This mechanism ensures that changes in the configuration file can be responded to in a timely manner and take effect without restarting the BMC, thereby improving flexibility and maintenance efficiency. Figure 3As shown, upon startup, the configuration file monitoring thread first reads the timestamp of the target configuration file to obtain the latest status. It then checks whether the timestamp has been updated. If not, it enters sleep mode, waits 10 seconds, and checks again. If the timestamp has been updated, indicating that the configuration file has changed, it restarts to read the target configuration file and updates the cached expansion card mapping table. Finally, it notifies the expansion card monitoring thread to perform the corresponding monitoring operations based on the latest configuration information.
[0070] With this mechanism, when server hardware configuration changes or adaptations require adjustments, simply update the riser_map.yaml configuration file without restarting the BMC. The configuration file monitoring thread automatically detects these changes and loads the new configuration information into the memory area, ensuring that the system always runs with the latest configuration data. This dynamic update method not only simplifies maintenance but also avoids service interruptions caused by frequent BMC restarts.
[0071] Combined with the expansion card monitoring thread described above, the entire monitoring process forms a closed loop: the configuration file monitoring thread monitors configuration file changes in real time and notifies the expansion card monitoring thread of any changes. The expansion card monitoring thread, based on the latest configuration information, polls the status of in-place pins and the topology of expansion cards to ensure compliance and proper operation of all riser cards. Any non-compliance detected immediately triggers an alarm, notifying operations and maintenance personnel for action.
[0072] In summary, this embodiment achieves efficient and accurate monitoring of expansion cards by establishing a standardized riser card topology mapping relationship, combining a dynamic configuration file loading mechanism with universal monitoring logic. This solution not only simplifies the BMC code structure and improves compatibility and stability, but also significantly reduces development and maintenance costs, enhances the server platform's adaptability to diverse hardware environments, and has significant practical application value.
[0073] An expansion card monitoring device provided in an embodiment of the present application is introduced below. The expansion card monitoring device described below and the expansion card monitoring method described above can be referenced to each other.
[0074] See also Figure 4 , according to an exemplary embodiment, a structural diagram of an expansion card monitoring device is shown, such as Figure 4 Shown, including:
[0075] The loading module 100 is configured to load a target configuration file from the storage into the internal memory; wherein the target configuration file is configured to record a topological relationship between the in-position pins and the expansion cards, wherein the topological relationship includes a mapping relationship between the in-position pin identifiers, the address information of the expansion cards connected to the in-position pins, and the expansion card models supported by the in-position pins;
[0076] The detection module 200 is used to read the status of the in-position pin in the target configuration file and detect the address information in the target configuration file to obtain the address detection result;
[0077] The detection module 300 is used to perform configuration compliance detection on the expansion card according to the status of the in-position pins and the address detection result.
[0078] The expansion card monitoring device provided in the embodiment of the present application maintains the topological relationship between the in-place pins and the expansion card through a target configuration file, and the target configuration file is loaded from the memory to the internal memory when in use. This mechanism realizes the decoupling of the controller code and the expansion card configuration, so that there is no need to modify the controller code for the topological relationship between the in-place pins and the expansion card in different situations. By dynamically loading the target configuration file, the same set of monitoring code logic can be applied to different expansion card configurations, which simplifies the adaptation process, reduces manual intervention, and improves the efficiency of expansion card monitoring. Furthermore, the universal expansion card monitoring logic provided by the present application is: the compliance of the expansion card is detected according to the state of the in-place pins and the address detection results of the expansion card. The state of the in-place pins reflects whether the expansion card is physically plugged in, and the address detection result verifies whether the expansion card complies with the expected communication protocol and type. Through the comprehensive analysis of these two pieces of information, it is possible to accurately determine whether the currently connected expansion card is compliant, thereby improving the accuracy of expansion card monitoring.
[0079] Based on the above embodiment, as a preferred implementation, it further includes:
[0080] A creation module is used to create a topological relationship between the in-position pins and the expansion cards based on the identifiers of the in-position pins, the address information of the expansion cards connected to the in-position pins, and the expansion card models supported by the in-position pins; wherein the address information includes a bus address and a device address, and in the topological relationship, the in-position pins corresponding to the same bus address correspond to different device addresses;
[0081] The generation module is used to generate a target configuration file based on a topological relationship between the in-place pins and the expansion card, store the target configuration file in a memory, and generate a timestamp for the target configuration file.
[0082] Based on the above embodiment, as a preferred implementation, it further includes:
[0083] The update module is used to update the target configuration file in the memory based on the updated topological relationship between the in-place pins and the expansion card when the topological relationship between the in-place pins and the expansion card is updated, and to update the timestamp of the target configuration file in the memory.
[0084] Based on the above embodiment, as a preferred implementation, it further includes:
[0085] The first monitoring module is used to load the target configuration file from the storage into the internal memory, start the target configuration file monitoring thread, use the target configuration file monitoring thread to read the timestamp of the target configuration file in the storage; determine whether the timestamp of the target configuration file loaded into the internal memory is consistent with the timestamp of the target configuration file in the storage; if not, reload the target configuration file from the storage into the internal memory.
[0086] Based on the above embodiment, as a preferred implementation mode, the detection module 200 is specifically used to: perform data read and write operations based on the address information in the target configuration file; if the data read and write operation is successful, the address detection result is a detection success; if the data read and write operation fails, the address detection result is a detection failure.
[0087] Based on the above embodiments, as a preferred implementation mode, the detection module 300 is specifically used to: if the state of the in-position pin is valid and the address detection result is a detection success, then the expansion card configuration corresponding to the in-position pin is determined to be compliant; if the state of the in-position pin is valid and the address detection result is a detection failure, then the expansion card configuration corresponding to the in-position pin is determined to be non-compliant; if the state of the in-position pin is invalid, then the expansion card configuration corresponding to the in-position pin is determined to be non-compliant.
[0088] Based on the above embodiment, as a preferred implementation, it further includes:
[0089] The second monitoring module is configured to start a monitoring thread for the expansion card corresponding to the in-position pin after determining that the expansion card corresponding to the in-position pin is configured in compliance, so as to monitor the expansion card corresponding to the in-position pin by using the monitoring thread.
[0090] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0091] An embodiment of the present application further provides an electronic device, Figure 5 FIG. 1 is a structural diagram of an electronic device according to an exemplary embodiment. Figure 5 As shown, the electronic equipment includes:
[0092] Communication interface 1, capable of exchanging information with other devices such as network devices;
[0093] The processor 2 is connected to the communication interface 1 to implement information exchange with other devices and is used to execute the expansion card monitoring method provided by one or more of the above technical solutions when running a computer program. The computer program is stored in the memory 3.
[0094] Of course, in actual application, the various components in the electronic device are coupled together through the bus system 4. It can be understood that the bus system 4 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 4 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 5 Various buses are labeled as bus system 4.
[0095] The memory 3 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program used to operate on the electronic device.
[0096] It is understood that the memory 3 can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a magnetic disk or a magnetic tape. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memory 3 described in the embodiments of the present application is intended to include but is not limited to these and any other suitable types of memories.
[0097] The method disclosed in the above-mentioned embodiment of the present application can be applied to processor 2 or implemented by processor 2. Processor 2 may be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the above-mentioned method can be completed by the integrated logic circuit of the hardware in processor 2 or instructions in the form of software. The above-mentioned processor 2 can be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 2 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in memory 3. Processor 2 reads the program in memory 3 and completes the steps of the above-mentioned method in combination with its hardware.
[0098] When the processor 2 executes the program, the corresponding processes in each method of the embodiment of the present application are implemented. For the sake of brevity, they are not repeated here.
[0099] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above-mentioned expansion card monitoring method embodiments when running.
[0100] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0101] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by the processor 2, the steps of any of the above expansion card monitoring method embodiments are implemented.
[0102] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by the processor 2, the steps of any of the above-mentioned expansion card monitoring method embodiments are implemented.
[0103] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0104] The above describes in detail the expansion card monitoring system, method, device, equipment, medium, and product provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is intended only to facilitate understanding of the method and core concept of the present application. It should be noted that those skilled in the art may make various improvements and modifications to the present application without departing from the principles of the present application, and such improvements and modifications also fall within the scope of protection of the present application.
Claims
1. A method for monitoring an expansion card, characterized in that: include: Creating a topological relationship between the in-position pins and the expansion cards based on the identifiers of the in-position pins, the address information of the expansion cards connected to the in-position pins, and the expansion card models supported by the in-position pins; wherein the address information includes a bus address and a device address, and in the topological relationship, in-position pins corresponding to the same bus address correspond to different device addresses; generating a target configuration file based on a topological relationship between the in-place pins and the expansion card, and storing the target configuration file in a memory; Load the target configuration file from storage into memory; Reading the status of the in-position pin in the target configuration file, detecting the address information in the target configuration file to obtain an address detection result; wherein the address detection result is used to reflect whether the expansion card conforms to the expected communication protocol and type; Performing configuration compliance detection on the expansion card according to the status of the in-position pin and the address detection result; The step of performing configuration compliance detection on the expansion card according to the status of the in-position pin and the address detection result includes: If the status of the in-position pin is valid and the address detection result is detection success, it is determined that the expansion card configuration corresponding to the in-position pin is compliant; If the status of the in-position pin is valid and the address detection result is detection failure, it is determined that the expansion card configuration corresponding to the in-position pin is non-compliant; If the status of the in-position pin is invalid, determining that the expansion card configuration corresponding to the in-position pin is non-compliant; After determining that the expansion card configuration corresponding to the in-position pin is compliant, the method further includes: Starting a monitoring thread for the expansion card corresponding to the in-position pin, so as to monitor the expansion card corresponding to the in-position pin by using the monitoring thread; The step of monitoring the expansion card corresponding to the in-position pin by using the monitoring thread includes: During the operation of the monitoring thread, operating data of the expansion card is collected, the operating data is input into a fault prediction model, and the failure risk level of the expansion card is calculated; wherein the fault prediction model is established using a machine learning algorithm based on pre-collected historical operating data of the expansion card; When the failure risk level of the expansion card reaches a preset high-risk threshold, generating failure warning information; Comparison data between the prediction results of the fault prediction model and the actual fault situation is recorded to optimize the fault prediction model.
2. The expansion card monitoring method according to claim 1, characterized in that: After storing the target configuration file in the memory, the method further includes: The timestamp when the target configuration file was generated.
3. The expansion card monitoring method according to claim 2, wherein: After generating the target configuration file based on the topological relationship between the in-place pins and the expansion card, it also includes: If the topological relationship between the in-place pins and the expansion card is updated, the target configuration file in the memory is updated based on the updated topological relationship between the in-place pins and the expansion card, and the timestamp of the target configuration file in the memory is updated.
4. The expansion card monitoring method according to claim 2, wherein: After loading the target configuration file from the storage into the memory, it also includes: Starting a target configuration file monitoring thread, and using the target configuration file monitoring thread to read a timestamp of the target configuration file in the memory; Determine whether the timestamp of the target configuration file loaded into the memory is consistent with the timestamp of the target configuration file in the storage; If not, the target configuration file is reloaded from the storage into the memory.
5. The expansion card monitoring method according to claim 1, wherein: Detecting the address information in the target configuration file to obtain an address detection result includes: Performing data read and write operations based on the address information in the target configuration file; If the data read and write operation is successful, the address detection result is detection success; If the data read or write operation fails, the address detection result is detection failure.
6. An expansion card monitoring device, characterized in that: include: A creation module is used to create a topological relationship between the in-position pins and the expansion cards based on the identifiers of the in-position pins, the address information of the expansion cards connected to the in-position pins, and the expansion card models supported by the in-position pins; wherein the address information includes a bus address and a device address, and in the topological relationship, the in-position pins corresponding to the same bus address correspond to different device addresses; A generating module, configured to generate a target configuration file based on a topological relationship between the in-place pins and the expansion card, and store the target configuration file in a memory; Loading module, used to load the target configuration file from the storage into the memory; a detection module, configured to read the status of the in-position pin in the target configuration file and detect the address information in the target configuration file to obtain an address detection result; wherein the address detection result is used to reflect whether the expansion card conforms to the expected communication protocol and type; A detection module, configured to perform configuration compliance detection on the expansion card according to the status of the in-position pin and the address detection result; The detection module is specifically configured to: if the state of the in-position pin is valid and the address detection result is a detection success, determine that the expansion card configuration corresponding to the in-position pin is compliant; if the state of the in-position pin is valid and the address detection result is a detection failure, determine that the expansion card configuration corresponding to the in-position pin is non-compliant; if the state of the in-position pin is invalid, determine that the expansion card configuration corresponding to the in-position pin is non-compliant; Among them, also include: A second monitoring module is configured to start a monitoring thread for the expansion card corresponding to the in-position pin after determining that the configuration of the expansion card corresponding to the in-position pin is compliant, so as to monitor the expansion card corresponding to the in-position pin using the monitoring thread; Among them, the second monitoring module is specifically used to: collect the operating data of the expansion card during the operation of the monitoring thread, input the operating data into the fault prediction model, and calculate the failure risk level of the expansion card; wherein, the fault prediction model is established using a machine learning algorithm based on pre-collected historical operation data of the expansion card; when the failure risk level of the expansion card reaches a preset high-risk threshold, generate fault warning information; record the comparison data between the prediction results of the fault prediction model and the actual fault situation to optimize the fault prediction model.
7. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the expansion card monitoring method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed, implements the steps of the expansion card monitoring method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Server component monitoring method and device, electronic equipment and storage medium
CN116662123A
Topology generation method, expansion board card and server
CN117687944A