Component measurement method, controller and server
By setting trigger conditions in the calculation system to trigger component measurement in a timely manner and matching with the reference value, the system instability caused by component abnormalities is solved, and the system safety and reliability are improved.
Patent Information
- Application Number
- CN202510510986.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-08-05
AI Technical Summary
How to measure components in a timely and effective manner to ensure the operational safety and stability of the computing system, especially when components are abnormal, they are discovered and dealt with in a timely manner.
By setting trigger conditions, the measurement of the component is promptly triggered, the measurement value is obtained, and the reference value in the reference value file is matched. If it does not match, relevant operations will be performed, such as outputting an exception prompt, stopping the component startup or generating log information, etc., to ensure the safety and stability of the system.
It realizes timely detection of component abnormalities, avoids system failures, improves the operating safety and stability of the system, and enhances fault analysis and maintenance capabilities.
Smart Images

Figure CN120429178A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of servers, and in particular to a component measurement method, a controller, and a server. Background Art
[0002] Computing systems generally include multiple components, such as the CPU (Central Processing Unit). The security requirements for system components are becoming increasingly stringent. To verify the safety of a component, the component's metric value is generally measured and compared with a baseline value recorded for the component. If the metric value is the same as the baseline value or the difference is small, it indicates that the component is working normally. If the metric value is different from the baseline value or the difference is large, it indicates that the component is working abnormally.
[0003] From the above content, it can be seen that whether the components are operating normally or not requires timely component measurement. Therefore, how to measure components in a timely and effective manner to ensure the safety of system operation is a technical problem that needs to be solved urgently. Summary of the Invention
[0004] The embodiments of the present application provide a component measurement method, controller, and server. By setting trigger conditions, component measurement is triggered in a timely manner, so that component operation anomalies can be quickly discovered through component measurement, the system can be maintained in a timely manner, and the system operation security and stability can be improved.
[0005] According to a first aspect of an embodiment of the present application, a component measurement method is provided, comprising:
[0006] In response to a trigger condition being met, the component is measured to obtain a measurement value of the component. The trigger condition refers to a condition that triggers the measurement of the component.
[0007] The reference value of a component is queried from the reference value file. The reference value file is used to manage the reference value of each component.
[0008] If the metric value of the component does not match the reference value, a first operation associated with abnormal operation of the component is performed.
[0009] In an embodiment of the present application, by setting a trigger condition, the measurement of the component is triggered in time to obtain the measurement value of the component. Since the measurement of the component is relatively timely, the measurement value of the component obtained can have a high timeliness. The measurement value with higher timeliness is matched with the benchmark value of the component in the benchmark value file. If the measurement value and the benchmark value do not match, the first operation related to the abnormal operation of the component is executed. The component is processed accordingly in a timely manner through the first operation. System operation failures or instability caused by abnormal component measurement are avoided, so that component operation abnormalities can be quickly discovered through component measurement, and the system can be maintained in time, thereby improving the safety and stability of system operation.
[0010] In conjunction with the first aspect, in certain implementations of the first aspect, in response to a trigger condition being satisfied, measuring a component to obtain a measurement value of the component includes:
[0011] During the operation of the component, in response to the satisfaction of the trigger condition, the component is measured to obtain the measurement value of the component;
[0012] And / or, during the component startup process, in response to satisfying a trigger condition, the component is measured to obtain a measurement value of the component.
[0013] In an embodiment of the present application, measurement of a component is triggered during component operation, or measurement of a component is triggered during component startup, or measurement of a component is triggered both during component startup and during component operation. Measurement and verification of components are performed at different operation stages, and flexible setting of component measurement stages is achieved. This can avoid system operation failures caused by component abnormalities at different stages and improve the overall operation safety and reliability of the system.
[0014] In conjunction with the first aspect, in certain implementations of the first aspect, the triggering condition includes at least one of the following:
[0015] receiving a first request, the first request being a request for measuring a component initiated by a user through a first interface, the first interface being a standardized interface for server hardware management;
[0016] Detecting a change in the power supply state of a component, where the power supply state includes a power-on state or a power-off state;
[0017] A change in the working state of a component is detected, where the working state includes a normal working state or an abnormal working state;
[0018] Detecting a change in component configuration information, where configuration information refers to information configuring the component's operating parameters;
[0019] A change in hardware configuration information that affects the normal operation of a component is detected;
[0020] A firmware upgrade for the component was detected;
[0021] Detection of plugging and unplugging of components;
[0022] It is detected that the measurement time of the component is met, and the measurement time is determined according to the measurement cycle of the component.
[0023] In an embodiment of the present application, multiple trigger conditions are set, and different trigger conditions are used to trigger the measurement of different types of components in different scenarios, making the component triggering method more diverse, avoiding the problem of untimely and inefficient component measurement due to a single trigger condition, thereby triggering the measurement of components in a timely, fast and convenient manner, improving the flexibility of component measurement, no longer limiting component measurement to a relatively single firmware upgrade scenario, improving component measurement efficiency, and further improving system security and reliability.
[0024] In conjunction with the first aspect, in some implementations of the first aspect, the first operation includes at least one of the following:
[0025] Output prompt information of abnormal component operation;
[0026] Stop the activation of components or shut down components;
[0027] Generates component log information and stores it in a log file.
[0028] In an embodiment of the present application, by performing corresponding processing on components with abnormal operation through one or more of abnormal prompts, component operation control or log records, the system's ability to handle component abnormalities can be improved, thereby enhancing the system's stability, maintainability and fault analysis capabilities.
[0029] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes:
[0030] receiving a second request, where the second request is a request initiated by a user through the first interface to update a reference value of a component;
[0031] According to the second request, the reference value of the component in the reference value file is updated, and the updated reference value of the component is used for matching with the measurement value of the component.
[0032] In an embodiment of the present application, a user is allowed to initiate an update request for the benchmark value of a component through the second interface, so that the user can adjust the benchmark value of the component more flexibly. By executing the update of the benchmark value of the component more timely and effectively, abnormal judgment or missed judgment of the stability of system operation due to untimely update of the benchmark value of the component can be avoided, the control effect of the measurement requirement judgment of the component is improved, and the stability and reliability of the system operation can be ensured.
[0033] In conjunction with the first aspect, in some implementations of the first aspect, the second request includes a component index and a latest reference value;
[0034] Updating the reference value of the component according to the second request includes:
[0035] querying the measurement parameters in the reference value file according to the component index in the second request;
[0036] Delete the original baseline value of the measurement parameter and add the latest baseline value as the baseline value of the measurement parameter.
[0037] In an embodiment of the present application, when updating an incorrect baseline value, the component can be updated according to the component index. The component index can be used to quickly and accurately locate the parameters of the baseline value that need to be updated, making the latest baseline value method simple, direct and efficient, thereby avoiding confusion and misjudgment that may be caused by the simultaneous existence of new and old baseline values, and ensuring the accuracy of the system when using baseline values to match measurement values.
[0038] In conjunction with the first aspect, in some implementations of the first aspect, the component includes one or more of the following:
[0039] Central processing unit (CPU); Redundant Array of Independent Disks (RAID) card; Hard disk; Network card.
[0040] In the embodiment of the present application, when measuring components, the main focus is on the CPU, Raid card, hard disk and / or network card, covering the more critical components in the computing system. It is possible to understand the specific operating status of the system from multiple dimensions, promptly discover components that may have problems, avoid system operation abnormalities caused by abnormal component operation, and improve the reliability and stability of the system.
[0041] According to a second aspect of an embodiment of the present application, a controller is provided, which may include a storage unit and a processing unit, the storage unit being used to store a benchmark value file, the benchmark value file being used to manage the benchmark values of each component, and the processing unit being used to execute the component measurement method of any one of the embodiments of the present application.
[0042] In combination with the second aspect, in certain implementations of the second aspect, the controller is a baseboard management controller BMC, the BMC includes a security protocol and data model SPDM module, and the SPDM module is used to execute the component measurement method of any one of the embodiments of the present application.
[0043] Optionally, the storage unit may further store a computer program, and the processing unit may execute the computer program to implement any component measurement method provided in the embodiments of the present application.
[0044] According to a third aspect of an embodiment of the present application, a server is provided, comprising: a component and a controller, wherein the component is in communication with the controller, and the controller is used to execute the component measurement method of any one of the embodiments of the present application.
[0045] According to a fourth aspect of the present application, a computing device is provided, comprising: a memory and a controller; the memory is used to store computer programs and benchmark value files, and the controller is used to execute the computer programs to implement any component measurement method provided in the embodiments of the present application.
[0046] According to a fifth aspect of the present application, a computer-readable storage medium is provided, on which a computer program and a reference value file are stored. When the computer program is executed by a controller, the steps of any component measurement method are implemented.
[0047] According to a sixth aspect of the present application, a computer product is provided, comprising: a computer program, which implements the steps of any component measurement method when executed by a controller.
[0048] As will be described in detail below, the component measurement method provided in the embodiment of the present application triggers the measurement of the component in a timely manner by setting a trigger condition, and obtains the measurement value of the component. Since the measurement of the component is relatively timely, the measurement value of the component obtained can have a high timeliness. In addition, in the embodiment of the present application, the benchmark value of each component is efficiently managed through a benchmark value file, so that the benchmark value of the component can be queried from the benchmark value file. The measurement value of the component is then matched with the benchmark value. If the measurement value and the benchmark value do not match, the first operation related to the abnormal operation of the component is executed. The component is processed accordingly in a timely manner through the first operation. System operation failure or instability caused by abnormal component measurement is avoided, so that the abnormal operation of the component is quickly discovered through component measurement, the system is maintained in time, and the safety and stability of the system operation are improved.
[0049] It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the technology as claimed. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The above and other purposes, features, and advantages of the embodiments of the present application will become more apparent through a more detailed description of the embodiments of the present application in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solutions of the present application and do not constitute a limitation of the embodiments of the present application. In the drawings, the same reference numerals generally represent the same components or steps.
[0051] Figure 1 FIG2 is a schematic structural diagram of a server according to an embodiment of the present application;
[0052] Figure 2 FIG2 is another structural diagram of a server according to an embodiment of the present application;
[0053] Figure 3 FIG2 is a flowchart of a component measurement method according to an embodiment of the present application;
[0054] Figure 4An example diagram of trigger verification according to an embodiment of the present application is shown;
[0055] Figure 5 FIG2 is another flow chart illustrating a component measurement method according to an embodiment of the present application;
[0056] Figure 6 FIG2 is another flow chart illustrating a component measurement method according to an embodiment of the present application;
[0057] Figure 7 FIG2 shows an example diagram of updating a reference value according to an embodiment of the present application;
[0058] Figure 8 FIG. 1 is an exemplary flow chart of a component measurement method according to an embodiment of the present application;
[0059] Figure 9 FIG2 is a schematic structural diagram of a controller according to an embodiment of the present application;
[0060] Figure 10 The figure shows a hardware block diagram of a computing device according to an embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more apparent, the exemplary embodiments of the present application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described herein.
[0062] The technical solution of the present application can be applied to the security testing of computing systems. By timely triggering the measurement of components in the computing system, abnormal operation of components can be quickly discovered through component measurement, and the system can be maintained in a timely manner to improve the safety and stability of system operation.
[0063] In order to facilitate understanding of the technical solutions of the embodiments of the present application, the terms involved in this document are explained below.
[0064] 1. The AFM (attestation firmware manifest) file usually contains some measurement values of the BIOS (basic input and output system firmware) firmware, which are used to compare with the measurement values obtained from the CPU during the measurement verification process.
[0065] 2. SPDM (security protocol and data model) is a secure platform device management protocol used to manage devices in a secure environment.
[0066] 3. A baseboard management controller (BMC) is a specialized microcontroller, an embedded electronic device used to manage and monitor various parameters of the motherboard and other hardware. It operates independently of the server's main operating system and hardware. It primarily monitors and manages server hardware status, such as temperature, voltage, fan speed, and power supply status. It also allows remote power on / off, reboot, and firmware updates, records and reports hardware events and faults, and provides system logs and sensor data.
[0067] 4. The Redfish interface is a standardized interface for server hardware management. It is a commonly used protocol in BMC and can be used to manage servers.
[0068] 5. HTTPS (Hyper Text Transfer Protocol Secure) is a secure HTTP (Hyper Text Transfer Protocol) that provides security guarantees such as data encryption, server authentication, and message integrity through the SSL (Secure Sockets Layer) / TLS (Transport Layer Security) protocol.
[0069] 6. Measurement Value: The SPDM protocol provides a Get Measurement Value command, which can obtain the measurement value of the peer device firmware / component, namely one or more hash values. Each hash value corresponds to a measurement parameter, which can be used to verify whether the component is damaged or tampered with. Measurement parameters are parameters related to the operation of the component.
[0070] 7. BASE64 (base64 encoding) is an encoding method that uses 64 characters to represent binary data. It converts binary data into text format so that it can be transmitted or stored in environments that only support text data.
[0071] A computing system can consist of multiple components, and the proper functioning of each component plays a crucial role in ensuring the smooth operation of the system. For example, if the CPU, a key component in a computing system, experiences an operational anomaly, the entire system may crash or even cease operation. To ensure the smooth operation of the computing system, components can be measured during system startup to obtain component measurement values. These component measurement values are then compared with their baseline values. If the measurement values match the baseline values, the component is confirmed to be functioning properly. If they do not, a warning message indicating the component measurement anomaly is displayed, prompting maintenance personnel to promptly address the component failure.
[0072] In the embodiments of the present application, trigger conditions for component measurements can be added to any component of the computing system. By setting these trigger conditions, component measurements can be triggered in a timely manner. Furthermore, a baseline value file is provided to manage the baseline values of each component, thereby enabling efficient management and query of each component's baseline values and performing comparisons between component measurements and baseline values. By comparing component measurements with baseline values, component operating anomalies can be quickly detected, allowing for timely system maintenance and improved system operational security and stability.
[0073] The technical solutions of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0074] Figure 1 This is an example diagram of a server provided in an embodiment of the present application. The server may include a component 10 and a controller 20.
[0075] The controller 20 may execute any component measurement method provided in the embodiments of the present application.
[0076] For example, in response to a trigger condition being met, the controller 20 can measure the component 10 and obtain a measurement value of the component 10. The controller 20 can include a storage unit (not shown) that can store a reference value file 30. The controller 20 can read the component's reference value from the reference value file 30 and determine whether the component's measurement value matches the reference value. If the measurement value does not match the reference value, the controller 20 can execute a first operation associated with abnormal component operation.
[0077] In one possible design, Figure 2 As shown, the controller 20 may be a BMC 201. The BMC 201 may include an SPDM management module 2011, and the SPDM management module 2011 may execute the component measurement method provided in the embodiment of the present application.
[0078] Specifically, the SPDM management module 2011 can measure the component 10 in response to the trigger condition being met to obtain a measurement value of the component 10. It can also read the reference value of the component 10 from the reference value file 30 and determine whether the measurement value of the component 10 matches the reference value. If the measurement value of the component 10 does not match the reference value, a first operation related to abnormal component operation is executed.
[0079] It is understandable that the component 10 refers to at least one component located in a computing system, such as at least one of a motherboard, a CPU (central processing unit), a network card, a memory, a hard disk, a power supply, and the like.
[0080] For example, the component 10 may include, but is not limited to, at least one of the following: a CPU; a Raid (Redundant Array of Independent Disks Controller) card; a hard disk; and a network card.
[0081] In the embodiment of the present application, when measuring components, the main focus is on the CPU, Raid card, hard disk and / or network card, covering the more critical components in the computing system. It is possible to understand the specific operating status of the system from multiple dimensions, promptly discover components that may have problems, avoid system operation abnormalities caused by abnormal component operation, and improve the reliability and stability of the system.
[0082] Figure 3 This is a flowchart of a component measurement method provided in an embodiment of the present application. The component measurement method can be configured as a controller. The controller can be configured independently or located in a server or computing device. The component measurement method can include the following steps:
[0083] S301 . In response to a trigger condition being met, measure a component to obtain a measurement value of the component. The trigger condition refers to a condition that triggers measurement of the component.
[0084] It is understandable that the controller can detect in real time whether the component meets the trigger condition.
[0085] It can also be understood that the trigger condition may refer to a trigger condition set for a component. Specifically, the trigger conditions of different components may be the same or different and may be set according to requirements.
[0086] It is understandable that measuring a component and obtaining a measurement value of the component may include: sending a measurement request to the component and receiving a measurement value sent by the component, where the measurement value includes measurement results of various measurement parameters of the component.
[0087] The measurement value of a component may refer to a result obtained by measuring a measurement parameter of the component, and specifically may include measurement results of one or more measurement parameters.
[0088] Taking the hard disk as an example, the working status of the hard disk can be used as a measurement parameter. The working status can include online status, offline status, or disk error status. The measurement value can specifically be any one of the online status, offline status, or disk error status.
[0089] Of course, the measurement parameters and the specific number of parameters of the components are not limited in the embodiments of the present application and can be set according to the use requirements. Specifically, the measurement value of the component can include the measurement result corresponding to at least one measurement parameter.
[0090] Optionally, before measuring a component, a component root certificate may be received, and security authentication of the component may be performed based on the component root certificate. After the security authentication is passed, the component may be measured.
[0091] S302: Query the reference value of the component from the reference value file, where the reference value file is used to manage the reference value of each component.
[0092] It will be appreciated that the baseline value file can be stored in a memory, which can be located in a computing device or server. The baseline value file allows for the query or management of the baseline values of each component at any time, enabling efficient management of the baseline values of each component. Compared to using traditional BIOS firmware to store baseline values, managing the baseline values of each component through a baseline value file is more flexible and convenient.
[0093] Optionally, querying the component's baseline value from the baseline value file may include: querying the component's baseline value from the baseline value file stored in a memory via an SPDM management module configured in the BMC. The baseline value file may be located in a memory associated with the BMC.
[0094] Optionally, the reference value file may be any type of file, such as a TXT (Text File), a table, or any other type of file. In the embodiment of the present application, there are no excessive restrictions on the file type of the reference value file.
[0095] S303: If the measurement value of the component does not match the reference value, execute a first operation related to abnormal operation of the component.
[0096] It is understandable that each component may be set with a reference standard, namely a benchmark value (also referred to as a standard value, a reference value, and the specific naming of the reference standard is not excessively limited in this embodiment).
[0097] After obtaining the measurement value and the reference value of the component, the measurement value and the reference value of the component can be matched. If the measurement value of the component matches the reference value, it means that the component is working normally. If the measurement value of the component does not match the reference value, it means that the component is abnormal.
[0098] For example, a match between a component's metric value and a reference value may mean that the component's metric value is the same as the reference value, or that the difference between the component's metric value and the reference value is less than a first threshold value. A mismatch between a component's metric value and the reference value may mean that the component's metric value is different from the reference value, or that the difference between the component's metric value and the reference value is greater than or equal to the first threshold value.
[0099] Optionally, in order to improve data security, the measurement value of the component can be represented by a hash value, and the reference value of the component is generally also a hash value. Determining whether the measurement value of the component matches the hash value may include: determining whether the hash value obtained by measuring the component is the same as the hash value of the component in the reference value file. If the hash value obtained by measuring the component is the same as the hash value of the component in the reference value file, it is determined that the measurement value of the component matches the reference value; if the hash value obtained by measuring the component is different from the hash value of the component in the reference value file, it is determined that the measurement value of the component does not match the reference value.
[0100] Optionally, the measurement value of the component can be represented by a measurement result, in which case the benchmark value of the component is also represented by the benchmark result. The measurement result and the benchmark result have the same data unit or type. Determining whether the measurement value of the component matches the hash value may include: determining whether the measurement result of the component is the same as the benchmark result of the component. If the difference between the measurement result obtained by measuring the component and the benchmark result of the component is less than a first threshold value, it is determined that the measurement value of the component matches the benchmark value. If the difference between the measurement result of the component and the benchmark result of the component is greater than or equal to the first threshold value, it is determined that the measurement value of the component does not match the benchmark value.
[0101] The component's baseline value can include sub-baseline values for each metric. For example, if the CPU's communication and payment functions need to function properly when program A runs properly, the metric parameters associated with the component and program A may include communication and payment metrics.
[0102] Furthermore, matching the metric value with the reference value may refer to matching the measurement result of each metric parameter with the sub-reference value of each metric parameter. If the measurement result of the metric parameter is the same as the sub-reference value, or the difference is less than a second threshold, then it can be determined that the measurement result of the metric parameter matches the sub-reference value. If not, then it is determined that the measurement result of the metric parameter does not match the sub-reference value.
[0103] If there are multiple measurement parameters, a first number of measurement parameters whose measurement results match the sub-reference values can be determined, and a ratio of the first number to a second number of all measurement parameters can be calculated. If the ratio is greater than or equal to the first ratio, it is determined that the measurement value of the component matches the reference value. The first ratio can be a value greater than 0 or less than or equal to 1. For example, the first ratio can be 0.5 or 0.8.
[0104] It is also understood that the component measurement method provided in the embodiment of the present application may further include: the component measurement value may be stored in the form of an AMF file, and the AMF file may include: a component header and measurement values. The measurement value may include measurement results corresponding to multiple measurement parameters.
[0105] The component header may include information such as version number, manufacturer, component model, etc. The measurement result i of the measurement parameter i of the component may include: component index, hash value, measurement result, last update time, measurement value type, and hash algorithm used for the measurement value.
[0106] Among them, the component index is used to uniquely identify the component, and specifically can be a unique number, identifier or string to facilitate the distinction between different components. The hash value may refer to a fixed-length value obtained by performing a hash calculation on relevant data (such as measurement results or benchmark results) through a hash algorithm. The measurement result may refer to a specific value or description obtained after measuring the component, such as the size or performance data of the component. The last update time may refer to the time when the component was last updated. The measurement value type may refer to a physical quantity used to record the measurement results, such as the length, width and height corresponding to the size of the component, or a specific indicator representing the performance data of the component, such as temperature, data flow and other indicators. The hash algorithm used for the measurement value specifically refers to the specific hash algorithm used when performing the hash calculation.
[0107] Table 1 below shows a file structure of an AMF file:
[0108] Component Head Version number Manufacturer Component Type Metric parameter i Measurement result i (i is an integer between 1 and N) index Hash value Measuring results Last updated Metric Type Hash algorithm used for measurement values
[0109] A component can be measured multiple times. Therefore, the AMF file can include multiple measurement values of the component. The measurement values include measurement results corresponding to multiple measurement parameters.
[0110] That is, an AMF file can consist of a component header, measurement parameter 1-measurement result 1, measurement parameter 2-measurement result 2, and so on. Measurement parameter N-measurement result N is a positive integer greater than or equal to 1. The measurement value corresponding to the most recent update time of the AMF file can be used as the measurement value for benchmark matching.
[0111] In an embodiment of the present application, by setting a trigger condition, the measurement of the component is triggered in a timely manner to obtain the measurement value of the component. Since the measurement of the component is relatively timely, the measurement value of the component obtained can have a high timeliness. The measurement value with high timeliness is matched with the reference value of the component. If the measurement value and the reference value do not match, the first operation related to the abnormal operation of the component is executed. The component is processed accordingly in a timely manner through the first operation. System operation failures or instability caused by abnormal component measurement are avoided, so that component operation abnormalities can be quickly discovered through component measurement, and the system can be maintained in a timely manner, thereby improving the safety and stability of system operation.
[0112] In one possible design, the first operation may include but is not limited to at least one of the following:
[0113] Outputs prompt information about component operation abnormalities.
[0114] Stop the component from starting or shutting down the component.
[0115] Generates component log information and stores it in a log file.
[0116] Optionally, a prompt message indicating abnormal operation of a component may be outputted through a display page, a pop-up window, a short message, or an email.
[0117] Optionally, stopping the startup of a component may refer to shutting down the startup process of the component. Shutting down a component may refer to shutting down the running process of the component.
[0118] Optionally, generating the log information of the component may include generating the log information of the component according to the measurement value of the component and the matching result with the reference value. Storing the log information in the log file may include storing the log information in the log file according to a log format.
[0119] In an embodiment of the present application, by performing corresponding processing on components with abnormal operation through one or more of abnormal prompts, component operation control or log records, the system's ability to handle component abnormalities can be improved, thereby enhancing the system's stability, maintainability and fault analysis capabilities.
[0120] In one possible design, S301 may include the following three execution scenarios:
[0121] Scenario 1: During the operation of a component, in response to a trigger condition being met, the component is measured to obtain a measurement value of the component. The trigger condition refers to a condition that triggers the measurement of the component.
[0122] It can be understood that a component being in operation means that the component is in a working state.
[0123] Scenario 2: During component startup, in response to a trigger condition being met, the component is measured to obtain a measurement value of the component. The trigger condition refers to a condition that triggers the measurement of the component.
[0124] It is understood that the component startup process refers to the process of switching the component from a shutdown state to a working state. For example, the process of inserting a hard disk into a motherboard and driving the hard disk to work normally in the software system is a process of hard disk startup.
[0125] Scenario 3: During component startup, in response to a trigger condition being met, the component is measured to obtain a component measurement value. Subsequently, during component operation, in response to a trigger condition being met, the component is measured to obtain a component measurement value.
[0126] Component measurement can be performed successively during component startup and component movement, realizing multi-stage component measurement and expanding component measurement scenarios.
[0127] In an embodiment of the present application, measurement of a component can be triggered during the operation of the component, or measurement of a component can be triggered during the component startup process, or measurement of a component can be triggered both during the component startup process and during the operation of the component. Measuring and verifying components at different operation stages can avoid system operation failures caused by component abnormalities at different stages, thereby improving the overall operation safety and reliability of the system.
[0128] In one possible design, the triggering condition may include, but is not limited to, at least one of the following conditions 1 to 8:
[0129] Condition 1: A first request is received, where the first request is a request initiated by a user through a first interface to measure a component. The first interface is a standardized interface for server hardware management.
[0130] Figure 4 This is an example diagram of a trigger verification provided in an embodiment of the present application, and Figure 2 The difference of the illustrated embodiment is that the trigger condition includes S401 a first request to trigger measurement. Specifically, a user initiates a first request through a first interface, and the first request is received as a trigger condition to trigger component measurement.
[0131] Exemplarily, the measurement triggered by the user through the first interface can be detected. Specifically, during the triggering process, the user can initiate a first request to the component through the first interface, and receiving the first request can determine that the trigger condition is met, thereby triggering the measurement of the component.
[0132] Initiating the first request through the first interface allows the user to trigger the measurement of the component through a standardized interface, taking into account both user interaction and communication differences between different components, and improving the scalability and interoperability of the system.
[0133] Condition 2: It is detected that the power supply state of the component changes, and the power supply state includes a power-on state or a power-off state.
[0134] Optionally, the change in power supply state may, for example, refer to a component being switched from a power-off state to a power-on state, ie, the component being powered on, or a component being switched from a power-on state to a power-off state, ie, the component being powered off.
[0135] Optionally, the change in power supply state may also refer to a change in power supply state of a component caused by plugging or unplugging a component, such as the component switching to a powered-on state when the component is plugged into the motherboard, and switching to a powered-off state when the component is unplugged from the motherboard.
[0136] For example, Figure 4 In S402, the power-on or hot-swap operation of a component triggers component measurement. That is, the detection of a component being inserted into or removed from the motherboard causes a change in the component's power supply state, confirming that the trigger condition has been met. Alternatively, the detection of a component being powered on or off also causes a change in the component's power supply state, confirming that the trigger condition has been met.
[0137] Condition 3: A change in the working state of a component is detected, where the working state includes a normal working state or an abnormal working state.
[0138] Optionally, the working state of a component may be defined as a normal working state or an abnormal working state.
[0139] Specifically, the actual working status of different components can be set separately. For example, the normal working status of hardware can be online, and the abnormal working status can be offline. The normal working status of the CPU can be normal operation, and the abnormal working status can be slow operation.
[0140] Condition 4: A change in the configuration information of a component is detected. The configuration information refers to information for configuring the operating parameters of the component.
[0141] Optionally, the configuration information of a component may include a reference value of the component. If the reference value of the component changes, measurement of the component may be triggered. Specifically, if an update of the reference value of the component is detected, it may be determined that the trigger condition is met, and measurement of the component may be triggered.
[0142] Of course, the configuration information of the component may also include other parameters that affect the operation of the component, such as the temperature of the component, occupied bandwidth, packet loss rate and other parameters. The specific type and quantity of the configuration information of the component are not excessively limited in the embodiments of the present application.
[0143] Condition 5: It is detected that the hardware configuration information that affects the normal operation of the component has changed.
[0144] Alternatively, if the configuration information of the hardware that affects the normal operation of the component changes, the trigger condition may be determined to be met. For example, if the configuration information of the GPU changes, the hard disk may be determined to meet the trigger condition and the hard disk may be measured.
[0145] For example, the configuration information of the GPU may refer to information such as power management settings and performance mode. In the embodiments of the present application, the specific content and quantity of the hardware configuration information are not excessively limited.
[0146] Condition 6: Detecting that a firmware upgrade is being performed for a component.
[0147] Optionally, the relevant information of the component may be stored in firmware, which may be, for example, BIOS firmware. Upgrading the firmware of the component may refer to upgrading the BIOS firmware.
[0148] Condition 7: Detection of component plugging and unplugging operations.
[0149] It is understood that the component and the controller can be located in the same device or in different devices. The component is independent and can be plugged in and out of the motherboard independently. Therefore, plugging and unplugging the component can trigger the measurement of the component.
[0150] The plugging and unplugging operations may include plugging a component into a motherboard and unplugging a component from a motherboard. The controller may be located on the motherboard or on another motherboard. The specific physical structure of the computing device or server is not particularly limited in the embodiments of the present application.
[0151] Condition 8: It is detected that the measurement time of the component is met, and the measurement time is determined according to the measurement cycle of the component.
[0152] By setting the measurement cycle, the components can be measured periodically. For example, the measurement cycle can be set in hours or days.
[0153] The triggering conditions of a component can be selected from the above conditions 1 to 8. Different triggering conditions can be selected for different component types and different operating scenarios.
[0154] Specifically, the triggering condition of the component may be selected from Condition 1 to Condition 8 according to the type of the component and / or the operation scenario of the component.
[0155] The types of components may include, for example, CPU, RAID card, hard disk, network card, etc. The running scenarios of components may include, for example, startup scenarios or running scenarios.
[0156] 1. Taking the Raid card as an example, you can select condition 3 as the trigger condition during operation.
[0157] That is, during the operation of the Raid card, if it is detected that the working state of the Raid card changes, the measurement of the Raid card is triggered.
[0158] 2. Taking the hard disk as an example, you can select condition 3, condition 8, or condition 5 as the trigger condition during operation.
[0159] That is, during the operation of the hard disk, if a change in the working status of the hard disk is detected, measurement of the hard disk is triggered.
[0160] Alternatively, during hard drive operation, if the hard drive's measurement time is detected, the hard drive measurement is triggered. Periodically triggering hard drive measurement can help identify potential faults in a timely manner.
[0161] Alternatively, during the operation of the hard disk, if it is detected that the configuration information of the hardware that affects the operation of the hard disk (such as a GPU (graphics processing unit)) changes, the measurement of the hard disk is triggered.
[0162] It is understandable that the configuration information of the GPU may include, for example, power management setting information, performance mode, and other information.
[0163] In an embodiment of the present application, multiple trigger conditions are set, and different trigger conditions are used to trigger the measurement of different types of components in different scenarios, making the component triggering method more diverse, avoiding the problem of untimely and inefficient component measurement due to a single trigger condition, thereby triggering the measurement of components in a timely, fast and convenient manner, improving the flexibility of component measurement, no longer limiting component measurement to a relatively single firmware upgrade scenario, improving component measurement efficiency, and further improving system security and reliability.
[0164] As mentioned above, trigger conditions are used to trigger the measurement of components, and different operating scenarios may correspond to different trigger conditions.
[0165] The following combination Figure 5 The component measurement method of the embodiment of the present application executed in the above scenario 1 is described in detail.
[0166] Figure 5 A flowchart of a component measurement method provided in an embodiment of the present application, the component measurement method may include the following steps:
[0167] S501: During the operation of a component, a first request is received, or a change in the component's working state / configuration information / configuration information of hardware affecting the normal operation of the component is detected, or a measurement time of the component is detected to be met, and then a trigger condition is determined to be met.
[0168] The first request is a request for measuring a component initiated by a user through a first interface, where the first interface refers to a normative interface for server hardware management.
[0169] Optionally, the first interface may be, for example, a Redfish interface.
[0170] The measurement time is determined according to the measurement cycle of the component.
[0171] S502: Measure the component to obtain a measurement value of the component. The trigger condition refers to a condition that triggers the measurement of the component.
[0172] S503: Query the reference value of the component from the reference value file, where the reference value file is used to manage the reference value of each component.
[0173] S504: If the measurement value of the component does not match the reference value, execute a first operation related to abnormal operation of the component.
[0174] In the embodiment of the present application, during the operation of a component, a trigger condition is used, such as by receiving a first request, or detecting a change in the component's operating status / configuration information / configuration information of hardware that affects the normal operation of the component, or detecting that a condition such as the measurement time of the component is satisfied. During the operation of the component, the need to measure and detect the component is captured from more aspects, thereby promptly discovering abnormal operation of the component, achieving effective monitoring of the component, and promptly discovering abnormal operating components and taking corresponding measures, further achieving effective monitoring and management of the component, improving the stability, reliability, and maintainability of the system, and having strong technical practicality and value.
[0175] The following combination Figure 6 The component measurement method of the present application in the above scenario 2 is described in detail.
[0176] Figure 6 A flowchart of a component measurement method provided in an embodiment of the present application, the component measurement method may include the following steps:
[0177] S601: During component startup, if a change in the power supply state of the component is detected, or if a plugging or unplugging operation is detected on the component, it is determined that a trigger condition is met.
[0178] S602: Measure the component to obtain a measurement value of the component. The trigger condition refers to a condition that triggers the measurement of the component.
[0179] S603: Query the reference value of the component from the reference value file, where the reference value file is used to manage the reference value of each component.
[0180] S604: If the measurement value of the component does not match the reference value, execute a first operation related to abnormal operation of the component.
[0181] As mentioned above, trigger conditions are used to trigger the measurement of components. Different components can have different trigger conditions. The following will describe in detail the setting of trigger conditions in combination with different types of components.
[0182] In this embodiment, during component startup, component measurement is triggered promptly by monitoring changes in the component's power supply status or detecting any plugging or unplugging operations. This ensures that component measurement is initiated promptly when critical events occur, allowing for rapid identification of potential problems. This enables effective monitoring and management of components during startup, improving system stability, reliability, and maintainability.
[0183] In the related art, the reference value of a component can generally only be updated when the BIOS firmware is updated, which makes it difficult to update the reference value of a component.
[0184] In order to solve the problem of difficulty in updating the reference value of a component, an embodiment of the present application provides a first interface, through which an update of the reference value of a component can be initiated at any time.
[0185] Therefore, based on any of the above embodiments, the present invention further includes:
[0186] A second request is received, where the second request is a request initiated by a user through the first interface to update a reference value of a component.
[0187] According to the second request, the reference value of the component in the reference value file is updated, and the updated reference value of the component is used for matching with the measurement value of the component.
[0188] For ease of understanding, the following Figure 7 An example diagram of a reference value update provided by an embodiment of the present application is shown. Figure 7 In S701, the SPDM module may detect a second request initiated by the user through the first interface, and thus the SPDM module may update the reference value of the component in the reference value file according to the second request in S702.
[0189] Alternatively, receiving the second request may include receiving the second request via the first communication protocol.
[0190] The first communication protocol may be a communication protocol between the controller and the user. For example, the first communication protocol may be the HTTPS protocol. The HTTPS protocol can improve the communication security between the component and the user.
[0191] In an embodiment of the present application, a user is allowed to initiate an update request for the benchmark value of a component through the second interface, so that the user can adjust the benchmark value of the component more flexibly. By executing the update of the benchmark value of the component more timely and effectively, abnormal judgment or missed judgment of the stability of system operation due to untimely update of the benchmark value of the component can be avoided, the control effect of the measurement requirement judgment of the component is improved, and the stability and reliability of the system operation can be ensured.
[0192] Further, based on any of the above embodiments, the second request includes a component index and a latest reference value.
[0193] Updating the reference value of the component according to the second request includes:
[0194] According to the component index in the second request, the measurement parameters in the benchmark value file are queried.
[0195] Delete the original baseline value of the measurement parameter and add the latest baseline value as the baseline value of the measurement parameter.
[0196] Optionally, the second request may be in the form of a request body. Table 2 below shows the structure of the request body:
[0197] First-level attributes Secondary attributes type Measurements Parts Index Inter Latest benchmark values BASE64 encoding
[0198] It is understood that the component's baseline value may include at least one sub-baseline value corresponding to each metric parameter. When the component's baseline value is updated, one or more of the metric parameters may be updated.
[0199] Specifically, the latest benchmark value may include the latest sub-benchmark values corresponding to one or more metric parameters, so that the one or more metric parameters are updated to the latest sub-benchmark values.
[0200] Optionally, if no measurement parameter is found from the reference value file, a new measurement parameter may be added to the reference value file, and the component index, measurement parameter, and the reference value of the measurement parameter in the second request are stored in association with each other.
[0201] Optionally, the measurement value of any component can also be deleted. If the second request requests to delete the reference value of the measurement parameter of a component, the measurement parameter of the component can be queried in the reference value file, and the measurement parameter of the component and the reference value corresponding to the measurement parameter can be deleted.
[0202] Optionally, the second request may include indication information of the modification type, where the modification type may include addition, modification, or deletion. The indication information may explicitly indicate the modification type or implicitly indicate the modification type.
[0203] The indication information displays the modification type. If the modification type is carried in a field in the second request, the field can occupy one or more characters. For example, if the value of one character is 1, the modification type is determined to be modification or addition; if the value of the field is 0, the modification type is determined to be deletion. For example, if the value of two characters is "00", the modification type is determined to be deletion; if the value is "01", the modification type is determined to be modification; and if the value is "11", the modification type is determined to be addition.
[0204] The indication information implicitly indicates the modification type. For example, the modification type may be carried in the latest baseline value of the measurement parameter. If the latest baseline value is not empty, the modification type is determined to be modification or addition. If the latest baseline value is empty, the modification type is determined to be deletion.
[0205] In an embodiment of the present application, when updating an incorrect baseline value, the component can be updated according to the component index. The component index can be used to quickly and accurately locate the parameters of the baseline value that need to be updated, making the latest baseline value method simple, direct and efficient, thereby avoiding confusion and misjudgment that may be caused by the simultaneous existence of new and old baseline values, and ensuring the accuracy of the system when using baseline values to match measurement values.
[0206] It is also understandable that Figure 6 The illustrated embodiments and Figure 5 The illustrated embodiments may be executed in combination. Specifically, S601 to S604 may be executed first, and then S501 to S504 may be executed to implement component measurement at different operation stages.
[0207] like Figure 8 FIG. 1 is an exemplary flow chart of a component measurement method provided in an embodiment of the application. Figure 8 , the component measurement method may include:
[0208] S801: Check whether the trigger condition is met. If so, execute S802.
[0209] S801 may include: during component startup, if a change in the power supply status of the component is detected, or if a plugging or unplugging operation is detected on the component, then determining that the trigger condition is satisfied. And / or during component operation, if a first request is received, or if a change in the component's operating status / configuration information / configuration information of hardware that affects the normal operation of the component is detected, or if a measurement time for the component is detected, then determining that the trigger condition is satisfied.
[0210] S802: Trigger measurement.
[0211] The trigger measurement step specifically includes: measuring the component to obtain the measurement value of the component, and the trigger condition refers to the condition that triggers the measurement of the component.
[0212] S803: Read the reference value.
[0213] Reading the reference value specifically involves querying the reference value of a component from a reference value file, where the reference value file is used to manage the reference value of each component.
[0214] S804: Match the reference value and the measurement value of the component and obtain a matching result of the component.
[0215] The matching step specifically includes: determining whether the measurement value of the component matches the reference value, and obtaining a matching result of the component.
[0216] If the measurement value of the component does not match the reference value, a matching failure is determined as the matching result.
[0217] If the measurement value of the component matches the reference value, a successful match is determined as a matching result.
[0218] S805: Store the matching results of the components.
[0219] S806: Check whether the matching result is successful. If not, execute S807; if so, execute S808.
[0220] S807: Execute the first operation.
[0221] S808: End the measurement of this component.
[0222] In the embodiment of the present application, by detecting whether the trigger condition is met as a prerequisite for triggering measurement, component measurement is achieved when necessary, thereby improving the safety of component measurement. In addition, the matching result of the component can be obtained by reading the reference value, matching the measurement value of the component and the reference value. The matching result may include that the measurement value of the component does not match the reference value, or that the measurement value of the component matches the reference value, and the matching result is stored. The storage of the match makes it easy to query the matching result of the component and realize efficient management of information. Afterwards, whether the matching result is a successful match is also used to determine whether to execute the first operation or directly end the measurement. Different processing flows are implemented according to different matching results, which can make the entire component measurement process clearer, improve the system's ability to handle component abnormalities, and enhance the system's stability, maintainability and fault analysis capabilities.
[0223] Figure 9A structural diagram of a controller provided in an embodiment of the present application, the controller 900 may include a storage unit 901 and a processing unit 902. Among them, the storage unit 901 is used for storing a reference value file, and the reference value file is used to manage the reference value of each component. The processing unit 902 can be specifically used to execute: in response to meeting a trigger condition, measuring the component to obtain the measurement value of the component, and the trigger condition refers to the condition that triggers the measurement of the component. Query the reference value of the component from the reference value file. If the measurement value and the reference value of the component do not match, execute the first operation related to the abnormal operation of the component.
[0224] Optionally, the processing unit 902 performs, in response to the trigger condition being met, measurement on the component to obtain a measurement value of the component, specifically including:
[0225] During the operation of the component, in response to the trigger condition being met, the component is measured to obtain the measurement value of the component; and / or, during the startup of the component, in response to the trigger condition being met, the component is measured to obtain the measurement value of the component.
[0226] Optionally, the trigger condition includes at least one of the following:
[0227] receiving a first request, the first request being a request for measuring a component initiated by a user through a first interface, the first interface being a standardized interface for server hardware management;
[0228] Detecting a change in the power supply state of a component, where the power supply state includes a power-on state or a power-off state;
[0229] A change in the working state of a component is detected, where the working state includes a normal working state or an abnormal working state;
[0230] Detecting a change in component configuration information, where configuration information refers to information configuring the component's operating parameters;
[0231] A change in hardware configuration information that affects the normal operation of a component is detected;
[0232] A firmware upgrade for the component was detected;
[0233] Detection of plugging and unplugging of components;
[0234] It is detected that the measurement time of the component is met, and the measurement time is determined according to the measurement cycle of the component.
[0235] Optionally, the first operation includes at least one of the following:
[0236] Output prompt information of abnormal component operation;
[0237] Stop the activation of components or shut down components;
[0238] Generates component log information and stores it in a log file.
[0239] Optionally, the processing unit 902 is also used to: receive a second request, which is a request initiated by the user through the first interface to update the baseline value of the component; according to the second request, update the baseline value of the component, and the updated baseline value of the component is used to match the measurement value of the component.
[0240] Optionally, the second request includes a component index and a latest reference value;
[0241] The processing unit 902 updates the reference value of the component according to the second request, specifically including:
[0242] querying the measurement parameters in the reference value file according to the component index in the second request;
[0243] Delete the original baseline value of the measurement parameter and add the latest baseline value as the baseline value of the measurement parameter.
[0244] Optionally, the components include one or more of the following:
[0245] Central processing unit (CPU); Redundant Array of Independent Disks (RAID) card; Hard disk; Network card.
[0246] Figure 10 A hardware block diagram of a computing device provided in an embodiment of the present application. The computing device 1000 according to an embodiment of the present application includes at least a memory 1001 and a controller 1002. The memory 1001 is used to store computer programs and reference value files, the reference value files are used to manage reference values for various components, and the controller 1002 is used to execute the computer program to implement the component measurement method of any of the above embodiments.
[0247] In addition, the memory 1001 and the controller 1002 are both electrically connected to the bus 1003 .
[0248] Optionally, the computing device 1000 may further include a component 1004 .
[0249] The controller 1002 may be, for example, a BMC, which may include an SPDM module. The SPDM module is used to execute any component measurement method provided in the embodiments of the present application.
[0250] In addition, an embodiment of the present application further provides a computer-readable storage medium for storing a computer program. When the computer program is executed by a processor, the component measurement method of any of the above embodiments of the present application is implemented. The computer-readable storage medium includes, but is not limited to, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, optical disk, magnetic disk, etc.
[0251] An embodiment of the present application further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the component measurement method of any of the above embodiments of the present application.
[0252] The basic principles of the present application have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, and effects mentioned in the embodiments of the present application are merely illustrative and not restrictive, and it should not be assumed that these advantages, strengths, and effects are required of each embodiment of the present application. In addition, the specific details disclosed above are merely for the purpose of illustration and ease of understanding, and are not restrictive. The above details do not limit the embodiments of the present application to necessarily adopting the above specific details.
[0253] The block diagrams of the devices, apparatuses, equipment, and systems involved in the embodiments of the present application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, or configured in any manner. Words such as "include," "comprise," "have," and the like are open-ended words, meaning "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or" and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0254] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.
[0255] It should also be noted that in the controller, computing device, server, and method of the embodiments of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the embodiments of the present application.
[0256] Various changes, substitutions, and modifications of the technology herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the embodiments of the present application is not limited to the specific aspects of the processes, machines, manufactures, components of events, means, methods, and actions described above. Currently existing or later developed processes, machines, manufactures, components of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, components of events, means, methods, or actions within their scope.
[0257] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the embodiments of the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the embodiments of the present application. Therefore, the embodiments of the present application are not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0258] The above description has been provided for the purpose of illustration and description. Furthermore, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A component measurement method, characterized in that: include: In response to a trigger condition being met, measuring the component to obtain a measurement value of the component, wherein the trigger condition is a condition that triggers the measurement of the component; querying a reference value of the component from a reference value file, wherein the reference value file is used to manage the reference value of each component; If the measurement value of the component does not match the reference value, a first operation related to abnormal operation of the component is performed.
2. The method according to claim 1, characterized in that In response to a trigger condition being met, measuring the component to obtain a measurement value of the component includes: During the operation of the component, in response to satisfying the trigger condition, measuring the component to obtain a measurement value of the component; And / or, during the component startup process, in response to the trigger condition being met, the component is measured to obtain a measurement value of the component.
3. The method according to claim 1 or 2, characterized in that The triggering condition includes at least one of the following: receiving a first request initiated by a user through a first interface for measuring the component, wherein the first interface is a standardized interface for server hardware management; detecting a change in the power supply state of the component, wherein the power supply state includes a power-on state or a power-off state; detecting a change in the working state of the component, wherein the working state includes a normal working state or an abnormal working state; detecting that configuration information of the component has changed, wherein the configuration information refers to information for configuring operating parameters of the component; Detecting a change in hardware configuration information that affects the normal operation of the component; detecting a firmware upgrade for the component; detecting that a plugging or unplugging operation is performed on the component; It is detected that a measurement time of the component is met, and the measurement time is determined according to a measurement cycle of the component.
4. The method according to any one of claims 1 to 3, characterized in that The first operation includes at least one of the following: Outputting prompt information of abnormal operation of the component; Stopping the activation of the component or shutting down the component; Log information of the component is generated and stored in a log file.
5. The method according to any one of claims 1 to 4, characterized in that Also includes: receiving a second request, where the second request is a request initiated by a user through the first interface to update the reference value of the component; According to the second request, the reference value of the component in the reference value file is updated, and the updated reference value of the component is used for matching with the measurement value of the component.
6. The method according to claim 5, characterized in that The second request includes a component index and a latest reference value; Updating the reference value of the component according to the second request includes: querying the measurement parameters in the reference value file according to the component index in the second request; The original reference value of the measurement parameter is deleted, and the latest reference value is added as the reference value of the measurement parameter.
7. The method according to any one of claims 1 to 6, characterized in that The components include one or more of the following: Central processing unit (CPU); Redundant Array of Independent Disks (RAID) card; Hard disk; Network card.
8. A controller, characterized in that: including a storage unit and a processing unit; The storage unit is used to store a reference value file, and the reference value file is used to manage the reference value of each component; The processing unit is used to execute the component measurement method according to any one of claims 1 to 7.
9. The controller according to claim 8, characterized in that The controller is a baseboard management controller BMC, and the BMC includes a security protocol and data model SPDM module. The SPDM module is used to execute the component measurement method according to any one of claims 1 to 7.
10. A server, characterized in that: include: A component and a controller, wherein the component is in communication with the controller, and the controller is used to execute the component measurement method according to any one of claims 1 to 7.