Parameter calibration method, device and equipment

By receiving and parsing the configuration file in the target request message, the parameters of the BMC are calibrated in real time, which solves the problem of inflexible parameter calibration in the existing technology and achieves efficient calibration of pluggable devices.

CN119336574AActive Publication Date: 2025-01-21NINGCHANG INFORMATION TECH (HANGZHOU) CO LTD +1

Patent Information

Application Number
CN202411404598.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-01-21
Estimated Expiration
2044-10-09

AI Technical Summary

Technical Problem

In the prior art, the parameter calibration method is not flexible enough to be adjusted in real time according to current accuracy requirements, and cannot be applied to pluggable devices such as Riser.

Method used

By receiving the configuration file in the target request message, the communication attribute information and power calibration information of the device to be calibrated are obtained, the on-site status of the device is determined, and parameter calibration is performed in real time based on this information.

Benefits of technology

It realizes the flexibility and convenience of parameter calibration, can be adjusted in real time according to the actual situation, is suitable for pluggable equipment, and improves the calibration efficiency and scope of application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336574A_ABST
    Figure CN119336574A_ABST
Patent Text Reader

Abstract

The invention relates to a parameter calibration method, device and equipment, which are applied to a baseboard management controller (BMC), and the method comprises the following steps: when a target request message for parameter calibration is received, obtaining a configuration file from the target request message; the configuration file comprises communication attribute information and power calibration information of at least one device to be calibrated; for any to-be-calibrated device, based on the corresponding communication attribute information in the configuration file, communicating with the any to-be-calibrated device, and determining the in-place state of the any to-be-calibrated device; and if the any to-be-calibrated device is in the in-place state, parameter calibration is performed on the any to-be-calibrated device based on the corresponding power calibration information in the configuration file, and the method improves the flexibility of power module parameter calibration and widens the application range of the power module parameter calibration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a parameter calibration method, device and equipment. Background Art

[0002] As the market's requirements for server power performance gradually increase, the requirements for the accuracy of BMC (Baseboard Management Controller) power monitoring are also getting higher and higher. How to adjust the power monitoring accuracy of BMC more conveniently, flexibly and accurately has become one of the keys.

[0003] The power monitoring of each component of the server is usually achieved by monitoring the corresponding component through the power monitoring modules corresponding to each component. The BMC can achieve power calibration by modifying the parameters of the power monitoring modules of the corresponding components.

[0004] In the related art, the BMC calibrates the parameters of the power monitoring module mainly by pre-storing the relevant parameters in the BMC or a storage device connected to the BMC. During the parameter calibration process, the BMC reads the pre-stored relevant parameters and configures the corresponding power module.

[0005] However, this method is not flexible enough and cannot adjust parameters in real time according to current accuracy requirements. Moreover, in scenarios where components can be flexibly replaced, such as Riser (a card-like device inserted into the expansion slot of the server motherboard), this method cannot be applied because different components usually correspond to different parameters. Summary of the invention

[0006] The present invention provides a parameter calibration method, device and equipment, which are used to solve the problem that the parameter calibration method in the related art is not flexible enough and has a small scope of application.

[0007] In a first aspect, the present application provides a parameter calibration method, applied to a BMC, the method comprising:

[0008] When receiving a target request message for parameter calibration, obtaining a configuration file from the target request message; the configuration file includes communication attribute information and power calibration information of at least one device to be calibrated;

[0009] For any device to be calibrated, based on the corresponding communication attribute information in the configuration file, communicate with the device to be calibrated to determine the in-place status of the device to be calibrated;

[0010] If any of the above-mentioned devices to be calibrated is in the in-place state, parameters of the above-mentioned devices to be calibrated are calibrated based on the corresponding power calibration information in the above-mentioned configuration file.

[0011] Compared with the method of fixing power calibration information in the related art, the above method performs parameter calibration through configuration information sent externally in this application, which is more flexible and convenient, can be adjusted in real time according to actual conditions, and can be applied to parameter calibration of pluggable devices (such as expansion boards such as Riser), which is more adaptable to the complex hardware design of the server; at the same time, communication attribute information and power calibration information are set in the configuration file. When the device is determined to be in place based on the communication attribute information, parameter calibration is performed, which can improve the efficiency of parameter calibration and avoid invalid calibration when the device is not in place.

[0012] In a possible implementation manner, whether the target request message is a target request message for parameter calibration is determined in the following manner:

[0013] Parse the target request message to obtain the request type carried in the target request message;

[0014] If the request type carried by the target request message is the first request type identifying parameter calibration, it is determined that the target request message is used for parameter calibration.

[0015] The above method can quickly identify the target request message by carrying the request type in the request message and identifying whether the request is for parameter calibration through the request type, thereby improving the efficiency of parameter calibration.

[0016] In a possible implementation, the above method further includes:

[0017] If the request type carried by the target request message is the second request type for identifying parameter backup, obtaining first identification information of the device to be backed up from the target request message;

[0018] Querying the first configuration file corresponding to the first identification information from each historical configuration file included in the storage device connected to the BMC;

[0019] The first configuration file is sent so that the receiving end performs data backup based on the first configuration file.

[0020] The above method provides a parameter backup mode. By carrying the second request type and the identification information of the device in the target request message, the configuration information of the device to be backed up is queried from the historical configuration information and fed back, so that the customer can export the configuration after adjusting the parameters for batch updating the parameters of other servers.

[0021] In a possible implementation manner, the configuration file further includes: second identification information of the at least one device to be calibrated;

[0022] The above method further includes:

[0023] For any device to be calibrated, query the second configuration file corresponding to the second identification information for any device to be calibrated from each historical configuration file included in the storage device connected to the BMC; the historical configuration file is: carried in each historical request message for parameter calibration received by the BMC;

[0024] If the second configuration file is found, the second configuration file is updated based on the currently acquired configuration file.

[0025] In the above method, since it is possible that the device to be calibrated corresponding to the configuration file has been calibrated before during implementation, and a corresponding historical configuration file already exists in the storage device, when storing the configuration file, the corresponding configuration file is first queried from the storage device based on the identifier, and updated when it is queried, which can avoid data confusion caused by storing multiple configuration files for the same device to be calibrated in the storage device.

[0026] In a possible implementation manner, the BMC includes an entity manager and a kernel; and the step of performing parameter calibration on any of the devices to be calibrated based on the corresponding power calibration information in the configuration file includes:

[0027] Through the entity manager, the driver directory in the kernel of the BMC is traversed to determine the target driver directory corresponding to the communication attribute information of any of the devices to be calibrated; the communication attribute information includes the chip model and address information of the corresponding device to be calibrated;

[0028] Through the entity manager, the target drive directory is traversed, a target file for recording parameter information of the device to be calibrated is determined from the target drive directory, a target calibration value is generated based on the corresponding power calibration information in the configuration file, and the target calibration value is written into the target file;

[0029] When a write operation to the target file is detected by the kernel, the target calibration value is read from the target file and sent to any of the devices to be calibrated, so as to perform parameter calibration on the device to be calibrated.

[0030] The above method traverses the driving target through the entity manager, locates the target file for parameter calibration based on the communication attribute information, and writes the calibration value corresponding to the power calibration information in the target file. The kernel detects the write operation of the target file, reads the target calibration value written by the entity manager, and performs parameter calibration. This method can realize accurate and fast calibration of the device and improve the calibration efficiency.

[0031] In a possible implementation manner, the power calibration information includes: the current resolution of the current register in any of the devices to be calibrated and the resistance value of the precision resistor; the target calibration value is: the value of the power calibration register in any of the devices to be calibrated.

[0032] The above method provides the specific content of the power calibration information and the target calibration value, making the solution more specific.

[0033] In a possible implementation manner, receiving a target request message for performing parameter calibration includes:

[0034] Receive the above target message request through the Redfish interface; or,

[0035] The target message request is received through an intelligent platform management interface IPMI interface.

[0036] The above method and the present application can receive target request messages through different interfaces, thereby improving the flexibility of parameter calibration.

[0037] In a second aspect, an embodiment of the present application provides a parameter calibration device, which is applied to a BMC, and the device includes:

[0038] An acquisition module, configured to acquire a configuration file from a target request message for parameter calibration when receiving the target request message; the configuration file includes communication attribute information and power calibration information of at least one device to be calibrated;

[0039] A status determination module, for communicating with any device to be calibrated based on the corresponding communication attribute information in the configuration file to determine the in-place status of any device to be calibrated;

[0040] The calibration module is used to perform parameter calibration on any of the above-mentioned devices to be calibrated based on the corresponding power calibration information in the above-mentioned configuration file if the above-mentioned devices to be calibrated are in the in-place state.

[0041] In a possible implementation manner, the acquisition module determines whether the target request message is a target request message for parameter calibration in the following manner:

[0042] Parse the target request message to obtain the request type carried in the target request message;

[0043] If the request type carried by the target request message is the first request type identifying parameter calibration, it is determined that the target request message is used for parameter calibration.

[0044] In a possible implementation manner, the above device further includes a backup module, which is used to:

[0045] If the request type carried by the target request message is the second request type for identifying parameter backup, obtaining first identification information of the device to be backed up from the target request message;

[0046] Querying the first configuration file corresponding to the first identification information from each historical configuration file included in the storage device connected to the BMC;

[0047] The first configuration file is sent so that the receiving end performs data backup based on the first configuration file.

[0048] In a possible implementation manner, the configuration file further includes: second identification information of the at least one device to be calibrated;

[0049] The above device also includes a file update module, which is specifically used to:

[0050] For any device to be calibrated, query the second configuration file corresponding to the second identification information for any device to be calibrated from each historical configuration file included in the storage device connected to the BMC; the historical configuration file is: carried in each historical request message for parameter calibration received by the BMC;

[0051] If the second configuration file is found, the second configuration file is updated based on the currently acquired configuration file.

[0052] In a possible implementation manner, the BMC includes an entity manager and a kernel; the calibration module is specifically used for:

[0053] Through the entity manager, traverse the driver directory in the kernel of the BMC to determine the target driver directory corresponding to the communication attribute information of any of the devices to be calibrated; the communication attribute information includes the chip model and address information of the corresponding device to be calibrated;

[0054] Through the entity manager, the target drive directory is traversed, a target file for recording parameter information of the device to be calibrated is determined from the target drive directory, a target calibration value is generated based on the corresponding power calibration information in the configuration file, and the target calibration value is written into the target file;

[0055] When a write operation to the target file is detected by the kernel, the target calibration value is read from the target file, and the target calibration value is sent to any of the devices to be calibrated, so as to perform parameter calibration on the device to be calibrated.

[0056] In a possible implementation manner, the power calibration information includes: the current resolution of the current register in any device to be calibrated and the resistance value of the precision resistor; the target calibration value is: the value of the power calibration register in any device to be calibrated.

[0057] In a possible implementation manner, the acquisition module is specifically used to:

[0058] Receive the above target message request through the Redfish interface; or,

[0059] The target message request is received through the IPMI interface.

[0060] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the parameter calibration method when executing the computer program.

[0061] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps in the above-mentioned parameter calibration method of the present application are implemented.

[0062] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which is stored in a computer-readable storage medium; when the processor of a memory access device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the memory access device performs the steps in the above-mentioned parameter calibration method of the present application.

[0063] For each of the above-mentioned second to fifth aspects and the technical effects that may be achieved by each of the above-mentioned aspects, please refer to the above-mentioned description of the technical effects that can be achieved by the first aspect or various possible schemes in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0065] Figure 1 A schematic diagram of the structure of a parameter calibration system provided in an embodiment of the present application;

[0066] Figure 2 A flow chart of a parameter calibration method provided in an embodiment of the present application;

[0067] Figure 3A schematic diagram of a target request message provided in an embodiment of the present application;

[0068] Figure 4 A schematic diagram of an entity-manager execution logic provided in an embodiment of the present application;

[0069] Figure 5 A schematic diagram of a parameter calibration example provided in an embodiment of the present application;

[0070] Figure 6 A schematic diagram of a parameter calibration device provided in an embodiment of the present application;

[0071] Figure 7 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical solution and advantages of the present application more clear, the present application will be further described in detail below in conjunction with the accompanying drawings. The specific operation method in the method embodiment can also be applied to the device embodiment or the system embodiment.

[0073] In the description of this application, "multiple" is understood to be "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. A is connected to B, which can represent two situations: A is directly connected to B and A is connected to B through C. In addition, in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.

[0074] In order to facilitate those skilled in the art to better understand the technical solutions provided by the embodiments of the present application, the following is a brief description of the professional terms involved:

[0075] (1) BMC (Baseboard Management Controller): An independent management microcontroller dedicated to servers. It provides a set of standard interfaces and management tools for system monitoring, management, and maintenance. BMC monitors the hardware status of devices and performs remote management operations through the hardware manager integrated in servers, network devices, and other computer systems.

[0076] (2) Redfish: An API (Application Programming Interface) used within the BMC to build software applications. It is provided to external third parties and uses JSON (JavaScript Object Notation) as the data exchange format to facilitate querying and filtering resources.

[0077] (3) IPMI (Intelligent Platform Management Interface): A communication method supported by BMC that allows system administrators to remotely manage and monitor computer systems without the support of the operating system. As a lightweight network protocol, IPMI can be used to manage and monitor servers, embedded systems, storage devices, and network devices.

[0078] (4) EMMC (Embedded Multi Media Card): A non-volatile storage device commonly used on servers, with the characteristics of high integration, small size, and stable performance. It is usually used in various mobile devices and embedded systems to provide data storage functions for the devices.

[0079] (5) CPLD (Complex Programmable Logic Device): A programmable logic device in a server.

[0080] As the market's requirements for server power performance gradually increase, the accuracy requirements for BMC (Baseboard Management Controller) power monitoring are also getting higher and higher. How to adjust the BMC's power monitoring accuracy more conveniently, flexibly and accurately has become one of the keys. The server's power monitoring of each component is usually achieved by monitoring the corresponding component through the power monitoring module corresponding to each component. The BMC can achieve power calibration by modifying the parameters of the power monitoring module of the corresponding component, thereby obtaining a more accurate power value to present to the user.

[0081] In the related art, the BMC calibrates the parameters of the power monitoring module mainly by pre-storing the relevant parameters in the BMC program or in a third-party device (such as CPLD). During the parameter calibration process, the BMC reads the pre-stored relevant parameters and configures the corresponding power module.

[0082] However, this method is not flexible enough and cannot adjust parameters in real time according to the current accuracy requirements to achieve higher accuracy. In addition, in scenarios where components can be flexibly replaced, such as risers (card-shaped devices inserted into the expansion slots of the server motherboard), this method is not applicable because different components usually correspond to different parameters, and the parameters of various models of risers cannot be saved in CPLD.

[0083] In this regard, in order to conveniently, flexibly and accurately adjust the power monitoring accuracy of BMC in real time, the present application provides a parameter calibration method for power modules, based on the entity-manager (entity manager) in OpenBMC (open source BMC architecture) to achieve flexible adjustment of parameters, and by modifying the processing logic of entity-manager (i.e., file loading mechanism), it supports parsing of configuration files. In a specific implementation, after BMC receives the configuration file sent by the outside (user) through the interface, it parses the configuration file through entity-manager, obtains the communication attribute information and power calibration information of the device to be calibrated, and determines that the device to be calibrated is in place based on the communication attribute information, and calibrates its parameters based on the power calibration information to achieve free adjustment of parameters.

[0084] Figure 1 A schematic diagram of the structure of a parameter calibration system provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the parameter calibration method in the present application is applied to the following system, the structure of which is part of a server, which mainly includes a BMC, a storage device, and various devices to be calibrated;

[0085] Among them, the BMC includes three parts: a preprocessing module, an entity manager, and a kernel. The preprocessing module is used to process the target request message sent by the sender or to perform parameter backup (i.e., the second request type), and perform corresponding subsequent operations based on different purposes; the entity manager entity manager is used to parse various types of information in the configuration file, and configure the specified file in the kernel based on the corresponding information (i.e., power calibration information); the kernel is used to obtain relevant data from the specified file when a configuration modification is detected, and transmit the configuration information to the kernel through the corresponding I 2 C (Inter-Integrated Circuit, a serial communication bus of hardware) link is used to calibrate the parameters of the device to be calibrated.

[0086] Optionally, the sending end may be a user terminal, and the user triggers a corresponding target request message through a client on the terminal.

[0087] The storage device is used to store the configuration files carried in each received historical request message, so as to facilitate subsequent query and acquisition of relevant configuration files therefrom; the storage format thereof can be set based on demand, and the embodiment of the present application does not impose any limitation thereto.

[0088] Optionally, the above storage device may be an EMMC.

[0089] In some embodiments, the target message request received by the above-mentioned preprocessing module is: received by the BMC through the interface and forwarded to the preprocessing module, and the forwarding can be achieved through DBUS (an inter-process communication system of OpenBMC); the message transmission between the above-mentioned preprocessing module and the entity-manager can also be achieved through DBUS, and the above-mentioned configuration file can be in json format.

[0090] It should be noted that the above parameter calibration system is only a possible example, and other structures may also be used in specific implementations, as long as they can implement the parameter calibration method of the present application.

[0091] The present application is further described in detail below in conjunction with the accompanying drawings and the above structure. Figure 2 FIG. 1 is a flow chart of a parameter calibration method provided in an embodiment of the present application. The method is applied to BMC, and the specific implementation process is as follows:

[0092] Step S201, when receiving a target request message for parameter calibration, obtaining a configuration file from the target request message; the configuration file includes communication attribute information and power calibration information of at least one device to be calibrated;

[0093] Optionally, the embodiment of the present application supports receiving the target request message in the following manner:

[0094] Receive the target message request through a Redfish interface; or,

[0095] The target message request is received through the IPMI interface.

[0096] In a specific implementation, the BMC is configured with an interface provided to an external third party, such as a Redfish interface or an IPMI interface, etc. The externally triggered target message request can be transmitted to the BMC through the interface and transmitted to the preprocessing module via the internal DBUS.

[0097] It should be noted that the above-mentioned Redfish interface has both information receiving and sending functions, that is, when it is determined based on the target request message that feedback information needs to be sent to the outside, it can be achieved through the Redfish interface, but the IPMI interface only has the function of receiving information, that is, it is impossible to send feedback information to the outside through the IPMI interface.

[0098] Optionally, when the BMC receives a target request message through the IPMI interface, the format of the target request message (the format of the IPMI command) can be: Figure 3 The format shown includes at least three bytes, one byte of NetFn (network function code) / LUN (logical unit number), one byte of Cmd (used to perform operations under the specified network function, that is, specific commands), and at least one byte of Data. Specifically, Byte1 carries an IPMI command identifier to indicate that the message belongs to the above-mentioned target request message (that is, a request message for executing the above-mentioned parameter calibration method), and its value can be set based on demand, such as setting it to 0x30; Byte2 carries a specific command value to indicate the mode corresponding to the message (that is, the request message type is the first message type or the second message type), and its value can be set based on demand, such as using 0x2e to identify the calibration mode; Byte3:N carries specific data, such as carrying a configuration file in calibration mode, carrying a device identifier in backup mode, etc.

[0099] In specific implementation, the embodiment of the present application provides two modes to the user, namely, calibration mode and backup mode. The calibration mode is used to instruct the BMC to perform parameter calibration based on the received configuration file, and the backup mode is used to instruct the BMC to obtain a pre-stored configuration file from a storage device and feed it back to the user.

[0100] Optionally, based on the above two modes, the target request message in the embodiment of the present application carries a request type, and the request type includes a first request type and a second request type, which correspond to the above two modes respectively. Specifically, the first request type corresponds to the calibration mode, and the second request type corresponds to the backup mode. When triggering the target message request, the sender (i.e., the user) triggers target request messages of different request types through different modes.

[0101] Optionally, after receiving the target request message in the above step S201, it is determined whether the target request message is used for parameter calibration in the following manner:

[0102] Parse the target request message to obtain the request type carried in the target request message;

[0103] If the request type carried by the target request message is the first request type identifying parameter calibration, it is determined that the target request message is used for parameter calibration.

[0104] In a specific implementation, when the target message type is the first request type, the target message type will carry a configuration file. At this time, the configuration file can be obtained from the target request message. If the configuration file is not obtained, a prompt message can be sent to the message sender to inform the sender that parameter calibration cannot be performed because the configuration file is not carried.

[0105] Optionally, if the request type carried by the target request message is a second request type for identifying parameter backup, first identification information of the device to be backed up is obtained from the target request message;

[0106] Querying, from each historical configuration file included in the storage device connected to the BMC, a first configuration file corresponding to the first identification information;

[0107] The first configuration file is sent so that the receiving end performs data backup based on the first configuration file.

[0108] In a specific implementation, the above-mentioned receiving end refers to the sending end of the target request message. If the target request message is used for parameter backup, it will carry the identification information of the device to be backed up. At this time, the corresponding configuration file can be queried from the storage device based on the identification information and fed back to the message sending end.

[0109] In implementation, since the IPMI interface does not have the function of sending information, it is necessary to send the first configuration file through other interfaces, such as the Redfish interface.

[0110] It should be noted that the embodiment of the present application does not limit the number of devices corresponding to the information carried in the above-mentioned target request message, that is, batch calibration of devices can be achieved by carrying a configuration file containing multiple parameters to be calibrated, and batch backup of information can be achieved by carrying identification information of multiple devices to be backed up. If batch backup is performed, when the configuration files corresponding to each identification information are queried, the corresponding configuration files can be arranged in sequence according to the arrangement order of the identification information in the target request message, so as to facilitate parsing by the receiving end.

[0111] Optionally, for any identification information of the device to be backed up, if the corresponding configuration file is not queried from the storage device, it means that the device to be backed up has not been calibrated before. At this time, an indication message can be sent to the entity-manager to enable it to obtain the current power calibration parameters of the device to be backed up from the kernel and send them to the receiving end.

[0112] It should be noted that the identification information is not limited in the embodiments of the present application. It only needs to be able to achieve the identification function. For example, it can be set to the name corresponding to the device.

[0113] Step S202: for any device to be calibrated, based on the corresponding communication attribute information in the configuration file, communicate with any device to be calibrated to determine the in-place status of any device to be calibrated;

[0114] Optionally, the communication attribute information includes the chip model Type (such as TPA626 is a commonly used power consumption chip model) and address information of the corresponding device to be calibrated; the address information may include Bus and Address, where Bus identifies the I 2 C link; Address identifies the I 2 Communication address in C link.

[0115] Optionally, the present application may instantiate the device to be calibrated based on the communication attribute information. During this process, the kernel will communicate with any device to be calibrated to determine its in-place status. If the instantiation is successful, it means that the device to be calibrated is in-place; otherwise, it means that the device to be calibrated is not in-place.

[0116] In specific implementation, Figure 4 As shown, entity-manager parses the communication attribute information from the configuration file, and writes the chip model Type and communication information Address of the device to be calibrated into the new_device file of the kernel to initialize the device. If the initialization is successful, it means that the component (i.e., the device to be calibrated) is recognized to be in place, and the next configuration can be performed. If the initialization fails, it means that the component (i.e., the device to be calibrated) is not in place, and the subsequent steps will not be executed.

[0117] Specifically, the new_device file needs to be determined based on the I2C link Bus in the configuration file, that is, the corresponding new_device file can be found under the / sys / bus / i2c target, and the chip model Type and communication information Address are written into it through the echo operation. After successful initialization, the target corresponding to the device to be calibrated will be generated under the BMC drive directory ( / sys / bus / i2c / drive), as well as the corresponding files under the directory.

[0118] In implementation, after determining the in-place status of any device to be calibrated, the embodiment of the present application also needs to store the configuration file carried in the target request message into a storage device.

[0119] Optionally, the configuration file further includes: second identification information of at least one device to be calibrated;

[0120] When storing the configuration file in the storage device, firstly, a second configuration file corresponding to the second identification information for any device to be calibrated is queried from various historical configuration files included in the storage device connected to the BMC; the historical configuration file is: carried in various historical request messages received by the BMC for parameter calibration; if the second configuration file is queried, the second configuration file is updated based on the currently obtained configuration file.

[0121] In implementation, if the second configuration file is not found, the currently acquired configuration file is directly stored in the storage device. For ease of management, each historical configuration file in the storage device may be sorted according to its corresponding storage time.

[0122] Since in implementation, the device to be calibrated corresponding to the configuration file may have been calibrated before, and the corresponding historical configuration file already exists in the storage device, when storing the configuration file, the corresponding configuration file is first queried from the storage device based on the identifier, and updated when it is queried, which can avoid data confusion caused by storing multiple configuration files for the same device to be calibrated in the storage device.

[0123] Step S203: if any device to be calibrated is in the on-site state, then parameter calibration is performed on any device to be calibrated based on the corresponding power calibration information in the configuration file;

[0124] Optionally, the calibration process may be:

[0125] Through entity-manager, traverse the driver directory in the kernel of the BMC to determine the target driver directory corresponding to the communication attribute information of any device to be calibrated; traverse the target driver directory, determine the target file for recording the parameter information of the device to be calibrated from the target driver directory, and generate the target calibration value based on the corresponding power calibration information in the configuration file, and write the target calibration value into the target file;

[0126] When a write operation to a target file is detected through the kernel, a target calibration value is read from the target file, and the target calibration value is sent to any device to be calibrated, so as to perform parameter calibration on any device to be calibrated.

[0127] Specifically, Figure 4As shown, when it is determined that the device to be calibrated is in the in-place state, firstly, the kernel driver file ( / sys / bus / i2c / drive) is traversed to find the first driver directory ( / sys / bus / i2c / drive / Type) corresponding to the chip model Type in the configuration file, and the first driver directory is traversed to find the second driver directory ( / sys / bus / i2c / drive / Type / Bus-Address) corresponding to the address letter in the configuration file, and finally the second driver directory is traversed to determine the target file (calibration file) for recording the calibration-related parameter information of the device to be calibrated from the hwmon directory (i.e., the target driver directory) under the second driver directory.

[0128] Optionally, the power calibration information includes: the current resolution Current_LSB of the current register in the device to be calibrated and the resistance R of the precision resistor; the target calibration value is: the value CAL of the power calibration register in any device to be calibrated.

[0129] Specifically, entity-manager generates the target calibration value CAL according to the following formula and writes the CAL value into the calibration file (i.e., the target file):

[0130]

[0131] When the kernel detects the write operation of the calibration file in the hwmon directory, it reads the CAL value from the calibration file and, based on the address information of the corresponding device to be calibrated, writes it to the I 2 The C link writes the CAL value into the power chip of the device to be calibrated to complete the power calibration.

[0132] The above method, in which the present application performs parameter calibration through configuration information sent externally, is more flexible and convenient, can be adjusted in real time according to actual conditions, and can be applied to parameter calibration of pluggable devices (such as expansion boards such as Riser), and is more adaptable to complex hardware design of servers.

[0133] The following combination Figure 5 , the above parameter calibration process is described in detail with a specific example, and the process specifically includes the following steps:

[0134] Step S501, the pre-processing module receives a target request message sent by a user;

[0135] Among them, the target request message carries the message type;

[0136] Step S502: When the preprocessing module determines that the message type is the first request type, it obtains the configuration file from the target request message and sends it to the entity-manager; and executes step S503.

[0137] Among them, the configuration file includes the device identification of the device to be calibrated, the second communication attribute information and the power calibration information; the communication attribute information includes the chip model and address information; the power calibration information includes the current resolution of the current register and the resistance value of the precision resistor.

[0138] Step S503, the entity-manager parses the communication attribute information from the configuration file, and writes the chip model Type and communication information Address of the device to be calibrated into the new_device file of the kernel to initialize the device;

[0139] Step S504, the entity-manager determines whether the initialization is successful; if successful, execute step S505, otherwise execute step S511;

[0140] If the initialization is successful, it means that the device to be calibrated is in place and you can proceed to the next configuration. If the initialization fails, it means that the device to be calibrated is not in place and you can end this parameter calibration.

[0141] Step S505, the entity-manager parses the power calibration information from the configuration file, generates a target calibration value based on the power calibration information, and writes the target calibration value into the target file; and executes step S506;

[0142] The specific process of this process is referred to in the above step S203 and will not be repeated here.

[0143] Step S506 , when the kernel detects a write operation to the target file, the kernel reads the target calibration value from the target file and sends the target calibration value to the device to be calibrated.

[0144] Step S507: When the preprocessing module determines that the message type is the second request type, the preprocessing module obtains the first identification information of the device to be backed up from the target request message, and sends a query request to the EMMC;

[0145] Step S508, the EMMC searches for a first configuration file corresponding to the first identification information from each stored historical configuration file based on the first identification information carried in the query request;

[0146] Step S509, the EMMC determines whether the first configuration file is found; if yes, step S510 is executed; if no, step S511 is executed;

[0147] Step S510: EMMC sends the first configuration file to the preprocessing module, and the preprocessing module feeds back the first configuration file to the user.

[0148] Step S511, sending a failure prompt to the user;

[0149] The failure prompt may include the reason for the failure, such as the device to be calibrated is not online, or the configuration file for the device to be backed up is not found.

[0150] Based on the same inventive concept, the present application also provides a parameter calibration device, see Figure 6 , the device comprises:

[0151] The acquisition module 601 is used to acquire a configuration file from the target request message when receiving the target request message for parameter calibration; the configuration file includes communication attribute information and power calibration information of at least one device to be calibrated;

[0152] A state determination module 602 is used to communicate with any device to be calibrated based on the corresponding communication attribute information in the configuration file to determine the in-place state of any device to be calibrated;

[0153] The calibration module 603 is configured to perform parameter calibration on any device to be calibrated based on the corresponding power calibration information in the configuration file if any device to be calibrated is in an on-site state.

[0154] In a possible implementation manner, the acquisition module 601 determines whether the target request message is a target request message for parameter calibration in the following manner:

[0155] Parse the target request message to obtain the request type carried in the target request message;

[0156] If the request type carried by the target request message is the first request type identifying parameter calibration, it is determined that the target request message is used for parameter calibration.

[0157] In a possible implementation manner, the above device further includes a backup module, which is used to:

[0158] If the request type carried by the target request message is the second request type for identifying parameter backup, obtaining first identification information of the device to be backed up from the target request message;

[0159] Querying the first configuration file corresponding to the first identification information from each historical configuration file included in the storage device connected to the BMC;

[0160] The first configuration file is sent so that the receiving end performs data backup based on the first configuration file.

[0161] In a possible implementation manner, the configuration file further includes: second identification information of the at least one device to be calibrated;

[0162] The above device also includes a file update module, which is specifically used to:

[0163] For any device to be calibrated, query the second configuration file corresponding to the second identification information for any device to be calibrated from each historical configuration file included in the storage device connected to the BMC; the historical configuration file is: carried in each historical request message for parameter calibration received by the BMC;

[0164] If the second configuration file is found, the second configuration file is updated based on the currently acquired configuration file.

[0165] In a possible implementation manner, the BMC includes an entity manager and a kernel; the calibration module 603 is specifically used for:

[0166] Through the entity manager, traverse the driver directory in the kernel of the BMC to determine the target driver directory corresponding to the communication attribute information of any of the devices to be calibrated; the communication attribute information includes the chip model and address information of the corresponding device to be calibrated;

[0167] Through the entity manager, the target drive directory is traversed, a target file for recording parameter information of the device to be calibrated is determined from the target drive directory, a target calibration value is generated based on the corresponding power calibration information in the configuration file, and the target calibration value is written into the target file;

[0168] When a write operation to the target file is detected by the kernel, the target calibration value is read from the target file, and the target calibration value is sent to any of the devices to be calibrated, so as to perform parameter calibration on the device to be calibrated.

[0169] In a possible implementation manner, the power calibration information includes: the current resolution of the current register in any device to be calibrated and the resistance value of the precision resistor; the target calibration value is: the value of the power calibration register in any device to be calibrated.

[0170] In a possible implementation manner, the acquisition module 601 is specifically configured to:

[0171] Receive the above target message request through the Redfish interface; or,

[0172] The target message request is received through an intelligent platform management interface IPMI interface.

[0173] Based on the same inventive concept, an electronic device is also provided in the embodiment of the present application, and the electronic device can realize the function of the aforementioned parameter calibration device, referring to Figure 7 , the electronic device comprises:

[0174] At least one processor 701, and a memory 702 connected to the at least one processor 701. The specific connection medium between the processor 701 and the memory 702 is not limited in the embodiment of the present application. Figure 7 In the example, the processor 701 and the memory 702 are connected via a bus 700. Figure 7 The connections between other components are shown in bold lines, and are not intended to be limiting. The bus 700 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 7 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 701 can also be called a controller, and there is no limitation on the name.

[0175] In the embodiment of the present application, the memory 702 stores instructions that can be executed by at least one processor 701. The at least one processor 701 can execute the parameter calibration method discussed above by executing the instructions stored in the memory 702. The processor 701 can implement Figure 6 The functions of each module in the device shown.

[0176] Among them, the processor 701 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 702 and calling data stored in the memory 702, the various functions of the device and process data, the device can be monitored as a whole.

[0177] In one possible design, the processor 701 may include one or more processing units, and the processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 701. In some embodiments, the processor 701 and the memory 702 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.

[0178] Processor 701 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and 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 parameter calibration method disclosed in the embodiments of the present application can be directly embodied as a hardware processor to execute, or the hardware and software modules in the processor are combined to execute.

[0179] The memory 702 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 702 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 702 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 702 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0180] By designing and programming the processor 701, the code corresponding to the application anomaly detection method described in the above embodiment can be fixed into the chip, so that the chip can execute the code when running. Figure 2 The steps of the parameter calibration method of the embodiment shown are as follows: How to design and program the processor 701 is a technique well known to those skilled in the art and will not be described in detail here.

[0181] An embodiment of the present application also provides a computer-readable storage medium that stores computer-executable instructions required to execute the above-mentioned processor, which includes a program required to execute the above-mentioned processor.

[0182] In some possible implementations, various aspects of the parameter calibration method provided in the present application may also be implemented in the form of a program product, which includes a program code. When the above-mentioned program product is run on an electronic device, the above-mentioned program code is used to enable the above-mentioned electronic device to execute the steps of the parameter calibration method according to various exemplary implementations of the present application described above in this specification.

[0183] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0184] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (apparatus), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0185] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0186] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0187] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0188] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A parameter calibration method, characterized in that: Applied to a baseboard management controller BMC, the method comprises: When receiving a target request message for parameter calibration, obtaining a configuration file from the target request message; the configuration file includes communication attribute information and power calibration information of at least one device to be calibrated; For any device to be calibrated, based on the corresponding communication attribute information in the configuration file, communicate with the device to be calibrated to determine the in-place status of the device to be calibrated; If any of the devices to be calibrated is in the on-site state, parameters of the any of the devices to be calibrated are calibrated based on the corresponding power calibration information in the configuration file.

2. The method according to claim 1, characterized in that Whether the target request message is a target request message for parameter calibration is determined by: Parsing the target request message to obtain the request type carried in the target request message; If the request type carried by the target request message is a first request type identifying parameter calibration, it is determined that the target request message is used for parameter calibration.

3. The method according to claim 2, characterized in that The method further comprises: If the request type carried by the target request message is the second request type for identifying parameter backup, obtaining first identification information of the device to be backed up from the target request message; Querying, from each historical configuration file included in the storage device connected to the BMC, a first configuration file corresponding to the first identification information; The first configuration file is sent so that the receiving end performs data backup based on the first configuration file.

4. The method according to claim 1, characterized in that: The configuration file further includes: second identification information of the at least one device to be calibrated; The method further comprises: For any device to be calibrated, querying a second configuration file corresponding to the second identification information for any device to be calibrated from each historical configuration file included in a storage device connected to the BMC; the historical configuration file is: carried in each historical request message for parameter calibration received by the BMC; If the second configuration file is found, the second configuration file is updated based on the currently acquired configuration file.

5. The method according to any one of claims 1 to 4, characterized in that: The BMC includes an entity manager and a kernel; and the performing parameter calibration on any device to be calibrated based on the corresponding power calibration information in the configuration file includes: Through the entity manager, traverse the driver directory in the kernel of the BMC to determine the target driver directory corresponding to the communication attribute information of any device to be calibrated; the communication attribute information includes the chip model and address information of the corresponding device to be calibrated; By means of the entity manager, the target drive directory is traversed, a target file for recording parameter information of the device to be calibrated is determined from the target drive directory, a target calibration value is generated based on the corresponding power calibration information in the configuration file, and the target calibration value is written into the target file; When a write operation to the target file is detected by the kernel, the target calibration value is read from the target file, and the target calibration value is sent to any device to be calibrated, so as to perform parameter calibration on any device to be calibrated.

6. The method according to claim 5, characterized in that The power calibration information includes: the current resolution of the current register in any device to be calibrated and the resistance value of the precision resistor; the target calibration value is: the value of the power calibration register in any device to be calibrated.

7. The method according to any one of claims 1 to 4, characterized in that: Receiving a target request message for performing parameter calibration, including: Receive the target message request through a Redfish interface; or, The target message request is received through an intelligent platform management interface IPMI interface.

8. A parameter calibration device, characterized in that: Applied to BMC, the device comprises: An acquisition module, configured to acquire a configuration file from a target request message when receiving a target request message for parameter calibration; the configuration file includes communication attribute information and power calibration information of at least one device to be calibrated; A status determination module, for communicating with any device to be calibrated based on the corresponding communication attribute information in the configuration file to determine the in-place status of any device to be calibrated; The calibration module is used to perform parameter calibration on any device to be calibrated based on the corresponding power calibration information in the configuration file if any device to be calibrated is in an on-site state.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to implement the method according to any one of claims 1 to 7 when executing a computer program stored in the memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Power calibration method and system for routing device and routing device

    CN107846332A

  • Power consumption control method and device, electronic equipment and a readable storage medium

    CN113625862A

  • Configuration management method, device and equipment and machine readable storage medium

    CN115437677A

  • Asset information management method and device, electronic equipment and storage medium

    CN115757275A

  • Firmware control method and device and electronic equipment

    CN116009941A

Cited By

  • Board card for server, power supply system and monitoring current calibration method

    CN121499870A

  • Board card, power supply system and monitoring current calibration method for server

    CN121499870B