Parameter calibration method, device and equipment
By receiving external configuration files and parsing communication attribute information through the entity manager, the problem of inflexible parameter calibration of the BMC power monitoring module is solved, enabling flexible and accurate parameter calibration of pluggable devices and adapting to complex hardware designs.
Patent Information
- Application Number
- CN202411404598.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2044-10-09
AI Technical Summary
In existing technologies, the parameter calibration of the power monitoring module of BMC is not flexible enough, cannot be adjusted in real time according to the current accuracy requirements, and cannot adapt to scenarios where components can be flexibly replaced, such as devices like the Riser.
By receiving external configuration files and using the entity manager to parse communication attributes and power calibration information, parameter calibration is performed after determining the device's in-situ status, supporting flexible calibration of pluggable devices.
It enables convenient, flexible, and accurate real-time adjustment of BMC power monitoring, is suitable for complex hardware designs, and improves parameter calibration efficiency and applicability.
Smart Images

Figure CN119336574B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a parameter calibration method, device and equipment. BACKGROUND
[0002] With the gradual increase of market demand for power performance of servers, the accuracy requirement of power monitoring of BMC (Baseboard Management Controller) is also higher and higher, and how to more conveniently, flexibly and accurately adjust the power monitoring accuracy of BMC becomes one of the keys.
[0003] The power monitoring of servers for each component is usually realized by monitoring the corresponding components through the power monitoring modules corresponding to each component, and the BMC can realize power calibration by modifying the parameters of the power monitoring modules of the corresponding components.
[0004] In the related art, the implementation of the BMC to calibrate the parameters of the power monitoring module is mainly as follows: the related parameters are pre-stored in the BMC or a storage device connected to the BMC, and in the parameter calibration process, the BMC reads the pre-stored related parameters and configures the corresponding power module.
[0005] However, this method is not flexible enough, and cannot adjust the parameters in real time according to the current accuracy requirement; and for the scene where the components can be flexibly replaced, such as Riser (a card-shaped device inserted into the expansion slot of the server mainboard) and the like, since different components usually correspond to different parameters, this method cannot be applied. SUMMARY
[0006] The present application provides a parameter calibration method, device and equipment, which is used to solve the problem that the parameter calibration method in the related art is not flexible enough and has a small applicable range.
[0007] In a first aspect, the present application provides a parameter calibration method applied to a BMC, which comprises:
[0008] Upon receiving a target request message for parameter calibration, a configuration file is obtained from the target request message; the configuration file comprises communication attribute information and power calibration information of at least one to-be-calibrated device;
[0009] For any to-be-calibrated device, based on the corresponding communication attribute information in the configuration file, communication is performed with the any to-be-calibrated device to determine the in-place state of the any to-be-calibrated device;
[0010] If the any to-be-calibrated device is in the in-place state, the any to-be-calibrated device is calibrated based on the corresponding power calibration information in the configuration file.
[0011] Compared with the way of fixing power calibration information in the related art, the application calibrates parameters through the 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 riser and the like), is more suitable for complex hardware design of a server; meanwhile, the communication attribute information and the power calibration information are set in the configuration file, the parameter calibration is performed when it is determined that the device is in place based on the communication attribute information, and the efficiency of parameter calibration can be improved, and invalid calibration when the device is not in place can be avoided.
[0012] In a possible implementation, whether the target request message is a target request message for parameter calibration is determined in the following manner:
[0013] The target request message is parsed to obtain a request type carried in the target request message.
[0014] If the request type carried in the target request message is a first request type for identifying parameter calibration, it is determined that the target request message is for parameter calibration.
[0015] The 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, and the parameter calibration efficiency is improved.
[0016] In a possible implementation, the method further includes:
[0017] If the request type carried in the target request message is a second request type for identifying parameter backup, first identification information of a device to be backed up is obtained from the target request message.
[0018] A first configuration file corresponding to the first identification information is queried from each historical configuration file included in a storage device connected to the BMC.
[0019] The first configuration file is sent, so that a receiving end performs data backup based on the first configuration file.
[0020] The method provides a parameter backup mode, queries configuration information of the device to be backed up from historical configuration information and feeds back by carrying the second request type and the identification information of the device in the target request message, and facilitates the customer to export the configuration after adjusting the parameters, for updating parameters of other servers in batches.
[0021] In a possible implementation, the configuration file further includes second identification information of the at least one device to be calibrated.
[0022] The method further includes:
[0023] For any to-be-calibrated device, a second configuration file corresponding to the second identification information of the any to-be-calibrated device is queried from each historical configuration file included in the storage device connected with 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 queried, the second configuration file is updated based on the currently obtained configuration file.
[0025] In the method, the to-be-calibrated device corresponding to the configuration file may have been calibrated before, and the historical configuration file corresponding to the to-be-calibrated device is already stored in the storage device. Therefore, when the configuration file is stored, the corresponding configuration file is queried from the storage device based on the identification, and the configuration file is updated when the configuration file is queried, so that data confusion caused by storing multiple configuration files of the same to-be-calibrated device in the storage device is avoided.
[0026] In a possible implementation, the BMC includes an entity manager and a kernel; and the parameter calibration of the any to-be-calibrated device based on the corresponding power calibration information in the configuration file includes:
[0027] The entity manager is used to traverse a driver directory in the kernel of the BMC, to determine a target driver directory corresponding to the communication attribute information of the any to-be-calibrated device; and the communication attribute information includes a chip model and address information of the corresponding to-be-calibrated device.
[0028] The entity manager is used to traverse the target driver directory, to determine a target file for recording parameter information of the to-be-calibrated device from the target driver directory, and to generate a target calibration value based on the corresponding power calibration information in the configuration file, and to write the target calibration value into the target file.
[0029] The kernel is used to read the target calibration value from the target file when detecting a write operation on the target file, and to send the target calibration value to the any to-be-calibrated device, to calibrate the parameter of the any to-be-calibrated device.
[0030] In the method, the entity manager is used to traverse the driver directory, to locate the target file for parameter calibration based on the communication attribute information, and to write the calibration value corresponding to the power calibration information into the target file. The kernel is used to detect the write operation on the target file, to read the target calibration value written by the entity manager from the target file, and to calibrate the parameter. This method can accurately and quickly calibrate the device, and improves the calibration efficiency.
[0031] In a possible implementation, the power calibration information includes: a current resolution of a current register in any of the to-be-calibrated devices and a resistance value of the precision resistor; and the target calibration value is a value of a power calibration register in any of the to-be-calibrated devices.
[0032] The method provides specific contents of the power calibration information and the target calibration value, and makes the scheme more specific.
[0033] In a possible implementation, the target request message for performing parameter calibration is received, and the target request message includes:
[0034] The target message request is received through a Redfish interface; or
[0035] The target message request is received through an intelligent platform management interface (IPMI) interface.
[0036] The method can receive the target request message through different interfaces, and improves flexibility of parameter calibration.
[0037] In a second aspect, an embodiment of the present application provides a parameter calibration apparatus applied to a BMC, and the apparatus includes:
[0038] A obtaining module is configured to: when a target request message for performing parameter calibration is received, obtain a configuration file from the target request message; and the configuration file includes communication attribute information and power calibration information of at least one to-be-calibrated device.
[0039] A state determining module is configured to: for any to-be-calibrated device, based on corresponding communication attribute information in the configuration file, communicate with the to-be-calibrated device, and determine an in-place state of the to-be-calibrated device.
[0040] A calibration module is configured to: if the to-be-calibrated device is in the in-place state, perform parameter calibration on the to-be-calibrated device based on corresponding power calibration information in the configuration file.
[0041] In a possible implementation, the obtaining module determines whether the target request message is the target request message for performing parameter calibration in the following manner:
[0042] The target request message is parsed to obtain a request type carried in the target request message.
[0043] If the request type carried in the target request message is a first request type for identifying parameter calibration, it is determined that the target request message is for performing parameter calibration.
[0044] In a possible implementation, the apparatus further includes a backup module configured to:
[0045] If the request type carried in the target request message is the second request type of identifying parameter backup, first identification information of a device to be backed up is acquired from the target request message;
[0046] A first configuration file corresponding to the first identification information is queried from each historical configuration file included in a storage device connected to the BMC;
[0047] The first configuration file is sent, so that a receiving end performs data backup based on the first configuration file.
[0048] In a possible implementation, the configuration file further includes second identification information of the at least one device to be calibrated;
[0049] The apparatus further includes a file updating module, specifically configured to:
[0050] For any device to be calibrated, a second configuration file corresponding to the second identification information of the any device to be calibrated is queried 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;
[0051] If the second configuration file is queried, the second configuration file is updated based on the currently acquired configuration file.
[0052] In a possible implementation, the BMC includes an entity manager and a kernel; and the calibration module is specifically configured to:
[0053] The entity manager is used to traverse a driver directory in the kernel of the BMC, to determine a target driver directory corresponding to communication attribute information of the any device to be calibrated; the communication attribute information includes a chip model and address information of the corresponding device to be calibrated;
[0054] The entity manager is used to traverse the target driver directory, to determine a target file for recording parameter information of the device to be calibrated from the target driver directory, and to generate a target calibration value based on corresponding power calibration information in the configuration file, and write the target calibration value into the target file;
[0055] The kernel is used to read the target calibration value from the target file when detecting a write operation on the target file, and send the target calibration value to the any device to be calibrated, to perform parameter calibration on the any device to be calibrated.
[0056] In a possible implementation, the power calibration information includes: current resolution of a current register in any device to be calibrated and resistance value of a precision resistor; and the target calibration value is a value of a power calibration register in any device to be calibrated.
[0057] In a possible implementation, the obtaining module is specifically configured to:
[0058] the target message request is received through a Redfish interface; or
[0059] the target message request is received through an IPMI interface.
[0060] In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the parameter calibration method when executing the computer program.
[0061] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the program, when executed by a processor, implements the steps in the parameter calibration method.
[0062] In a fifth aspect, a computer program product is provided, which includes a computer program stored in a computer readable storage medium, and when a processor of a memory accessing device reads the computer program from the computer readable storage medium, the processor executes the computer program, so that the memory accessing device executes the steps in the parameter calibration method.
[0063] The technical effects of each of the second to fifth aspects and each of the possible solutions of the first aspect can be referred to the technical effect descriptions of the first aspect or the possible solutions of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0065] Figure 1 A structural schematic diagram of a parameter calibration system provided by the embodiments of the present application;
[0066] Figure 2 A flowchart of a parameter calibration method provided by the embodiments of the present application;
[0067] Figure 3A schematic diagram of a target request message provided for an embodiment of the present application;
[0068] Figure 4 A schematic diagram of entity-manager execution logic provided for an embodiment of the present application;
[0069] Figure 5 A schematic diagram of a parameter calibration example provided for an embodiment of the present application;
[0070] Figure 6 A schematic diagram of a parameter calibration device provided for an embodiment of the present application;
[0071] Figure 7 A schematic diagram of an electronic device provided for an embodiment of the present application. DETAILED DESCRIPTION
[0072] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings. The specific operation methods in the method embodiments can also be applied to the device embodiments or system embodiments.
[0073] In the description of the present application, "multiple" is understood as "at least two". The association relationship of "and / or" describing the associated objects means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. A is connected with B, which can mean that A is directly connected with B and A is connected with B through C. In addition, in the description of the present application, "first", "second", and the like are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor 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 professional terms involved are briefly described as follows:
[0075] (1) BMC (Baseboard Management Controller): a kind of independent management microcontroller specially used for server. It provides a set of standard interface and management tool for system monitoring, management and maintenance. BMC monitors the hardware state of the device and performs remote management operations through the hardware manager integrated in the server, network equipment and other computer systems.
[0076] (2) Redfish: An API (Application Programming Interface) used by BMC to build software applications, provided to external third parties for use, using json (JavaScript Object Notation) as the data exchange format, facilitating the query and filtering of resources.
[0077] (3) IPMI (Intelligent Platform Management Interface): A communication method supported by BMC, allowing system administrators to remotely manage and monitor computer systems without the need for operating system support. 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 commonly used non-volatile memory device on servers, with high integration, small size, stable performance, etc. It is commonly used in various mobile devices and embedded systems to provide data storage functions for devices.
[0079] (5) CPLD (Complex Programmable Logic Device): A programmable logic device in a server.
[0080] As the market's power performance requirements for servers gradually increase, the accuracy requirements for power monitoring of BMC (Baseboard Management Controller) also become higher and higher. How to more conveniently, flexibly and accurately adjust the power monitoring accuracy of BMC becomes one of the keys. The power monitoring of servers for various components is usually achieved by monitoring the corresponding components through the power monitoring modules corresponding to each component. BMC can achieve power calibration by modifying the parameters of the power monitoring module of the corresponding component, thereby obtaining more accurate power value presentation to the user.
[0081] In related technologies, the main implementation method of BMC for calibrating the parameters of the power monitoring module is to pre-store the relevant parameters in the BMC program or in the third-party device (such as CPLD). In the parameter calibration process, BMC reads the pre-stored relevant parameters to configure the corresponding power module.
[0082] But this method is not flexible enough, and cannot adjust parameters in real time according to the current accuracy requirement to achieve higher accuracy. Moreover, in the face of scenarios where components can be replaced flexibly, such as Riser (a card-like device inserted into the expansion slot of the server motherboard) and other devices, since different components usually correspond to different parameters, and the CPLD cannot save the parameters of various models of Riser, this method is not applicable.
[0083] To this end, in order to conveniently, flexibly and accurately adjust the power monitoring accuracy of the BMC in real time, the present application provides a parameter calibration method for a power module, which realizes flexible adjustment of parameters based on the entity-manager in the OpenBMC (open source BMC architecture), and supports parsing of configuration files by modifying the processing logic (i.e. file loading mechanism) of the entity-manager. In specific implementation, after the BMC receives the configuration file sent by the external (user) through the interface, the BMC parses the configuration file through the entity-manager to obtain the communication attribute information and power calibration information of the device to be calibrated, determines the device to be calibrated in place based on the communication attribute information, and performs parameter calibration based on the power calibration information, thereby realizing free adjustment of parameters.
[0084] Figure 1 A structural diagram of a parameter calibration system provided by an embodiment of the present application is shown in FIG. 1, and the parameter calibration method in the present application is applied to a system whose structure belongs to a part of a server, which mainly includes a BMC, a storage device and various devices to be calibrated. Figure 1
[0085] Among them, the BMC includes a preprocessing module, an entity-manager and a kernel, the preprocessing module is used to process the target request message sent by the sending end or used for parameter backup (i.e. the second request type), and performs corresponding subsequent operations based on different purposes; the entity-manager is used to parse various information in the configuration file, and configures 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 detecting that the specified file is configured to be modified, and sends the relevant data to the I2C link through the corresponding I2C interface. 2 The I2C link performs parameter calibration on the device to be calibrated.
[0086] Optionally, the above sending end can be a user terminal, and the user triggers the corresponding target request message through the client on the terminal.
[0087] The storage device is configured to store the configuration file carried in each historical request message received, so as to subsequently query and obtain the related configuration file therefrom; the storage format can be set based on requirements, which is not limited in the embodiments of the present application.
[0088] Optionally, the storage device can be an EMMC.
[0089] In some embodiments, the target message request received by the preprocessing module is forwarded to the preprocessing module by the BMC through an interface, and the forwarding can be realized through DBUS (OpenBMC inter-process communication system); the message transmission between the preprocessing module and the entity-manager can also be realized through DBUS, and the configuration file can be in json format.
[0090] It should be noted that the parameter calibration system described above is only one possible example, and other structures can also be used in specific implementations, as long as the parameter calibration method of the present application can be realized.
[0091] The present application will be further described in detail below in combination with the accompanying drawings and the above structure. Referring to Figure 2 Fig. 1 shows a flowchart of a parameter calibration method provided by an embodiment of the present application, which is applied to a BMC, and the specific implementation process is as follows:
[0092] Step S201: When a target request message for parameter calibration is received, a configuration file is obtained 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, in the embodiments of the present application, the target request message can be received in the following ways:
[0094] The target message request is received through a Redfish interface; or
[0095] The target message request is received through an IPMI interface.
[0096] In specific implementations, the BMC is configured with an interface provided to an external third party, such as a Redfish interface or an IPMI interface, etc., and the target message request triggered by the external third party can be transmitted to the BMC through the interface and transmitted to the preprocessing module through the internal DBUS.
[0097] It should be noted that the Redfish interface has both information receiving and sending functions, i.e., when it is determined based on the target request message that feedback information needs to be sent to the outside, it can be realized through the Redfish interface, but the IPMI interface only has information receiving function, i.e., it cannot 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 (the operation to be performed under the specified network function, i.e., the specific command), and at least one byte of Data. Specifically, Byte 1 carries the IPMI command identifier, which indicates that the message belongs to the aforementioned target request message (i.e., the request message for executing the aforementioned parameter calibration method), and its value can be set according to requirements, such as 0x30; Byte 2 carries the specific command value, which indicates the mode corresponding to the message (i.e., whether the request message type is the first message type or the second message type), and its value can be set according to requirements, such as using 0x2e to identify the calibration mode; Bytes 3:N carry specific data, such as a configuration file in calibration mode and a device identifier in backup mode, etc.
[0099] In specific implementation, this application provides users with two modes: calibration mode and backup mode. Calibration mode is used to instruct the BMC to perform parameter calibration based on the received configuration file, and backup mode is used to instruct the BMC to retrieve the pre-stored configuration file from the storage device and feed it back to the user.
[0100] Optionally, based on the above two modes, the target request message in this embodiment carries a request type, which includes a first request type and a second request type, corresponding to the two modes respectively. Specifically, the first request type corresponds to the calibration mode, and the second request type corresponds to the backup mode. When the sending end (i.e., the user) triggers a target message request, it triggers target request messages of different request types through different modes.
[0101] Optionally, in step S201 above, after receiving the target request message, the determination of whether the target request message is used for parameter calibration is made 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 that identifies parameter calibration, then the target request message is determined to be used for parameter calibration.
[0104] In a specific implementation, when the target message type is the first request type, a configuration file is carried in the target message type. In this case, 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 due to the absence of the configuration file.
[0105] Optionally, if the request type carried in the target request message is the second request type for identifying parameter backup, the first identification information of the device to be backed up is obtained from the target request message.
[0106] The first configuration file corresponding to the first identification information is queried from each historical configuration file included in the storage device connected to the BMC.
[0107] The first configuration file is sent to enable the receiving end to perform data backup based on the first configuration file.
[0108] In a specific implementation, the receiving end mentioned above refers to the sending end of the target request message. If the target request message is used for parameter backup, the identification information of the device to be backed up is carried in the target request message. In this case, the configuration file corresponding to the identification information can be queried from the storage device based on the identification information, and the configuration file is fed back to the message sending end.
[0109] In an implementation, since the IPMI interface does not have the function of sending information, the first configuration file needs to be sent through other interfaces, such as the Redfish interface.
[0110] It should be noted that the number of devices corresponding to the information carried in the target request message is not limited in the embodiments of the present application. That is, batch calibration of devices can be implemented by carrying configuration files of multiple parameters to be calibrated in the target request message, and batch backup of information can be implemented by carrying identification information of multiple devices to be backed up in the target request message. If batch backup is performed, when the configuration file corresponding to each identification information is queried, the corresponding configuration file can be arranged in sequence according to the arrangement order of the identification information in the target request message, so as to facilitate the receiving end to analyze.
[0111] Optionally, for the identification information of any device to be backed up, if the corresponding configuration file is not queried from the storage device, it indicates that the device to be backed up has not been calibrated before. In this case, an indication message can be sent to the entity-manager to obtain the current power calibration parameter of the device to be backed up from the kernel, and the parameter is sent to the receiving end.
[0112] It should be noted that the identification information is not limited in the embodiments of the present application, and only needs to achieve the identification function, for example, the identification information can be set as the name corresponding to the device.
[0113] Step S202, for any to-be-calibrated device, based on the corresponding communication attribute information in the configuration file, communicating with any to-be-calibrated device to determine the in-place state of any to-be-calibrated device;
[0114] Optionally, the communication attribute information includes the chip type Type (such as TPA626, which is a commonly used power consumption chip type) and address information of the corresponding to-be-calibrated device; the address information can include Bus and Address, Bus identifies the I 2 C link where the to-be-calibrated device is located, and Address identifies the communication address in the I 2 C link where the to-be-calibrated device is located.
[0115] Optionally, the application can instantiate the to-be-calibrated device based on the communication attribute information, and in this process, the kernel will communicate with any to-be-calibrated device to determine its in-place state, if instantiation is successful, it means that the to-be-calibrated device is in the in-place state, otherwise, it means that the to-be-calibrated device is not in the in-place state.
[0116] In specific implementation, as shown in FIG. Figure 4 The entity-manager parses the communication attribute information from the configuration file, and writes the chip type Type and communication information Address of the to-be-calibrated device into the new_device file of the kernel for device initialization, if the initialization is successful, it means that the component (i.e. the to-be-calibrated device) is in place, and the next step of configuration can be performed, if the initialization fails, it means that the component (i.e. the to-be-calibrated device) is not in place, and the subsequent steps are not 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 type Type and communication information Address are written into it through the echo operation. After successful initialization, the target corresponding to the to-be-calibrated device and the corresponding file under the directory will be generated in the drive directory ( / sys / bus / i2c / drive) of the BMC.
[0118] In implementation, after determining the in-place state of any to-be-calibrated device, the configuration file carried in the target request message also needs to be stored in the storage device in the embodiment of the application.
[0119] Optionally, the configuration file further includes second identification information of at least one to-be-calibrated device;
[0120] When the configuration file is stored into the storage device, first, the second configuration file corresponding to the second identification information of any to-be-calibrated device is queried from each historical configuration file included in the storage device connected with 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 queried, the second configuration file is updated based on the currently acquired configuration file.
[0121] In the implementation, if the second configuration file is not queried, the currently acquired configuration file is directly stored into the storage device; for the convenience of management, each historical configuration file in the storage device can be sorted according to the corresponding storage time.
[0122] Since the to-be-calibrated device corresponding to the configuration file may have been calibrated before, at this time, the historical configuration file corresponding thereto exists in the storage device, therefore, when the configuration file is stored, the corresponding configuration file is first queried from the storage device based on the identification, and when the configuration file is queried, the configuration file is updated, which can avoid data confusion caused by storing multiple configuration files of the same to-be-calibrated device in the storage device.
[0123] In step S203, if any to-be-calibrated device is in the in-place state, the parameter calibration is performed on any to-be-calibrated device based on the corresponding power calibration information in the configuration file.
[0124] Optionally, the above calibration process can be:
[0125] The drive directory in the kernel of the BMC is traversed through the entity-manager to determine the target drive directory corresponding to the communication attribute information of any to-be-calibrated device; the target file used for recording the parameter information of the to-be-calibrated device is determined from the target drive directory, and the 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.
[0126] When the write operation on the target file is detected through the kernel, the target calibration value is read from the target file, and the target calibration value is sent to any to-be-calibrated device to perform the parameter calibration on any to-be-calibrated device.
[0127] Specifically, as Figure 4As shown, when it is determined that the device to be calibrated is in the in-place state, first, the first drive directory (sys / bus / i2c / drive / Type) corresponding to the chip model Type in the configuration file is searched from the drive file (sys / bus / i2c / drive) of the traversal kernel, and the second drive directory (sys / bus / i2c / drive / Type / Bus-Address) corresponding to the address signal in the configuration file is searched by traversing the first drive directory. Finally, the target file (calibration file) for recording the calibration-related parameter information of the device to be calibrated is determined from the hwmon directory (i.e., the target drive directory) under the second drive directory.
[0128] Optionally, the power calibration information includes: a current resolution Current_LSB of a current register in the device to be calibrated and a resistance R of a precision resistor; and the target calibration value is a value CAL of a power calibration register in any device to be calibrated.
[0129] Specifically, the 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 under the hwmon directory, the CAL value is read from the calibration file, and based on the address information of the corresponding device to be calibrated, the CAL value is written into the power chip of the device to be calibrated through the I 2 C link, and the power calibration is completed.
[0132] The above method can calibrate parameters through externally sent configuration information, 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 Riser and other expansion board cards), and is more suitable for complex hardware design of servers.
[0133] The above method will be described in detail below with reference to the following Figure 5 The above parameter calibration process will be described in detail below with reference to a specific example, and the process specifically includes the following steps:
[0134] In step S501, the preprocessing module receives a target request message sent by a user.
[0135] The target request message carries a message type.
[0136] Step S502, the preprocessing module determines that the message type is the first request type, obtains the configuration file from the target request message, and sends it to the entity-manager; and executes step S503.
[0137] The configuration file includes the device identifier 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 the address information; and 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 the communication information Address of the device to be calibrated into the new_device file of the kernel for device initialization.
[0139] Step S504, the entity-manager determines whether the initialization is successful; if yes, it executes step S505, otherwise, it executes step S511.
[0140] If the initialization is successful, it means that the device to be calibrated is in place, and the next configuration can be performed; if the initialization fails, it means that the device to be calibrated is not in place, and the parameter calibration can be ended.
[0141] Step S505, the entity-manager parses the power calibration information from the configuration file, generates the target calibration value based on the power calibration information, writes the target calibration value into the target file, and executes step S506.
[0142] The specific process of the process is described above in step S203, which will not be repeated here.
[0143] Step S506, when the kernel detects the write operation to the target file, it reads the target calibration value from the target file and sends it to the device to be calibrated.
[0144] Step S507, the preprocessing module determines that the message type is the second request type, obtains the first identifier 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 queries the first configuration file corresponding to the first identifier information from the stored historical configuration files based on the first identifier information carried in the query request.
[0146] Step S509, the EMMC determines whether the first configuration file is queried; if yes, it executes step S510, otherwise, it executes step S511.
[0147] Step S510, the 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, a failure prompt is sent to the user.
[0149] The failure prompt can carry a failure reason, such as that the device to be calibrated is offline, or that the configuration file of the device to be backed up is not queried.
[0150] Based on the same inventive concept, the present application also provides a parameter calibration device, which is described in detail in the following Figure 6 The device comprises:
[0151] The acquisition module 601 is configured to acquire a configuration file from a target request message for performing parameter calibration when the target request message is received; the configuration file comprises communication attribute information and power calibration information of at least one device to be calibrated.
[0152] The state determination module 602 is configured to, for any device to be calibrated, determine an in-place state of the any device to be calibrated based on corresponding communication attribute information in the configuration file and communicate with the any device to be calibrated.
[0153] The calibration module 603 is configured to, if the any device to be calibrated is in the in-place state, perform parameter calibration on the any device to be calibrated based on corresponding power calibration information in the configuration file.
[0154] In a possible implementation, the acquisition module 601 determines whether the target request message is the target request message for performing parameter calibration by the following manner:
[0155] The target request message is parsed to acquire a request type carried in the target request message.
[0156] If the request type carried in the target request message is a first request type for identifying parameter calibration, it is determined that the target request message is for performing parameter calibration.
[0157] In a possible implementation, the device further comprises a backup module configured to:
[0158] If the request type carried in the target request message is a second request type for identifying parameter backup, first identification information of a device to be backed up is acquired from the target request message.
[0159] A first configuration file corresponding to the first identification information is queried from each historical configuration file included in a 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, the configuration file further includes second identification information of the at least one device to be calibrated.
[0162] The device further includes a file updating module, which is specifically configured to:
[0163] For any device to be calibrated, a second configuration file corresponding to the second identification information of the any device to be calibrated is queried 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 queried, the second configuration file is updated based on the currently obtained configuration file.
[0165] In a possible implementation, the BMC includes an entity manager and a kernel; and the calibration module 603 is specifically configured to:
[0166] The entity manager is used to traverse a driver directory in the kernel of the BMC, to determine a target driver directory corresponding to communication attribute information of the any device to be calibrated; the communication attribute information includes a chip model and address information of the corresponding device to be calibrated.
[0167] The entity manager is used to traverse the target driver directory, to determine a target file for recording parameter information of the device to be calibrated from the target driver directory, and to generate a target calibration value based on corresponding power calibration information in the configuration file, and to write the target calibration value into the target file.
[0168] The kernel is used to read the target calibration value from the target file when detecting a write operation on the target file, and to send the target calibration value to the any device to be calibrated, to perform parameter calibration on the any device to be calibrated.
[0169] In a possible implementation, the power calibration information includes current resolution of a current register in the any device to be calibrated and resistance of a precision resistor; and the target calibration value is a value of a power calibration register in the any device to be calibrated.
[0170] In a possible implementation, the obtaining module 601 is specifically configured to:
[0171] The target message request is received through a 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, the application also provides an electronic device which can realize the functions of the parameter calibration device, and the electronic device comprises Figure 7 , and the electronic device comprises:
[0174] at least one processor 701 and a memory 702 connected with the at least one processor 701, and the specific connection medium between the processor 701 and the memory 702 is not limited in the application, Figure 7 In the application, the processor 701 and the memory 702 are connected through a bus 700. The bus 700 is represented by a thick line in Figure 7 , and the connection mode between other components is only schematically illustrated and is not limited. The bus 700 can be divided into an address bus, a data bus, a control bus, etc., for the convenience of representation, Figure 7 In the application, only one thick line is used to represent the bus 700, but it does not mean that there is only one bus or only one type of bus. Alternatively, the processor 701 can also be referred to as a controller, and the name is not limited.
[0175] In the application, the memory 702 stores instructions executable by the at least one processor 701, and 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 realize the functions of various modules in the device as shown in Figure 6 .
[0176] The processor 701 is the control center of the device, can connect all parts of the control device through various interfaces and lines, and can realize the functions and process data of the device by running or executing the instructions stored in the memory 702 and calling the data stored in the memory 702, thereby monitoring the whole device.
[0177] In a possible design, the processor 701 can include one or more processing units, and the processor 701 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface, the application program, etc., and the modem processor mainly processes the wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 701. In some embodiments, the processor 701 and the memory 702 can be realized on the same chip, and in some embodiments, they can also be realized on independent chips respectively.
[0178] The processor 701 can be a general 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 component, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general processor can be a microprocessor or any conventional processor. The steps of the parameter calibration method disclosed in the embodiments of the present application can be directly embodied by a hardware processor for execution, or be executed by a combination of hardware and software modules in the processor.
[0179] The memory 702 is a non-volatile computer readable storage medium, and can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 702 can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card type memory, random access memory (RAM), static random access memory (SRAM), programmable read only memory (PROM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. The memory 702 is any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer, but is not limited to this. The memory 702 in the embodiments of the present application can also be a circuit or any other device capable of realizing a storage function, used for storing program instructions and / or data.
[0180] By designing and programming the processor 701, the code corresponding to the application exception detection method introduced in the foregoing embodiments can be fixed in the chip, so that the chip can execute the steps of the parameter calibration method of the embodiments shown in the running time. Figure 2 How to design and program the processor 701 is a technology known to those skilled in the art, which will not be described here.
[0181] The embodiments of the present application also provide a computer readable storage medium storing computer executable instructions required for the processor to execute, which contains programs required for the processor to execute.
[0182] In some possible implementation, each of the aspects of the parameter calibration method provided by the present application can also be implemented in the form of a program product, which includes program codes for causing an electronic device to perform the steps of the parameter calibration method according to various exemplary embodiments of the present application described above in the specification when the program product is run on the electronic device.
[0183] Those skilled in the art should understand that embodiments of the present application can be provided in the form of a method, device, or computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) containing computer-usable program code.
[0184] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (apparatuses), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as a combination of flows and / or blocks in the flowcharts and / or block diagrams, 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 apparatus to produce a machine, so that the instructions that are executed by the processor of the computer or other programmable data processing apparatus generate an apparatus that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The flow or flows and / or blocks in the flowcharts and / or block diagrams Figure 1 The apparatus that implements the functions specified in the flowcharts and / or block diagrams.
[0185] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture that includes an instruction apparatus, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The flow or flows and / or blocks in the flowcharts and / or block diagrams Figure 1 The apparatus that implements the functions specified in the flowcharts and / or block diagrams.
[0186] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a process for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The flow or flows and / or blocks in the flowcharts and / or block diagrams Figure 1 The apparatus that implements the functions specified in the flowcharts and / or block diagrams.
[0187] While the preferred embodiments of the application have been described, additional variations and modifications can be made to these embodiments by those skilled in the art once they have the benefit of the present disclosure without departing from the spirit and scope of the application. Accordingly, it is intended that such additions and modifications be included within the scope of the application. It is the following claims, including any amendments thereto, which define the scope of the application.
[0188] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.
Claims
1. A method of parameter calibration, characterized in that, The method is applied to a baseboard management controller (BMC) including an entity manager and a kernel, and comprises the following steps: When a target request message for parameter calibration is received through a Redfish interface, a configuration file is obtained 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, communication is performed with the any device to be calibrated to determine the in-place state of the any device to be calibrated; If the any device to be calibrated is in the in-place state, a target driver directory corresponding to the communication attribute information of the any device to be calibrated is determined by traversing a driver directory in the kernel of the BMC through the entity manager; the communication attribute information includes a chip model and address information of the corresponding device to be calibrated; A target file used to record parameter information of the device to be calibrated is determined from the target driver directory through the entity manager, and 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 on the target file is detected through the kernel, the target calibration value is read from the target file and sent to the any device to be calibrated to calibrate the parameter of the any device to be calibrated.
2. The method of claim 1, wherein, The target request message is determined to be a target request message for parameter calibration in the following manner: The target request message is parsed to obtain a request type carried in the target request message; If the request type carried in the target request message is a first request type indicating parameter calibration, it is determined that the target request message is for parameter calibration.
3. The method of claim 2, wherein, The method further comprises: If the request type carried in the target request message is a second request type indicating parameter backup, first identification information of a device to be backed up is obtained from the target request message; A first configuration file corresponding to the first identification information is queried from each historical configuration file included in a storage device connected to the BMC; The first configuration file is sent to enable a receiving end to perform data backup based on the first configuration file.
4. The method of claim 1, wherein, 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, a second configuration file corresponding to the second identification information of the any device to be calibrated is queried 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 queried, the second configuration file is updated based on the currently obtained configuration file.
5. The method of claim 1, wherein, The power calibration information includes a current resolution of a current register and a resistance value of a precision resistor in the any device to be calibrated; and the target calibration value is a value of a power calibration register in the any device to be calibrated.
6. A parameter calibration apparatus characterized by comprising: The application is applied to a BMC including an entity manager and a kernel; the device comprises: An acquisition module is configured to acquire a configuration file from a target request message for parameter calibration when the target request message is received through a Redfish interface; the configuration file comprises communication attribute information and power calibration information of at least one device to be calibrated; A state determination module is configured to determine an in-place state of any device to be calibrated based on corresponding communication attribute information in the configuration file and communicate with the any device to be calibrated; A calibration module is configured to determine a target driver directory corresponding to the communication attribute information of the any device to be calibrated by traversing a driver directory in a kernel of the BMC through the entity manager if the any device to be calibrated is in the in-place state; the communication attribute information comprises a chip model and address information of the corresponding device to be calibrated; determine a target file for recording parameter information of the device to be calibrated from the target driver directory through the entity manager, and generate a target calibration value based on corresponding power calibration information in the configuration file, and write the target calibration value into the target file; read the target calibration value from the target file and send the target calibration value to the any device to be calibrated to calibrate parameters of the any device to be calibrated through the kernel when detecting a write operation on the target file.
7. An electronic device, comprising: Comprise: A memory for storing a computer program; A processor for executing the computer program stored in the memory to implement the method of any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer program is stored in the computer readable storage medium, and the computer program is executed by the processor to implement the method of any one of claims 1-5.
Citation Information
Patent Citations
Component parameter configuration method, server and terminal equipment
CN117811921A