BMC access hardware device control method and system, electronic device and medium
Patent Information
- Application Number
- CN202211183276.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-27
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2042-09-27
AI Technical Summary
但实际使用过程中,BMC只可以访问i2C总线上的一个设备,如果既存在一张RAID卡又存在一张GPU卡时,则很难保证BMC的散热过程执行正常,通常只能设置一个较高的风扇基础转速的方式,以服务器的高功耗为代价来确保GPU不超温
[0049]1. The embodiments of this application provide a method to divide the operating parameters of hardware into several dimensions, set corresponding weights for each dimension, calculate the weighted sum of the operating parameters of each hardware in all dimensions, sort the weighted sums of all hardware, receive access requests from the BMC, and process the BMC access requests in descending order of weighted sums. The operating parameters of the hardware include at least multiple parameters such as power consumption, power consumption change rate, temperature, health status, voltage, current, and frequency. Through the above method, by reading the power consumption process and operating parameters, calculating the weighted priority of each parameter, and then controlling the order of hardware access based on the priority order, the server can complete the access process of each hardware under relatively stable power consumption.
Smart Images

Figure CN115686823B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a control method, system, electronic device, and medium for BMC accessing hardware devices. Background Technology
[0002] Currently, with the development and advancement of computer systems, the internet is used in all aspects of life, and the market demand for servers is increasing. Ensuring the security of server management system logs has become a key concern for enterprises, especially internet companies with large server needs. The diversity of server configuration options and power consumption costs have also become core competitive advantages for servers. However, if a server model offers many configuration options, it often means that the BMC firmware needs to compromise on certain important functions, such as potentially increasing server power consumption.
[0003] In practical use, when a server motherboard is designed to support multiple configurations, the BMC (Browser Control Center) monitoring of PCIe devices on the I2C bus must consider monitoring a wide variety of PCIe devices. The biggest challenge brought about by the BMC firmware to this hardware topology design is controlling the polling interval. The time required for different PCIe devices to access each other via I2C varies significantly. For example, it can take up to one minute for the BMC to read all the information from a RAID card. Because GPUs heat up quickly, the BMC needs to query the GPU temperature at a maximum interval of 3 seconds to ensure that it can increase fan speeds in time to prevent the GPU from overheating. However, in actual use, the BMC can only access one device on the I2C bus at a time. If both a RAID card and a GPU card are present, it's difficult to guarantee that the BMC's cooling process will function properly. Typically, a higher base fan speed is set, sacrificing server power consumption to prevent the GPU from overheating. This process can easily lead to excessive server load and malfunctions. Summary of the Invention
[0004] To address at least one of the problems mentioned in the background art, this application provides a control method, system, electronic device, and medium for BMC accessing hardware devices. By reading power consumption processes and operating parameters, calculating the weighted priority of each parameter, and then controlling the order of hardware access based on the priority order, the server can complete the access process of each hardware device under relatively stable power consumption.
[0005] The specific technical solutions provided in this application are as follows:
[0006] A first aspect includes a method for controlling BMC access to hardware devices, the method comprising:
[0007] Receive access requests from the BMC and obtain the operating parameters of the hardware to be accessed by the BMC;
[0008] The operating parameters are divided into several dimensions, and a corresponding weight is set for each dimension of the operating parameters.
[0009] Calculate the weighted sum of the operating parameters for all dimensions of each hardware component, and sort the weighted sums for all hardware components.
[0010] The access requests to the BMC are processed in descending order of the weighted sum value.
[0011] In one specific embodiment, it also includes:
[0012] Obtain the weighted sum of all hardware within a preset time period;
[0013] The weighted sum is compared with the preset threshold.
[0014] If the weighted sum is greater than the preset threshold, the access requests of the BMC are processed in descending order of the weighted sum.
[0015] If the weighted sum is less than or equal to the preset threshold, the access request for the BMC is processed directly.
[0016] In one specific embodiment, the method further includes:
[0017] The rate of change of power consumption during the first period is obtained to obtain the average power consumption change.
[0018] Obtain the rate of change of power consumption within the current period, and compare the rate of change of power consumption within the current period with the average value of power consumption change;
[0019] If the rate of change of power consumption in the current period is greater than the average value of power consumption change, then the weighted sum values of all hardware are re-sorted.
[0020] If the rate of change of power consumption in the current period is less than or equal to the average value of power consumption change, then the order of the weighted sum values will not be adjusted.
[0021] In one specific embodiment, receiving an access request for the BMC and processing the BMC access request in descending order of the weighted sum value specifically includes:
[0022] Receive the access request from the BMC and obtain the weighted sum values of all hardware within a preset time period in descending order;
[0023] Access the hardware corresponding to the largest weighted sum value through the BMC, and continue to process other BMC access requests in descending order of the weighted sum value.
[0024] In one specific embodiment, after accessing the hardware corresponding to the largest weighted sum value via the BMC, the method further includes:
[0025] Obtain the operating parameters of the hardware at the current moment, and calculate the weighted sum of the operating parameters of each hardware across all dimensions at the current moment;
[0026] Sort the weighted sum values at the current moment.
[0027] In one specific embodiment, the dimensions of the operating parameters include at least two or more of the following: power consumption, rate of change of power consumption, temperature, health status, voltage, current, and frequency; the formula for calculating the rate of change of power consumption is:
[0028]
[0029] Where PV is the rate of change of power consumption; p1 is the power consumption at the current moment; p0 is the power consumption of the previous reading; t1 is the current moment; and t0 is the time of the previous power consumption reading.
[0030] In one specific embodiment, the formula for calculating the weighted sum of the operating parameters for all dimensions of all hardware is as follows:
[0031]
[0032] Among them, R h R is the weighted sum of the running parameters; i The numerical values of the running parameters for each dimension; k i is the weighting value; μ is the normalization parameter.
[0033] Secondly, a hardware access monitoring system, the system comprising:
[0034] The setting module is used to divide the operating parameters of the hardware into several dimensions and set a corresponding weight for each dimension of the operating parameters.
[0035] A sorting module is used to calculate the weighted sum of the operating parameters of each hardware across all dimensions, and to sort the weighted sums of all hardware.
[0036] The processing module is used to receive access requests from the BMC and process the access requests from the BMC in descending order of the weighted sum value.
[0037] The dimensions of the operating parameters include at least two or more of the following: power consumption, rate of change of power consumption, temperature, health status, voltage, current, and frequency.
[0038] Thirdly, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0039] Step A: Receive the access request from the BMC and obtain the operating parameters of the hardware to be accessed by the BMC;
[0040] Step B: Divide the running parameters into several dimensions, and set corresponding weights for each dimension of the running parameters;
[0041] Step C: Calculate the weighted sum of the operating parameters for all dimensions of each hardware component, and sort the weighted sums for all hardware components.
[0042] Step D: Process the access requests of the BMC in descending order of the weighted sum value.
[0043] Fourthly, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, performs the following steps:
[0044] Step A: Receive the access request from the BMC and obtain the operating parameters of the hardware to be accessed by the BMC;
[0045] Step B: Divide the running parameters into several dimensions, and set corresponding weights for each dimension of the running parameters;
[0046] Step C: Calculate the weighted sum of the operating parameters for all dimensions of each hardware component, and sort the weighted sums for all hardware components.
[0047] Step D: Process the access requests of the BMC in descending order of the weighted sum value.
[0048] The embodiments of this application have the following beneficial effects:
[0049] 1. The embodiments of this application provide a method to divide the operating parameters of hardware into several dimensions, set corresponding weights for each dimension, calculate the weighted sum of the operating parameters of each hardware in all dimensions, sort the weighted sums of all hardware, receive access requests from the BMC, and process the BMC access requests in descending order of weighted sums. The operating parameters of the hardware include at least multiple parameters such as power consumption, power consumption change rate, temperature, health status, voltage, current, and frequency. Through the above method, by reading the power consumption process and operating parameters, calculating the weighted priority of each parameter, and then controlling the order of hardware access based on the priority order, the server can complete the access process of each hardware under relatively stable power consumption. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 A schematic diagram illustrating a control method for accessing hardware devices using a BMC according to this application;
[0052] Figure 2 A schematic diagram of the system according to this application is shown;
[0053] Figure 3 A schematic diagram of an electronic device according to this application is shown. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0055] As described in the background section, the time required for different PCIe devices to access each other via I2C varies significantly. However, in actual use, the BMC can only access one device on the I2C bus. If both a RAID card and a GPU card are present, it is difficult to ensure that the BMC's cooling process operates normally. Typically, a higher fan base speed is set, sacrificing the server's power consumption to prevent the GPU from overheating. This process can easily lead to excessive server load and malfunctions. Based on these problems, this application proposes a control method, system, electronic device, and medium for BMC accessing hardware devices. By reading power consumption processes and operating parameters, calculating weighted priorities for each parameter, and then controlling the hardware access order based on the priority ranking, the server can complete the access process for each hardware device under relatively stable power consumption.
[0056] Example 1
[0057] A method for controlling BMC access to hardware devices, such as Figure 1 As shown, it includes the following steps:
[0058] Step S1: Receive the access request from the BMC and obtain the operating parameters of the hardware to be accessed by the BMC.
[0059] In one specific embodiment, the BMC can only access one PCIe device on the I2C bus at a time. Since the time required for the BMC to access each PCIe device varies, the processing order of BMC access requests needs to be controlled upon receiving such requests. This ensures the server operates smoothly at a reasonable power consumption and prevents overheating or other malfunctions within the server's components. The operating parameters of the hardware device to be accessed by the BMC are read; this hardware device could be a RAID card, GPU, network card, SAS card, etc.
[0060] Step S2: Divide the running parameters into several dimensions and set corresponding weights for each dimension of the running parameters.
[0061] Specifically, the dimensions of operating parameters include power consumption, rate of change of power consumption, temperature, health status, voltage, current, and frequency. Furthermore, different levels can be set according to the characteristics of each dimension, with different scores corresponding to each level, and the corresponding scores are used as the parameter values for each dimension. Additionally, taking each slot as the atomic unit, a power monitoring chip is installed in each PCIe device slot to monitor the power consumption of that slot.
[0062] In one specific embodiment, the formula for calculating the rate of change of power consumption is:
[0063]
[0064] Where PV is the rate of change of power consumption; p1 is the power consumption at the current moment; p0 is the power consumption of the previous reading; t1 is the current moment; and t0 is the time of the previous power consumption reading.
[0065] The specific health status is determined by accessing the hardware's operating logs or status information. If any abnormal information is found in the logs, the hardware device is considered to be in normal health; otherwise, it is considered to be in abnormal health. A device in normal health receives a score of 3, while one in abnormal health receives a score of 0. Temperature is categorized into five levels, each with a different score: "Greater than 40℃" is the highest level, with a score of 5; "Greater than 30℃ and less than or equal to 40℃" is a high level, with a score of 4; "Greater than 20℃ and less than or equal to 30℃" is a medium level, with a score of 3; "Greater than 10℃ and less than or equal to 20℃" is a low level, with a score of 2; and "Less than or equal to 10℃" is the lowest level, with a score of 1. Set the weight for each dimension of the operating parameters, and the sum of the weight values of multiple dimensions is "1". For example, set the weight for power consumption to "0.3", the weight for power consumption change rate to "0.1", the weight for temperature to "0.2", the weight for health status to "0.1", the weight for voltage to "0.1", the weight for current to "0.1", and the weight for frequency to "0.1".
[0066] Step S3: Calculate the weighted sum of the operating parameters for all dimensions of each hardware component, and sort the weighted sums for all hardware components.
[0067] Specifically, the formula for calculating the weighted sum of the operating parameters for all dimensions of all hardware is as follows:
[0068]
[0069] Among them, R h R is the weighted sum of the running parameters; i The numerical values of the running parameters for each dimension; k i is the weighting value; μ is the normalization parameter.
[0070] Calculate the weighted sum for each hardware device according to the above formula, and sort the weighted sums and their corresponding devices in descending order.
[0071] In a specific embodiment, taking a hardware RAID card as an example, the weights corresponding to power consumption are set to "0.3", power consumption change rate to "0.1", temperature to "0.2", health status to "0.1", voltage to "0.1", current to "0.1", and frequency to "0.1". After calculation, the power consumption score of the RAID card is "3", the power consumption change rate score is "2", the temperature score is "2", the health status score is "3", the voltage score is "3", the current score is "3", and the frequency score is "5". Then, according to the above formula, the weighted sum value of the RAID card is "2.9".
[0072] Step S4: Process the access requests of the BMC in descending order of the weighted sum value.
[0073] In one specific embodiment, the method further includes obtaining the weighted sum of all hardware within a preset time period; comparing the weighted sum with the preset threshold; if the weighted sum is greater than the preset threshold, then processing the access request of the BMC in descending order of the weighted sum; if the weighted sum is less than or equal to the preset threshold, then directly processing the access request of the BMC.
[0074] In one specific embodiment, receiving an access request from the BMC and processing the BMC access request according to the weighted sum value in descending order specifically includes: receiving the BMC access request, obtaining the weighted sum value of all hardware within a preset time period in descending order; accessing the hardware device corresponding to the largest weighted sum value through the BMC, and continuing to process other BMC access requests according to the weighted sum value in descending order.
[0075] For example, the weighted sum of each hardware device over the last 5 minutes is obtained, and all hardware devices are acquired and their corresponding weighted sums are calculated. For instance, the weighted sum for the RAID card is calculated to be 0.8, the GPU to be 1, the network card to be 0.7, and the SAS card to be 0.5. The weighted sum for each hardware device is compared to a preset threshold of 1.5. Since the weighted sum for all hardware devices is less than the preset threshold of 1.5, the BMC access request is processed directly without sorting the weighted sums. When the preset threshold is 0.8, there are cases where the weighted sum for a hardware device is greater than the preset threshold. In this case, the weighted sums are sorted in descending order: GPU, RAID card, network card, SAS card, and then the BMC access request is processed based on this order.
[0076] After processing a BMC access request, the process further includes: obtaining the operating parameters of the hardware at the current moment, and calculating the weighted sum of the operating parameters for all dimensions of each hardware device at the current moment; sorting the weighted sum values at the current moment. The process involves obtaining the operating parameters at the current moment, recalculating the weighted sum value of the hardware corresponding to the hardware device according to the above calculation process, updating the weighted sum value of the device, and thus updating the order of its weighted sum values.
[0077] In a specific embodiment, the hardware devices that the BMC frequently needs to access are periodically monitored. Then: the power consumption change rate within the first period is obtained to obtain the average power consumption change; the power consumption change rate within the current period is obtained, and the power consumption change rate within the current period is compared with the average power consumption change; if the power consumption change rate within the current period is greater than the average power consumption change, the weighted sum of all hardware is reordered; if the power consumption change rate within the current period is less than or equal to the average power consumption change, the order of the weighted sum is not adjusted.
[0078] Specifically, the first period is set to "10 days", the second period is also "10 days", and so on, with the period length set by the user. For each moment within the first period, the power consumption change rate is acquired, and the average power consumption change rate within the first period is calculated. Then, the power consumption change rate at the current moment is calculated and compared with the average power consumption change rate. If the current power consumption change rate is greater than the average power consumption change rate, it indicates that the power consumption of the hardware device being accessed is changing significantly, potentially leading to large fluctuations or adjustments. In this case, the weighted sum values of all hardware devices are re-sorted. If the current power consumption change rate is less than or equal to the average power consumption change rate, it indicates that the power consumption of the hardware device being accessed is changing relatively little, suggesting that the power consumption change is not significant and relatively stable, and should have little impact on the order of the weighted sum values. In this case, the order of the weighted sum values is not adjusted.
[0079] The method in this embodiment reads power consumption data and operating parameters, calculates weighted priorities for each parameter, and then controls the hardware access order based on the priority ranking. This allows the server to complete the access process for each hardware component under relatively stable power consumption. The priority-ranked task queue can be designed using a multi-level feedback queue model to avoid adverse phenomena such as task starvation.
[0080] Example 2
[0081] Corresponding to the above embodiments, this application provides a hardware access monitoring system, such as... Figure 2 As shown, the system includes:
[0082] The acquisition module is used to receive access requests from the BMC and acquire the operating parameters of the hardware to be accessed by the BMC.
[0083] The setting module is used to divide the operating parameters of the hardware into several dimensions and set a corresponding weight for each dimension of the operating parameters.
[0084] A sorting module is used to calculate the weighted sum of the operating parameters of each hardware across all dimensions, and to sort the weighted sums of all hardware in order.
[0085] The processing module includes processing BMC access requests in descending order of the weighted sum value.
[0086] In one specific embodiment, the method further includes obtaining the weighted sum of all hardware within a preset time period; comparing the weighted sum with the preset threshold; if the weighted sum is greater than the preset threshold, then processing the access requests of the BMC in descending order of the weighted sum; if the weighted sum is less than or equal to the preset threshold, then processing all access requests of the BMC simultaneously.
[0087] In one specific embodiment, the method further includes: obtaining the power consumption change rate within a first period to obtain an average power consumption change; obtaining the power consumption change rate within the current period and comparing the power consumption change rate within the current period with the average power consumption change; if the power consumption change rate within the current period is greater than the average power consumption change, then re-sorting the weighted sum values of all hardware; if the power consumption change rate within the current period is less than or equal to the average power consumption change, then not adjusting the order of the weighted sum values.
[0088] In one specific embodiment, the processing module specifically includes receiving access requests from the BMC, obtaining the weighted sum values of all hardware within a preset time period in descending order; accessing the hardware device corresponding to the largest weighted sum value through the BMC, and continuing to process other BMC access requests according to the weighted sum values in descending order.
[0089] In one specific embodiment, after accessing the hardware corresponding to the largest weighted sum value through BMC, the method further includes: obtaining the operating parameters of the hardware at the current moment, and calculating the weighted sum value of the operating parameters of each hardware across all dimensions at the current moment; and sorting the weighted sum values at the current moment.
[0090] In one specific embodiment, the dimensions of the operating parameters include at least power consumption, rate of change of power consumption, temperature, health status, voltage, current, and frequency.
[0091] In one specific embodiment, the formula for calculating the rate of change of power consumption is:
[0092]
[0093] Where PV is the rate of change of power consumption; p1 is the power consumption at the current moment; p0 is the power consumption of the previous reading; t1 is the current moment; and t0 is the time of the previous power consumption reading.
[0094] In one specific embodiment, the formula for calculating the weighted sum of the operating parameters for all dimensions of all hardware is as follows:
[0095]
[0096] Among them, R h R is the weighted sum of the running parameters; i The numerical values of the running parameters for each dimension; k i is the weighting value; μ is the normalization parameter.
[0097] Example 3
[0098] An electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps:
[0099] Step 101: Receive the access request from the BMC and obtain the operating parameters of the hardware to be accessed by the BMC;
[0100] Step 102: Divide the running parameters into several dimensions, and set corresponding weights for each dimension of the running parameters;
[0101] Step 103: Calculate the weighted sum of the operating parameters for all dimensions of each hardware component, and sort the weighted sums for all hardware components.
[0102] Step 104: Process the access requests of the BMC in descending order of the weighted sum value.
[0103] In one specific embodiment, the method further includes obtaining the weighted sum of all hardware within a preset time period; comparing the weighted sum with the preset threshold; if the weighted sum is greater than the preset threshold, then processing the access requests of the BMC in descending order of the weighted sum; if the weighted sum is less than or equal to the preset threshold, then processing all access requests of the BMC simultaneously.
[0104] In one specific embodiment, the power consumption change rate within a first period is obtained to obtain the average power consumption change; the power consumption change rate within the current period is obtained, and the power consumption change rate within the current period is compared with the average power consumption change; if the power consumption change rate within the current period is greater than the average power consumption change, the weighted sum of all hardware is reordered; if the power consumption change rate within the current period is less than or equal to the average power consumption change, the order of the weighted sum is not adjusted.
[0105] In a specific embodiment, step 104 specifically includes: receiving an access request from the BMC, obtaining the weighted sum values of all hardware within a preset time period in descending order; accessing the hardware device corresponding to the largest weighted sum value through the BMC, and continuing to process other BMC access requests according to the weighted sum values in descending order.
[0106] In one specific embodiment, after accessing the hardware corresponding to the largest weighted sum value through BMC, the method further includes: obtaining the operating parameters of the hardware at the current moment, and calculating the weighted sum value of the operating parameters of each hardware across all dimensions at the current moment; and sorting the weighted sum values at the current moment.
[0107] In one specific embodiment, the dimensions of the operating parameters include at least power consumption, rate of change of power consumption, temperature, health status, voltage, current, and frequency.
[0108] In one specific embodiment, the formula for calculating the rate of change of power consumption is:
[0109]
[0110] Where PV is the rate of change of power consumption; p1 is the power consumption at the current moment; p0 is the power consumption of the previous reading; t1 is the current moment; and t0 is the time of the previous power consumption reading.
[0111] In one specific embodiment, the formula for calculating the weighted sum of the operating parameters for all dimensions of all hardware is as follows:
[0112]
[0113] Among them, R h R is the weighted sum of the running parameters; i The numerical values of the running parameters for each dimension; k i is the weighting value; μ is the normalization parameter.
[0114] In one embodiment, an electronic device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 3As shown, the electronic device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores operating parameter data of the hardware device within a first cycle. The network interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a BMC control method for accessing the hardware device.
[0115] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0116] Example 4
[0117] In one embodiment of this invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0118] Step 201: Receive the access request from the BMC and obtain the operating parameters of the hardware to be accessed by the BMC;
[0119] Step 202: Divide the running parameters into several dimensions, and set corresponding weights for each dimension of the running parameters;
[0120] Step 203: Calculate the weighted sum of the operating parameters for all dimensions of each hardware component, and sort the weighted sums for all hardware components.
[0121] Step 204: Process the access requests of the BMC in descending order of the weighted sum value.
[0122] In one specific embodiment, the method further includes obtaining the weighted sum of all hardware within a preset time period; comparing the weighted sum with the preset threshold; if the weighted sum is greater than the preset threshold, then processing the access requests of the BMC in descending order of the weighted sum; if the weighted sum is less than or equal to the preset threshold, then processing all access requests of the BMC simultaneously.
[0123] In one specific embodiment, the power consumption change rate within a first period is obtained to obtain the average power consumption change; the power consumption change rate within the current period is obtained, and the power consumption change rate within the current period is compared with the average power consumption change; if the power consumption change rate within the current period is greater than the average power consumption change, the weighted sum of all hardware is reordered; if the power consumption change rate within the current period is less than or equal to the average power consumption change, the order of the weighted sum is not adjusted.
[0124] In a specific embodiment, step 204 specifically includes: receiving an access request from the BMC, obtaining the weighted sum values of all hardware within a preset time period in descending order; accessing the hardware device corresponding to the largest weighted sum value through the BMC, and continuing to process other BMC access requests according to the weighted sum values in descending order.
[0125] In one specific embodiment, after accessing the hardware corresponding to the largest weighted sum value through BMC, the method further includes: obtaining the operating parameters of the hardware at the current moment, and calculating the weighted sum value of the operating parameters of each hardware across all dimensions at the current moment; and sorting the weighted sum values at the current moment.
[0126] In one specific embodiment, the dimensions of the operating parameters include at least power consumption, rate of change of power consumption, temperature, health status, voltage, current, and frequency.
[0127] In one specific embodiment, the formula for calculating the rate of change of power consumption is:
[0128]
[0129] Where PV is the rate of change of power consumption; p1 is the power consumption at the current moment; p0 is the power consumption of the previous reading; t1 is the current moment; and t0 is the time of the previous power consumption reading.
[0130] In one specific embodiment, the formula for calculating the weighted sum of the operating parameters for all dimensions of all hardware is as follows:
[0131]
[0132] Among them, R h R is the weighted sum of the running parameters; i The numerical values of the running parameters for each dimension; k i is the weighting value; μ is the normalization parameter.
[0133] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0134] Although preferred embodiments have been described in this application, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of this application.
[0135] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A control method for BMC accessing hardware devices, characterized in that, The method includes: Upon receiving access requests from the BMC, the BMC can only access one PCIe device on the I2C bus at a time. Since the time required for the BMC to access each PCIe device is different, it is necessary to control the processing order of the BMC access when receiving a request from the BMC to access the I2C device, and obtain the operating parameters of the hardware to be accessed by the BMC. The hardware devices are RAID cards, GPUs, network cards, and SAS cards. The operating parameters are divided into several dimensions, and a corresponding weight is set for each dimension of the operating parameters. Calculate the weighted sum of the operating parameters for all dimensions of each hardware component, and sort the weighted sums for all hardware components. Using each slot as an atomic unit, a power monitoring chip is installed in the slot of each PCIe device to monitor the power consumption of that slot; the power consumption change rate within the first cycle is obtained to obtain the average power consumption change; the power consumption change rate within the current cycle is obtained and compared with the average power consumption change; if the power consumption change rate within the current cycle is greater than the average power consumption change, the weighted sum values of all hardware are reordered; if the power consumption change rate within the current cycle is less than or equal to the average power consumption change, the order of the weighted sum values is not adjusted. The access requests to the BMC are processed in descending order of the weighted sum value; Obtain the weighted sum of all hardware within a preset time period, compare the weighted sum with a preset threshold. If the weighted sum is greater than the preset threshold, process the access request of the BMC in descending order of the weighted sum. If all weighted sums are less than or equal to the preset threshold, process the access request of the BMC directly.
2. The control method for BMC accessing hardware devices according to claim 1, characterized in that, The access requests to the BMC are processed in descending order of the weighted sum value, specifically including: Receive the access request from the BMC and obtain the weighted sum values of all hardware within a preset time period in descending order; Access the hardware device corresponding to the largest weighted sum value through the BMC, and continue to process other BMC access requests in descending order of the weighted sum value.
3. The control method for BMC accessing hardware devices according to claim 1, characterized in that, After accessing the hardware corresponding to the largest weighted sum value via the BMC, the process also includes: Obtain the operating parameters of the hardware at the current moment, and calculate the weighted sum of the operating parameters of each hardware across all dimensions at the current moment; Sort the weighted sum values at the current moment.
4. The control method for BMC accessing hardware devices according to claim 3, characterized in that, The dimensions of the operating parameters include at least two or more of the following: power consumption, rate of change of power consumption, temperature, health status, voltage, current, and frequency; the formula for calculating the rate of change of power consumption is: ; Where PV is the rate of change of power consumption; p1 is the power consumption at the current moment; p0 is the power consumption of the previous reading; t1 is the current moment; and t0 is the time of the previous power consumption reading.
5. The control method for BMC accessing hardware devices according to claim 4, characterized in that, The formula for calculating the weighted sum of the operating parameters for all dimensions of all hardware is as follows: ; Among them, R h R is the weighted sum of the running parameters; i The numerical values of the running parameters for each dimension; k i is the weighting value; μ is the normalization parameter.
6. A hardware access monitoring system based on the method of any one of claims 1 to 5, characterized in that, The system includes: The acquisition module is used to receive access requests from the BMC and acquire the operating parameters of the hardware to be accessed by the BMC. The acquisition module is also used to ensure that the BMC can only access one PCIe device on the I2C bus at the same time. Since the time required for the BMC to access each PCIe device is different, the processing order of the BMC access needs to be controlled when a request for the BMC to access the I2C device is received. The hardware devices are RAID card, GPU, network card, and SAS card. The setting module is used to divide the operating parameters of the hardware into several dimensions and set a corresponding weight for each dimension of the operating parameters. A sorting module is used to calculate the weighted sum of the operating parameters of each hardware across all dimensions, and to sort the weighted sums of all hardware in order. The sorting module is further configured to monitor the power consumption of each PCIe device slot by installing a power monitoring chip in each slot, taking each slot as an atomic unit; obtain the power consumption change rate within a first cycle to obtain the average power consumption change; obtain the power consumption change rate within the current cycle and compare the power consumption change rate within the current cycle with the average power consumption change; if the power consumption change rate within the current cycle is greater than the average power consumption change, then the weighted sum values of all hardware are re-sorted; if the power consumption change rate within the current cycle is less than or equal to the average power consumption change, then the order of the weighted sum values is not adjusted. The processing module includes processing BMC access requests in descending order of the weighted sum value. The processing module is also used to obtain the weighted sum value of all hardware within a preset time period, compare the weighted sum value with a preset threshold, and if the weighted sum value is greater than the preset threshold, process the BMC access requests in descending order of the weighted sum value; if the weighted sum value is less than or equal to the preset threshold, directly process the BMC access requests.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Server heat dissipation method and device, equipment and medium
CN112732053A
BMC-based Kubernetes cluster physical node fault processing method and system
CN114218004A