Server complete machine power consumption test method and system, storage medium and computer equipment

By parsing configuration files and collecting multi-source heterogeneous power consumption data, combined with an external power meter and an internal BMC interface, the accuracy and reliability of server power consumption testing are achieved. This solves the problem of discrepancies between test results and actual environments in existing technologies, and provides fine-grained data support and automated anomaly identification.

CN122044997APending Publication Date: 2026-05-15NINGCHANG INFORMATION TECH (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610079049.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-20
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing server power consumption testing methods are unable to realistically simulate various complex and ever-changing business characteristics, resulting in significant differences between test results and energy efficiency performance in real operating environments, thus limiting the accuracy and reliability of test results.

Method used

By parsing configuration files to directly associate with target business scenarios, and combining multi-source heterogeneous power consumption data collection, the system simultaneously collects overall power consumption data and component-level power consumption data. It adopts a dual-path parallel data acquisition method, including an external power meter and an internal BMC interface, to achieve accurate and synchronous monitoring of energy consumption from the overall system to key components.

Benefits of technology

It ensures the representativeness of power consumption data and the accuracy of test results, can identify energy efficiency bottlenecks and locate high-energy-consuming components, improves the credibility and robustness of test results, supports automated anomaly identification and response mechanisms, and enhances the depth and authenticity of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122044997A_ABST
    Figure CN122044997A_ABST
Patent Text Reader

Abstract

The invention discloses a server overall power consumption testing method and system, a storage medium and computer equipment, and the method comprises the steps: obtaining a configuration file corresponding to a tested server, analyzing the configuration file, and determining a target business scene; according to the target business scene, determining a matched target pressure model from a plurality of preset business scene pressure models, obtaining a pressure toolkit corresponding to the target pressure model, and sending the pressure toolkit to the tested server; remote control is carried out on the tested server, so that a pressure toolkit in the tested server tests the tested server according to a predefined load mode in the target pressure model; in the process that the tested server executes the test, power consumption data are synchronously collected until the test is finished, according to the collected power consumption data, a whole machine power consumption test result of the tested server is generated, and the power consumption data comprise whole machine power consumption data of the tested server and component power consumption data of all components of the tested server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of server testing technology, and in particular to a method and system for testing the power consumption of a server, a storage medium, and a computer device. Background Technology

[0002] With the acceleration of global digitalization and the continuous growth in computing power demand, data centers have become critical infrastructure supporting societal operations, and their energy consumption and efficiency are receiving increasing attention. Driven by the dual-carbon and sustainable development goals, the concept of green computing has gained widespread acceptance, and improving server energy efficiency and reducing overall operating costs and carbon emissions have become common goals pursued by all links in the industry chain. Against this backdrop, conducting scientific and accurate power consumption assessments of servers is not only a key step in measuring product performance and energy efficiency, but also an important basis for optimizing hardware design, improving heat dissipation solutions, and formulating scientific operation and maintenance strategies; its importance is increasingly prominent.

[0003] Currently, the commonly used server power consumption testing methods in the industry typically rely on fixed stress load models, such as using standardized tools to bring components like the CPU, memory, or storage to their nominal full load. While these methods can obtain power consumption data under specific loads, they often fail to realistically simulate various complex and changing business characteristics. This leads to significant differences between the test results and the energy efficiency performance in real-world operating environments, thus limiting the accuracy and reliability of the test results and making them unsuitable for guiding energy consumption optimization and system tuning. Summary of the Invention

[0004] In view of this, this application provides a server whole-machine power consumption testing method and system, storage medium, and computer equipment. By parsing configuration files to directly associate with target business scenarios, the load application can closely match the actual business characteristics of users, thereby ensuring the scenario representativeness of power consumption data. During the test, whole-machine power consumption data and component-level power consumption data are collected simultaneously, realizing accurate synchronous monitoring of energy consumption from two dimensions: the overall system and key components. This provides fine-grained data support for identifying energy efficiency bottlenecks and locating high-energy-consuming components. By combining business scenario-based load generation with multi-source heterogeneous power consumption collection, test results that truly reflect the energy efficiency performance of the server under test under specific business loads can be output, making the test results more accurate.

[0005] According to one aspect of this application, a method for testing the overall power consumption of a server is provided, comprising: Obtain the configuration file corresponding to the server under test, parse the configuration file, and determine the target business scenario; Based on the target business scenario, a matching target stress model is determined from multiple preset business scenario stress models, and a stress toolkit corresponding to the target stress model is obtained and sent to the server under test. The server under test is remotely controlled so that the stress toolkit in the server under test tests the server under test according to the predefined load pattern in the target stress model; During the test of the server under test, power consumption data is collected synchronously until the test ends. Based on the collected power consumption data, the overall power consumption test result of the server under test is generated. The power consumption data includes the overall power consumption data of the server under test, as well as the component power consumption data of each component of the server under test.

[0006] Beneficial effects: By parsing configuration files and directly associating them with target business scenarios, the load application can closely match the actual business characteristics of users, thus ensuring the representativeness of power consumption data across scenarios; during the testing process, the power consumption data of the entire machine and the power consumption data of components are collected simultaneously, realizing accurate and synchronous monitoring of energy consumption from two dimensions: the overall system and key components, providing fine-grained data support for identifying energy efficiency bottlenecks and locating high-energy-consuming components; by combining business scenario-based load generation with multi-source heterogeneous power consumption collection, test results that truly reflect the energy efficiency performance of the server under test under specific business loads can be output, making the test results more accurate.

[0007] Optionally, the power consumption data is collected in the following manner: Determine the network address of the power meter connected to the server under test, and access the power meter based on the network address to remotely collect the first overall power consumption data of the server under test through the power meter; and, Send a remote management command to the BMC interface of the server under test to remotely collect the second overall power consumption data of the server under test, as well as the component power consumption data of each component, through the BMC interface.

[0008] Beneficial effects: Not only does it provide objective and benchmark measurements of total system power consumption through an external power meter, ensuring the physical accuracy of the data, but it also acquires rich and real-time component-level power consumption decomposition data through the internal BMC interface, enabling in-depth analysis of energy consumption composition. This dual-path parallel acquisition method lays the foundation for cross-validation of data to improve reliability, and supports subsequent energy efficiency bottleneck location and root cause analysis through component-level data, thereby facilitating a comprehensive analysis from the overall to the local, from the phenomenon to the cause.

[0009] Optionally, the method further includes: Record the first power consumption data of the whole machine collected through the power meter and the second power consumption data of the whole machine collected through the BMC interface, and record the timestamp corresponding to each data. Based on the timestamp, the first whole machine power consumption data and the second whole machine power consumption data are time aligned, and after the time alignment, the data difference between the first whole machine power consumption data and the second whole machine power consumption data at the same time is calculated. The data difference is compared with a preset difference threshold. If the data difference exceeds the preset difference threshold, an abnormal prompt message is generated to indicate the accuracy of the power consumption data. The generated whole machine power consumption test result is marked based on the abnormal prompt message, or the test is stopped.

[0010] Beneficial effects: It not only transforms the two traditionally isolated types of measurement data into a quality control tool for mutual verification, but also significantly improves the robustness of the entire testing process and the reliability of the results through an automated anomaly identification and response mechanism.

[0011] Optionally, the method further includes: During the testing process of the server under test, the power consumption data of a specified component obtained from the BMC interface of the server under test is monitored in real time. When the power consumption data of the specified component exceeds a preset safety threshold for a duration longer than a preset duration threshold, a first temperature control command is generated to increase the target output temperature of the temperature chamber, and the first temperature control command is sent to the temperature chamber, wherein the temperature chamber is used to adjust the air inlet temperature of the server under test; and / or, The temperature adjustment time node and the corresponding target ambient temperature set for the incubator in the configuration file are determined. When the current time reaches the temperature adjustment time node, a second temperature control command is generated to adjust the target output temperature of the incubator to the corresponding target ambient temperature, and the second temperature control command is sent to the incubator.

[0012] Beneficial effects: Not only can it intelligently respond to abnormal states within the server under test and proactively construct high-fidelity composite stress test scenarios to expose potential system reliability issues, but it can also strictly execute predetermined environmental control logic to ensure the repeatability and planning of test conditions. This dual-mode control, combining passive response and proactive planning, greatly enhances the depth, realism, and automation level of the test, enabling power consumption assessment to be conducted in a more realistic and tightly controlled simulation environment.

[0013] Optionally, after determining the matching target stress model from multiple preset business scenario stress models, the method further includes: Based on the target stress model, determine the test monitoring data indicators corresponding to the server under test, and call the matching monitoring tools; Wherein, when the target stress model is a high-performance computing stress model, the test monitoring data indicators include the operating frequency indicators and / or power consumption status indicators of each CPU core; When the target stress model is a memory throughput stress model, the test monitoring data indicators include memory bandwidth indicators; When the target stress model is an input / output throughput stress model, the test monitoring data indicators include network interface throughput indicators and / or disk throughput indicators; When the target stress model is a whole machine stress test model, the test monitoring data indicators include at least one of the following: CPU power consumption and temperature indicators, memory power consumption and temperature indicators, network interface throughput indicators, and disk throughput indicators. Accordingly, during the testing process of the server under test, the method further includes: Based on the aforementioned test monitoring data indicators, the corresponding test monitoring data is collected using the aforementioned monitoring tool.

[0014] Beneficial effects: Driven by the target stress model, the most targeted deep monitoring system is automatically built. This can not only reveal system bottlenecks and sources of anomalies in real time during the testing process, such as determining whether the performance decline is due to CPU downclocking, insufficient memory bandwidth or excessive disk latency, but also provide indispensable, multi-dimensional internal system status information for subsequent analysis of the relationship between power consumption and performance and for locating key points for energy efficiency optimization.

[0015] Optionally, during the testing process of the server under test, the method further includes: Receive and parse system logs from the server under test in real time to identify whether there are system error events on the server under test based on the system logs, and to identify whether the test monitoring data exceeds the preset safety range corresponding to the matching test monitoring data indicators; When a system error event is detected and / or the test monitoring data of the test monitoring data indicators exceeds the corresponding preset safety range, the target time window corresponding to the current time is determined, and the test monitoring data and power consumption data within the target time window are obtained. Based on the test monitoring data and power consumption data within the target time window, as well as the target business scenario, an anomaly pattern and / or root cause are output through a preset anomaly analysis model.

[0016] Beneficial effects: By accurately correlating and reconstructing the context of system logs, test monitoring data, and power consumption data on the timeline, and using a preset anomaly analysis model for intelligent reasoning, errors and out-of-limit indicators that occur during testing can be automatically transformed into anomaly patterns and root causes with clear directional characteristics. This greatly reduces the time and manpower costs required from discovering a problem to locating the cause, and provides a basis for rapid troubleshooting and optimizing system reliability.

[0017] Optionally, when there are multiple target business scenarios, parsing the configuration file to determine the target business scenario includes: The configuration file is parsed to determine each target business scenario and the business weight configured for each target business scenario; The step of determining a matching target stress model from multiple preset business scenario stress models based on the target business scenario includes: Based on each target business scenario, a baseline stress model matching each target business scenario is determined from multiple preset business scenario stress models. Based on the business weights corresponding to each target business scenario, the system resource quota and time slice scheduling strategy occupied by each baseline stress model are calculated. Based on the system resource quota and time slice scheduling strategy, the stress tools and test parameters contained in each benchmark stress model are fused to generate the target stress model.

[0018] Beneficial effects: By introducing business weights and system resource scheduling strategies, complex loads that closely resemble real mixed business environments can be intelligently synthesized. This not only greatly improves the realism and coverage of test scenarios, making power consumption assessment results more valuable, but also significantly reduces the workload of manually designing complex composite test cases and improves testing efficiency through an automated benchmark stress model fusion process.

[0019] According to another aspect of this application, a server power consumption testing system is provided, including a testing device; the testing device is used to perform the following operations: Obtain the configuration file corresponding to the server under test, parse the configuration file, and determine the target business scenario; Based on the target business scenario, a matching target stress model is determined from multiple preset business scenario stress models, and a stress toolkit corresponding to the target stress model is obtained and sent to the server under test. The server under test is remotely controlled so that the stress toolkit in the server under test tests the server under test according to the predefined load pattern in the target stress model; During the test of the server under test, power consumption data is collected synchronously until the test ends. Based on the collected power consumption data, the overall power consumption test result of the server under test is generated. The power consumption data includes the overall power consumption data of the server under test, as well as the component power consumption data of each component of the server under test.

[0020] According to another aspect of this application, a storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the above-described server power consumption testing method.

[0021] According to another aspect of this application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the program to implement the above-described server power consumption testing method.

[0022] Using the above technical solution, this application provides a server overall power consumption testing method and system, storage medium, and computer equipment. First, a configuration file specifically prepared for the server under test is obtained and parsed to determine the target business scenario to be simulated in this test. Next, based on the target business scenario determined in the previous step, the corresponding target stress model is intelligently matched from a pre-set model library, and the associated stress toolkit is obtained and sent to the server under test. Then, the stress toolkit on the server under test is started via remote control commands, causing it to run according to the predefined load mode in the target stress model. During the continuous load test, the test equipment can synchronously perform power consumption data collection until the test completion requirements are met. The collected power consumption data can include two types: overall system power consumption data and fine-grained component power consumption data. Finally, all collected power consumption data is collected and analyzed to generate a comprehensive overall system power consumption test result. This application embodiment directly associates target business scenarios by parsing configuration files, enabling the load application to closely match the actual business characteristics of users, thereby ensuring the scenario representativeness of power consumption data. During the testing process, it simultaneously collects whole-machine power consumption data and component-level power consumption data, realizing accurate synchronous monitoring of energy consumption from two dimensions: the overall system and key components. This provides fine-grained data support for identifying energy efficiency bottlenecks and locating high-energy-consuming components. By combining business scenario-based load generation with multi-source heterogeneous power consumption collection, it can output test results that truly reflect the energy efficiency performance of the tested server under specific business loads, making the test results more accurate.

[0023] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0024] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating a server power consumption testing method provided in an embodiment of this application is shown. Figure 2 This illustration shows a schematic diagram of a server power consumption testing device provided in an embodiment of this application. Figure 3 This illustration shows a schematic diagram of a server power consumption testing system provided in an embodiment of this application. Figure 4 A schematic diagram of the device structure of a computer device provided in an embodiment of this application is shown. Detailed Implementation

[0025] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.

[0026] This embodiment provides a method for testing the overall power consumption of a server, such as... Figure 1 As shown, the method includes: Step 101: Obtain the configuration file corresponding to the server under test, parse the configuration file, and determine the target business scenario.

[0027] Step 102: Based on the target business scenario, determine the matching target pressure model from multiple preset business scenario pressure models, obtain the pressure toolkit corresponding to the target pressure model, and send the pressure toolkit to the server under test.

[0028] Step 103: Remotely control the server under test so that the stress toolkit in the server under test tests the server under test according to the predefined load mode in the target stress model.

[0029] Step 104: During the test of the server under test, power consumption data is collected synchronously until the test ends. Based on the collected power consumption data, the overall power consumption test result of the server under test is generated. The power consumption data includes the overall power consumption data of the server under test and the component power consumption data of each component of the server under test.

[0030] This application provides a server power consumption testing method that can be applied to testing equipment. By constructing a complete automated link from business scenario definition to accurate load simulation and multi-dimensional data collection, it achieves accurate evaluation of the server's energy efficiency performance under simulated real workload. This transforms the user's business intent into an executable test task and obtains comprehensive energy consumption information from the whole machine to the component level through collaborative control and synchronous monitoring.

[0031] Specifically, the first step is to obtain and parse the configuration file specifically prepared for the server under test to determine the target business scenario to be simulated in this test. This configuration file can be a pre-edited text file that defines key parameters such as the network address of the server under test and the test duration. The target business scenario specifies the type of real workload that the server under test should simulate, such as a high-performance computing scenario for scientific computing or a database service scenario handling massive requests. This step transforms the user's verbal testing intent into explicit instructions that the system can recognize and process, establishing a precise starting point and direction for the entire testing process.

[0032] Next, based on the target business scenario determined in the previous step, the corresponding target stress model is intelligently matched from the pre-set model library, and the associated stress toolkit is obtained and sent to the server under test. Here, the pre-set business scenario stress model can be load generation logic designed and verified by technical personnel for each typical business scenario (such as compute-intensive, memory-intensive, etc.); while the stress toolkit is a collection of executable programs or scripts encapsulated according to this logic that can be run directly within the server operating system. This enables automatic mapping and deployment from abstract business scenarios to specific, executable load generation programs, ensuring that the subsequently applied load can truly reflect the resource usage characteristics of the business scenario.

[0033] Then, the stress testing toolkit on the server under test is started via remote control commands, causing it to run according to the predefined load mode in the target stress model. Here, remote control can be achieved using network management protocols such as SSH and IPMI, allowing the test device to control the server under test without physical contact; the load mode specifies in detail how the stress testing toolkit should call CPU cores, occupy memory bandwidth, or initiate disk I / O requests to accurately simulate the system behavior under the target business scenario.

[0034] During the continuous load test, the test equipment can simultaneously collect power consumption data until the test completion requirements are met. The collected power consumption data can include two types: overall system power consumption data and fine-grained component power consumption data. Finally, all collected power consumption data are collected and analyzed to generate a comprehensive overall system power consumption test result.

[0035] By applying the technical solution of this embodiment, firstly, a configuration file specifically prepared for the server under test is obtained and parsed to determine the target business scenario to be simulated in this test. Next, based on the target business scenario determined in the previous step, the corresponding target stress model is intelligently matched from a pre-set model library, and the associated stress toolkit is obtained and sent to the server under test. Then, the stress toolkit on the server under test is started via remote control commands, causing it to run according to the predefined load mode in the target stress model. During the continuous load test, the test equipment can synchronously perform power consumption data collection until the test completion requirements are met. The collected power consumption data can include two types: overall system power consumption data and fine-grained component power consumption data. Finally, all collected power consumption data is collected and analyzed to generate a comprehensive overall system power consumption test result. This application embodiment directly associates target business scenarios by parsing configuration files, enabling the load application to closely match the actual business characteristics of users, thereby ensuring the scenario representativeness of power consumption data. During the testing process, it simultaneously collects whole-machine power consumption data and component-level power consumption data, realizing accurate synchronous monitoring of energy consumption from two dimensions: the overall system and key components. This provides fine-grained data support for identifying energy efficiency bottlenecks and locating high-energy-consuming components. By combining business scenario-based load generation with multi-source heterogeneous power consumption collection, it can output test results that truly reflect the energy efficiency performance of the tested server under specific business loads, making the test results more accurate.

[0036] Optionally, in this embodiment, the power consumption data is collected in the following manner: determining the network address of the power meter connected to the server under test, accessing the power meter according to the network address, and remotely collecting the first overall power consumption data of the server under test through the power meter; and sending a remote management command to the BMC interface of the server under test, and remotely collecting the second overall power consumption data of the server under test, as well as the component power consumption data of each component, through the BMC interface.

[0037] In this embodiment, by constructing a parallel monitoring architecture that coordinates internal and external systems for the server under test, the high-precision measurement of the external overall power consumption is combined with the fine-grained perception of the internal component-level power consumption, thereby achieving accurate analysis of the power consumption of the server under test.

[0038] First, the network address of the power meter physically connected to the server under test is determined and accessed to remotely obtain the initial power consumption data of the entire system. Here, the power meter is an independent, high-precision measuring instrument connected to the power supply line of the server under test, capable of directly measuring the total electrical energy consumption from the power grid input to the server. By configuring an independent network address (such as an IP address) for it, the testing equipment can remotely access its data interface via network protocols (such as TCP / IP) and call the corresponding software tools to read voltage, current, and calculated power values ​​in real time, thereby obtaining objective and direct external power consumption data of the entire system.

[0039] Simultaneously, remote management commands are sent in parallel to the Baseboard Management Controller (BMC) interface of the server under test to collect a second set of overall system power consumption data and power consumption data of individual components. The BMC is a dedicated management chip built into the motherboard of the server under test. It is independent of the host operating system and can continuously monitor the operating status and power consumption of key components such as CPU, memory, and GPU through sensors. The test equipment can remotely request the BMC to report the data it has collected by sending standard Intelligent Platform Management Interface (IPMI) commands (using tools such as ipmitool). This data not only includes the overall power consumption estimate of the server as a whole, but more importantly, it includes the detailed power consumption values ​​of each hardware component, thus providing fine-grained energy consumption observed from the internal perspective of the server under test.

[0040] This application not only provides objective and benchmark measurements of the total system power consumption through an external power meter, ensuring the physical accuracy of the data, but also acquires rich and real-time component-level power consumption decomposition data through the internal BMC interface, enabling in-depth analysis of energy consumption composition. This dual-path parallel acquisition method lays the foundation for cross-validation of data to improve reliability, and supports subsequent energy efficiency bottleneck location and root cause analysis through component-level data, thereby facilitating a comprehensive analysis from the whole to the part, and from phenomena to causes.

[0041] Optionally, in this embodiment, the method further includes: recording first system power consumption data collected by the power meter and second system power consumption data collected by the BMC interface, and recording the timestamps corresponding to each data; performing time alignment processing on the first system power consumption data and the second system power consumption data based on the timestamps, and calculating the data difference between the first system power consumption data and the second system power consumption data at the same time after time alignment processing; comparing the data difference with a preset difference threshold, and if the data difference exceeds the preset difference threshold, generating an abnormal prompt message to indicate the accuracy of the power consumption data, so as to mark the generated system power consumption test result based on the abnormal prompt message, or indicate the test to stop.

[0042] In this embodiment, by introducing timing alignment and cross-validation mechanisms, a real-time quality assessment and feedback loop is established for the power consumption data acquired from both channels.

[0043] First, the collected power consumption data of the two types were standardized and recorded, and a precise timestamp was added to each data point. Here, the timestamp refers to the system time stamp when the data was recorded. Since the power meter and BMC are independent devices, the data streams they generate have different timing characteristics. By assigning a unified benchmark timestamp to the first power consumption data from the power meter and the second power consumption data from the BMC, a foundation can be laid for subsequent accurate timing correlation analysis, thus enabling direct comparison of heterogeneous data sources.

[0044] Subsequently, time alignment is performed on the two data streams based on timestamps, that is, matching data points from different sources but representing the same physical moment on the timeline. After alignment, for each identical time point, the numerical difference between the first and second system power consumption data is calculated. This data difference physically reflects the deviation between the externally measured value and the internally reported value, and its causes may involve measurement principle errors, sensor accuracy, data reporting delays, or system losses.

[0045] Finally, the calculated real-time data difference is compared with a preset difference threshold. This preset threshold can be determined based on test accuracy requirements, the equipment's nominal error range, or historical experience values. If the data difference exceeds this threshold at any given time, it indicates a significant discrepancy between the results obtained from the two independent measurement methods. A clear anomaly alert is then generated. This alert can be used to mark the final test results as abnormal, prompting data analysts to treat the relevant data segments with caution. It can also serve as a basis for automatic decision-making in cases of severe deviation, triggering a pause in the test process to prevent continued invalid testing when data reliability is questionable.

[0046] The embodiments of this application not only transform the two traditionally isolated types of measurement data into a quality control tool for mutual verification, but also significantly improve the robustness of the entire testing process and the reliability of the results through an automated anomaly identification and response mechanism.

[0047] Optionally, in this embodiment of the application, the method further includes: during the test performed by the server under test, real-time monitoring of the component power consumption data of a specified component obtained from the BMC interface of the server under test; when the component power consumption data of the specified component exceeds a preset safety threshold for a duration longer than a preset duration threshold, generating a first temperature control command for increasing the target output temperature of the temperature chamber, and sending the first temperature control command to the temperature chamber, wherein the temperature chamber is used to adjust the air inlet temperature of the server under test; and / or, determining the temperature adjustment time node and the corresponding target ambient temperature set for the temperature chamber in the configuration file, and when the current time reaches the temperature adjustment time node, generating a second temperature control command for adjusting the target output temperature of the temperature chamber to the corresponding target ambient temperature, and sending the second temperature control command to the temperature chamber.

[0048] In this embodiment, an intelligent environmental control strategy is also introduced during the testing of the server under test. This strategy deeply integrates the internal working state of the server under test and the preset test plan with the environmental regulation of the external temperature chamber, thereby achieving dynamic and precise management of the test conditions.

[0049] Specifically, during the testing process, real-time power consumption data of specific components (such as CPU or GPU) obtained through the BMC interface can be continuously monitored. When the power consumption data of any specified component continuously exceeds a preset safety threshold for a duration that reaches a preset duration threshold, the component is determined to be under abnormally high power consumption stress. To simulate the extreme operating conditions that the server under test may encounter in real-world scenarios, namely the "compound stress" scenario of high load and high temperature environment, a clear temperature rise command, namely the first temperature control command, can be automatically generated and sent to the temperature chamber to instruct it to increase the target output temperature, thereby artificially raising the temperature of the server under test's air intake and actively constructing a high-temperature testing environment.

[0050] Simultaneously or independently, it also supports time-based programmed environmental control. Specifically, by parsing the configuration file, it reads the pre-set temperature adjustment time nodes for the chamber and the target ambient temperature corresponding to each node. When the current time of the test process reaches any preset temperature adjustment time node, a second temperature control command can be automatically generated and sent to the chamber, instructing it to adjust the target output temperature to the value specified for that node. This allows the test environment to change automatically according to the pre-designed configuration file without manual intervention.

[0051] This application's embodiments not only intelligently respond to abnormal states within the server under test and proactively construct high-fidelity composite stress test scenarios to expose potential system reliability issues, but also strictly execute predetermined environmental control logic to ensure the repeatability and planning of test conditions. This dual-mode control, combining passive response and proactive planning, greatly enhances the depth, realism, and automation level of the test, enabling power consumption assessment to be conducted in a more realistic and tightly controlled simulation environment.

[0052] In this embodiment of the application, optionally, after step 102, which involves "determining a matching target stress model from multiple preset business scenario stress models", the method further includes: determining the test monitoring data indicators corresponding to the server under test based on the target stress model, and calling a matching monitoring tool; wherein, when the target stress model is a high-performance computing stress model, the test monitoring data indicators include the operating frequency indicators and / or power consumption status indicators of each CPU core; when the target stress model is a memory throughput stress model, the test monitoring data indicators include memory bandwidth indicators; when the target stress model is an input / output throughput stress model, the test monitoring data indicators include network interface throughput indicators and / or disk throughput indicators; when the target stress model is a whole-machine stress test model, the test monitoring data indicators include at least one of the following: CPU power consumption and temperature indicators, memory power consumption and temperature indicators, network interface throughput indicators, and disk throughput indicators; Accordingly, during the testing process of the server under test, the method further includes: collecting corresponding test monitoring data through the monitoring tool based on the test monitoring data indicators.

[0053] In this embodiment, important indicators can be monitored and collected during each business scenario test, which can then be used to identify inefficient parts of the system operation and the reasons for system errors during high-stress testing.

[0054] Specifically, based on the selected target stress model, the system can intelligently determine the key test monitoring data indicators that require focused attention and automatically invoke matching professional monitoring tools. Here, test monitoring data indicators refer to key parameters that reflect the health status and performance of the server under test under specific stress, while monitoring tools are command-line or software tools such as turbostat, PCM, and sar that can collect these parameters at the operating system or hardware level. Through predefined rules, different stress models can be associated with a specific set of test monitoring data indicators and monitoring tools, thereby achieving automated and precise configuration of test monitoring strategies.

[0055] When the target stress model is a high-performance computing stress model simulating computationally intensive tasks, the monitoring focus can be clearly placed on the central processing unit (CPU). Therefore, the determined test monitoring data indicators mainly include the real-time operating frequency and power consumption status of each CPU core. This can be achieved by calling tools such as turbostat that can read CPU hardware performance counters to observe whether the CPU maintains the expected turbo frequency under high load and whether its power consumption is within the normal range.

[0056] When the target stress model is a memory throughput stress model designed for the memory subsystem, the monitored test data metrics become memory bandwidth. Specifically, specialized tools such as the Performance Counter Monitoring Tool (PCM) can be used to measure and report the data read and write bandwidth of each memory channel or slot in real time, thereby accurately assessing whether the throughput of the memory subsystem under high pressure meets expectations and whether there are bottlenecks.

[0057] When the target stress model simulates the input / output throughput stress model of a data-intensive application, the monitored test data metrics become the data throughput of the network interface and the read / write throughput of the disk. Accordingly, comprehensive system monitoring tools such as sar (System Activity Reporter) can be used to continuously collect key data such as the packet rate sent / received by the network card and the disk IOPS (Input / Output Operations Per Second) to evaluate the I / O performance of the server under test when handling a large number of network requests or frequent disk accesses.

[0058] For the most complex system-wide load testing models, which require simultaneous stress on all major subsystems of the server under test (CPU, memory, disk, network, and even GPU), the monitoring scheme is also the most comprehensive. In this case, a comprehensive set of test monitoring data metrics can be determined, including CPU and memory power consumption and temperature, network and disk throughput, etc. To achieve this comprehensive monitoring, multiple tools can be used in tandem. For example, PTAT or ipmitool can be used to monitor CPU and memory power consumption and temperature, while sar can be used to monitor network and disk activity, thereby obtaining detailed status of each key component under global load.

[0059] Finally, during the entire test execution phase, these invoked monitoring tools can be driven to run continuously according to the preset sampling interval, and the raw test monitoring data output by these monitoring tools corresponding to the above indicators can be collected. Subsequently, these test monitoring data can be used to identify inefficient links in the system operation, as well as the causes of system errors during high-stress testing.

[0060] This application embodiment uses a target stress model to automatically build the most targeted deep monitoring system. This can not only reveal system bottlenecks and sources of anomalies in real time during the testing process, such as determining whether the performance decline is due to CPU downclocking, insufficient memory bandwidth or excessive disk latency, but also provide indispensable, multi-dimensional internal system state information for subsequent analysis of the relationship between power consumption and performance and for locating key points for energy efficiency optimization.

[0061] Optionally, during the testing process of the server under test, the method further includes: receiving and parsing system logs from the server under test in real time, to identify whether the server under test has a system error event based on the system logs, and to identify whether the test monitoring data exceeds a preset safety interval corresponding to a matching test monitoring data indicator; when a system error event is identified and / or the test monitoring data of the test monitoring data indicator exceeds the corresponding preset safety interval, determining a target time window corresponding to the current time, and obtaining the test monitoring data and power consumption data within the target time window; based on the test monitoring data and power consumption data within the target time window, and the target business scenario, outputting an anomaly mode and / or anomaly root cause through a preset anomaly analysis model.

[0062] In this embodiment, an automated diagnostic process from anomaly detection to root cause inference is constructed by integrating and intelligently analyzing real-time system logs, multi-dimensional performance indicators, and precise power consumption data on a unified timeline.

[0063] First, during the testing process, system log streams from the server under test are continuously received and parsed. These system logs are time-series text records generated by the operating system kernel, critical services, and hardware drivers during runtime, often containing critical event information such as errors and warnings. By parsing these system log streams in real time, it's possible to proactively identify whether they record explicit system error events such as kernel exceptions or hardware errors. Simultaneously, real-time test monitoring data (such as CPU frequency and memory bandwidth) is compared with the preset safety ranges corresponding to the current target stress model (i.e., predefined normal value ranges for various indicators, such as CPU temperature limits and network packet loss rate thresholds) to identify abnormal performance exceeding limits.

[0064] An anomaly is identified when any system error event and / or test monitoring data metric exceeds a preset safety range. Subsequently, a target time window of a preset duration is extended forward and backward from the time of this anomaly. Once this window is defined, all timestamp-aligned test monitoring data and power consumption data within this target time window can be retrieved from storage. This data collectively reflects the state of the server under test before and after the anomaly, providing complete contextual information for analysis; for example, whether power consumption and temperature had already shown a continuous increase before the CPU error occurred.

[0065] Finally, the test monitoring data, power consumption data, and target business scenarios within the aforementioned target time window are input into a pre-defined anomaly analysis model. This model can be a rule-based inference engine or a trained machine learning model. It analyzes the correlation patterns of various data before and after the anomaly (e.g., whether memory errors are accompanied by a surge in memory power consumption and a sharp drop in bandwidth), and combines this with the target business scenario (e.g., whether the scenario places extreme pressure on memory), performing comprehensive inference and pattern matching to ultimately output a diagnostic conclusion. This conclusion can indicate the anomaly's manifestation pattern (e.g., intermittent errors caused by memory overheating) and infer the root cause of the anomaly (e.g., insufficient heat dissipation or poor memory module quality).

[0066] In one specific embodiment, the test monitoring data, power consumption data, and target business scenario within the target time window are input into a preset anomaly analysis model to perform the following operations through the predictive anomaly analysis model: Based on the target business scenario, target performance index data is selected from the test monitoring data, and corresponding component power consumption data is selected from the power consumption data. Based on the target performance index data and the corresponding component power consumption data, analyze the degree of conformity with the expected load characteristics of the target business scenario, determine whether there is an abnormal scenario load, and obtain the first judgment result; Based on the first overall power consumption data from the power meter and the second overall power consumption data from the BMC interface, a consistency check is performed to determine whether there is a data acquisition anomaly, and a second judgment result is obtained. When the target business scenario is a high-performance computing stress type or a whole machine stress test type, analyze the correlation between the power consumption change trend of the specified component in the power consumption data and the temperature change trend of the corresponding component in the test monitoring data, determine whether there is a heat dissipation correlation anomaly, and obtain a third judgment result; Based on at least one of the first judgment result, the second judgment result, and the third judgment result, output the corresponding abnormal pattern and inferred root cause.

[0067] In this embodiment, firstly, various types of data within the target time window and the target business scenario for this test are received as input to a preset anomaly analysis model. Based on this target business scenario, the preset anomaly analysis model can intelligently filter out the target performance indicator data most relevant to the scenario from the messy raw test monitoring data. For example, for a high-performance computing stress scenario, the model can focus on CPU-related indicators; simultaneously, it extracts the component power consumption data corresponding to these performance indicators from the power consumption data, such as the CPU's power consumption. This step ensures that subsequent analysis focuses on the core issues and eliminates interference from irrelevant data.

[0068] Next, using the target performance metrics data and corresponding component power consumption data selected in the previous step, they are compared with the expected load characteristics that the current target business scenario should possess. Here, the expected load characteristics are theoretical or empirical load models pre-defined according to the scenario definition. For example, in a high-performance computing stress scenario, CPU utilization should remain consistently high. The preset anomaly analysis model analyzes the degree of conformity between actual data and expected characteristics to determine whether the server under test is truly performing the preset stress load, thus obtaining the first judgment result. This can help identify false load issues caused by incorrect operation of stress testing tools or abnormal system scheduling.

[0069] Then, a pre-defined anomaly analysis model is executed in parallel to verify data acquisition anomalies. Specifically, this is based on the first set of total power consumption data directly measured by an external power meter, and the second set of total power consumption data aggregated and reported by the internal BMC interface of the server under test. The pre-defined anomaly analysis model performs consistency verification on these two sets of data, which theoretically should represent the total power consumption of the same server under test, by calculating their difference or deviation rate at the same time. If the deviation consistently exceeds a reasonable error range (e.g., greater than 5%), a data acquisition anomaly is determined, resulting in a second judgment. This effectively identifies underlying data quality issues such as power meter calibration drift, BMC sensor failure, or data transmission errors, ensuring the reliability of all subsequent analyses from the source.

[0070] Subsequently, the preset anomaly analysis model can selectively initiate more in-depth thermal correlation anomaly analysis based on the type of target business scenario. This analysis primarily targets high-performance computing stress or system-wide stress testing scenarios that generate continuous high heat and are sensitive to heat dissipation. In these scenarios, the preset anomaly analysis model can specifically analyze the correlation between the power consumption change trend and the temperature change trend of a specified component (usually the CPU or GPU). When the cooling system is working normally, an increase in power consumption should be accompanied by a steady increase in temperature; if there is a small increase in power consumption but a sharp rise in temperature, or a significant disconnect between power consumption and temperature changes, it may indicate a bottleneck in heat dissipation. Through this type of correlation analysis, the preset anomaly analysis model can determine whether there are any thermal correlation anomalies and obtain a third judgment result.

[0071] Finally, the pre-defined anomaly analysis model can synthesize the first, second, and third judgment results mentioned above to output the corresponding anomaly pattern and inferred root cause. For example, when both scenario load anomaly (insufficient CPU load) and heat dissipation-related anomaly (abnormally high CPU temperature) occur simultaneously, the pre-defined anomaly analysis model can infer that the root cause is "the CPU cannot reach full load due to overheating and frequency throttling," rather than a simple stress test failure. Based on this comprehensive judgment, the pre-defined anomaly analysis model ultimately outputs a structured diagnostic conclusion, clearly indicating the identified anomaly pattern (such as insufficient load accompanied by overheating) and its inferred root cause (such as performance limitation due to poor heat dissipation).

[0072] This application embodiment accurately correlates and reconstructs the context of system logs, test monitoring data, and power consumption data on the timeline, and uses a preset anomaly analysis model for intelligent reasoning. It can automatically transform errors and out-of-limit indicators that occur during the test into anomaly patterns and root causes with clear directional characteristics. This greatly reduces the time and manpower costs required from discovering a problem to locating the cause, and provides a basis for rapid troubleshooting and optimizing system reliability.

[0073] Optionally, in the case of multiple target business scenarios, step 101, "parse the configuration file to determine the target business scenario," includes: parsing the configuration file to determine each target business scenario and the business weight configured for each target business scenario; step 102, "determine the matching target pressure model from multiple preset business scenario pressure models based on the target business scenario," includes: determining the baseline pressure model matching each target business scenario from multiple preset business scenario pressure models based on each target business scenario, and calculating the system resource quota and time slice scheduling strategy occupied by each baseline pressure model based on the business weight corresponding to each target business scenario; and fusing the pressure tools and test parameters contained in each baseline pressure model according to the system resource quota and time slice scheduling strategy to generate the target pressure model.

[0074] In this embodiment, the configuration file is first parsed to handle complex testing requirements involving multiple target business scenarios. The configuration file is a user-edited text file that lists the multiple target business scenarios to be simulated (e.g., both "big data analytics" and "real-time stream processing") and assigns a specific business weight to each scenario. Here, the business weight can be a proportional value representing the importance of that business scenario in the overall composite load or the expected resource allocation; for example, it could be set to "big data analytics: 0.6" and "real-time stream processing: 0.4". Through parsing, the user's qualitative description is transformed into quantifiable, multi-task concurrent test objectives.

[0075] Next, based on each target business scenario identified, a corresponding independent benchmark stress model is selected from multiple pre-defined business scenario stress models. Each benchmark stress model is a pre-optimized standard solution containing specific stress tools and parameters to simulate a single business scenario. Then, based on the previously obtained business weights, the system resource quota and time-slice scheduling strategy to be used for each found benchmark stress model are calculated. The system resource quota determines how many CPU cores, memory capacity, and other hardware resources the corresponding load of the benchmark stress model can occupy during testing; the time-slice scheduling strategy plans whether these loads are executed concurrently or in a time-sharing manner on the test timeline, and their respective runtimes.

[0076] Finally, based on the calculated detailed scheduling plan, the fusion operation is executed. Specifically, it's not simply running multiple benchmark stress models in parallel, but rather deconstructing, reorganizing, and coordinating the stress tools (such as CPU stress programs and memory bandwidth testing tools) and their test parameters (such as the number of threads and data block size) contained in each benchmark stress model according to system resource quotas and time-slice scheduling policies. For example, the CPU stress tools from two benchmark stress models can be merged, and CPU cores can be allocated according to their quotas; or the network load tool from one benchmark stress model can be executed concurrently with the disk load tool from another benchmark stress model. Through this fine-grained orchestration, a single, composite target stress model is dynamically generated. This new model is an executable, unified test scheme capable of accurately simulating multiple business loads running in a specific ratio on a single server under test.

[0077] This application's embodiments, by introducing business weights and system resource scheduling strategies, can intelligently synthesize complex loads that closely resemble real mixed business environments. This not only greatly improves the realism and coverage of test scenarios, making power consumption assessment results more valuable, but also significantly reduces the workload of manually designing complex composite test cases and improves testing efficiency through an automated benchmark stress model fusion process.

[0078] In a specific embodiment, the time-slice scheduling strategy for each benchmark stress model is calculated based on the business weight corresponding to each target business scenario, including: analyzing the resource demand characteristics of each benchmark stress model; and formulating a hybrid time-slice scheduling strategy based on the business weight and the resource demand characteristics of each benchmark stress model. The hybrid time-slice scheduling strategy includes at least two different execution modes, including a first mode that enables multiple benchmark stress models to be executed concurrently, and a second mode that enables multiple benchmark stress models to be executed alternately in a time-sharing manner.

[0079] If the resource demand characteristics of the multiple benchmark stress models indicate that the resource demand types are complementary, then a hybrid time-slice scheduling strategy including the first mode is formulated; if the resource demand characteristics of the multiple benchmark stress models indicate that the resource demand types are overlapping, then a hybrid time-slice scheduling strategy including the second mode is formulated, so that each benchmark stress model can exclusively occupy overlapping resources in a time-sharing manner.

[0080] Furthermore, as a refinement and extension of the specific implementation of the above embodiments, and to fully illustrate the specific implementation process of this embodiment, a server power consumption testing device is provided, applied to the control end (i.e., the aforementioned testing equipment), such as... Figure 2 As shown, the device includes a pressure model intelligent adaptation module, a real-time power consumption data acquisition module, and a temperature chamber remote closed-loop control module.

[0081] Specifically, before using the server power consumption testing device, you can first edit the configuration file, name it "config file," and the parameters involved can be as follows: [Server under test] sut_os_ip = "10.xx.xx.xx" # The system IP of the server under test; sut_bmc_ip="10.xx.xx.xx" # The BMC IP of the server under test; model = "High Performance Compute" # Target business scenario; run_time = "43200" # Test duration; [Incubator] thermal_ip = "10.xx.xx.xx" # The IP address of the incubator; thermal_port = "8888" # Port of the thermal chamber; temperature = "25" # Set the ambient temperature of the incubator; [Power Meter] power_ip = “10.xx.xx.xx” # The IP address of the power meter; [Target Business Scenario] model = “Full loading” # Select the target load model based on the provided preset business scenario model; sampling_interval = “1s” # Power consumption data sampling interval; power_diff = "5%" #Optional, based on customer needs. Defines the measurement difference standard between the power meter's total power consumption and the BMC's total power consumption; defines the difference between the previous round of data and the current round of data; before_result = "600W" # Optional, based on customer needs. Defines the power consumption of the previous round; After the configuration file is determined, the control terminal performs the following operations: The stress model intelligent adaptation module: based on the target business scenario in the configuration file (i.e. Figure 2 The system automatically selects the stress branch based on the business model in the test. Specifically, it can match the target stress model from the preset business scenario stress models based on the target business scenario, and then send the stress toolkit corresponding to the target stress model to the server under test (i.e., the server in the test). Figure 2 (The tested server). Remotely schedule the tested server to execute a matching target stress model, allowing the tested server to simulate actual business load behavior and achieve a strong correlation between test power consumption and real-world scenarios.

[0082] The business scenarios can include: high-performance computing stress scenarios, memory throughput scenarios, input / output throughput scenarios, and system load testing scenarios. High-performance computing stress scenarios (such as engineering design simulation, meteorological forecasting, and financial and economic modeling) refer to using computers to handle a large number of complex computational tasks. These are commonly used in research institutions and government departments, primarily putting pressure on the CPU to ensure continuous computation under high load. Memory throughput scenarios (such as big data analysis, real-time computing, multimedia processing, and image rendering) refer to application scenarios requiring high memory bandwidth. These scenarios involve large-scale parallel data processing and frequent memory access, placing high demands on memory bandwidth. Input / output throughput scenarios (such as web services, database read / write, and streaming media processing) are mainly used for efficient data read / write and transmission applications, where the server needs to handle a large amount of data transmission between network devices. System load testing scenarios (default stress model) refer to simultaneously stress testing the server's CPU, memory, hard drive, network card, GPU, and other devices to measure the reliability and stability of the entire server under full load.

[0083] The stress model intelligent adaptation module can also execute data acquisition schemes. Specifically, this module can provide test monitoring data acquisition functions. When conducting tests for each business scenario, it is necessary to monitor and collect corresponding test monitoring data indicators to identify inefficient links in system operation and the causes of system errors during high-stress testing.

[0084] Real-time power consumption data acquisition module: On one hand, it can remotely acquire real-time power consumption, current, and voltage data of the power meter; on the other hand, it can also remotely acquire data such as total power consumption, power consumption of individual components, and temperature. Before testing, connect the power meter and obtain its IP address. Simultaneously, use the BMC interface of the server under test to capture instantaneous power consumption values ​​of the CPU, GPU, memory, network card, hard drive, and the entire system. The sampling interval can be customized in the configuration. The control terminal remotely acquires the power consumption of each component and the total power consumption of the server under test by sending the ipmitool command.

[0085] In addition, the real-time power consumption data acquisition module can automatically store and record the timestamps of the acquired data, align the timestamps, and compare the first whole-machine power consumption data obtained by the power meter with the second whole-machine power consumption data obtained by the BMC interface for double verification. The difference between the two can be customized in the configuration, for example, not exceeding 5%. If it exceeds the defined standard, it will investigate the accuracy and fluctuation of the power consumption data obtained by the BMC interface and power meter.

[0086] In addition, the real-time power consumption data acquisition module can also compare the average power consumption of the previous round with the average power consumption of the current round to measure whether the fluctuation of the tested server under high load power consumption conditions is within the standard range.

[0087] Remote closed-loop control module for incubator: Supports integration with third-party incubator equipment (supports TCP / IP control interface). This module allows for remote setting of environmental parameters such as temperature and humidity.

[0088] In addition, the temperature chamber remote closed-loop control module can also be linked with the two modules mentioned above. The linkage strategy is as follows: if an abnormal increase in the power consumption of the server component under test is detected, the temperature of the temperature chamber can be automatically adjusted to simulate a high-temperature load response scenario; or the ambient temperature can be dynamically adjusted according to the test plan to keep the temperature of the air inlet of the server under test at the set ambient temperature and observe the trend of the power consumption curve.

[0089] During the test, the stress duration (i.e., test duration) of the server under test can be monitored in real time to see if it meets the requirements. Specifically, the overall running time can be controlled according to the preset test duration. When the stress duration reaches the preset test duration: a. The control unit collects test logs, monitoring data, power data, etc. b. The temperature and humidity data of the incubator are transmitted back to the control terminal in real time and plotted as curves, which facilitates the observation of the ambient temperature changes of the server under test during the test. c. The control terminal summarizes the real-time power consumption data, plots the power consumption curve of the whole machine (power meter, BMC interface), and marks the fluctuation data that exceeds the power consumption value and the power consumption change curve of each component; d. Package all data, charts, and logs to generate the final system power consumption test results.

[0090] In this embodiment, the following features are highlighted: High compatibility: Supports customized stress models based on customer business needs, ensuring strong coupling between test scenarios and real application scenarios, and improving the representativeness and accuracy of power consumption assessment; High real-time performance: Remote power meter and BMC interface enable synchronous acquisition of multi-dimensional power consumption data; Strong environmental linkage: Introduces remote control of the temperature chamber to build a closed-loop system of power consumption testing and environmental variables, and dynamically adjusts the ambient temperature of the temperature chamber according to the air inlet temperature of the server under test; High automation: The entire testing process requires no manual intervention and can run automatically through preset configuration file strategies, significantly improving testing efficiency and reproducibility.

[0091] Furthermore, as Figure 1 To specifically implement the method, this application provides a server power consumption testing system, which includes testing equipment; the testing equipment is used to perform the following operations: Obtain the configuration file corresponding to the server under test, parse the configuration file, and determine the target business scenario; Based on the target business scenario, a matching target stress model is determined from multiple preset business scenario stress models, and a stress toolkit corresponding to the target stress model is obtained and sent to the server under test. The server under test is remotely controlled so that the stress toolkit in the server under test tests the server under test according to the predefined load pattern in the target stress model; During the test of the server under test, power consumption data is collected synchronously until the test ends. Based on the collected power consumption data, the overall power consumption test result of the server under test is generated. The power consumption data includes the overall power consumption data of the server under test, as well as the component power consumption data of each component of the server under test.

[0092] Optionally, the system further includes a power meter; The test equipment is also used to determine the network address of the power meter connected to the server under test, and access the power meter according to the network address to obtain the first total power consumption data. The power meter is used to collect the first total power consumption data of the server under test; The testing equipment is also used to send remote management commands to the BMC interface of the server under test, so as to remotely collect the second overall power consumption data of the server under test and the component power consumption data of each component through the BMC interface.

[0093] Optionally, the testing equipment is further used for: Record the first power consumption data of the whole machine collected through the power meter and the second power consumption data of the whole machine collected through the BMC interface, and record the timestamp corresponding to each data. Based on the timestamp, the first whole machine power consumption data and the second whole machine power consumption data are time aligned, and after the time alignment, the data difference between the first whole machine power consumption data and the second whole machine power consumption data at the same time is calculated. The data difference is compared with a preset difference threshold. If the data difference exceeds the preset difference threshold, an abnormal prompt message is generated to indicate the accuracy of the power consumption data. The generated whole machine power consumption test result is marked based on the abnormal prompt message, or the test is stopped.

[0094] Optionally, the system further includes an incubator; The testing equipment is also used to monitor in real time the power consumption data of a specified component obtained from the BMC interface of the server under test during the test. When the power consumption data of the specified component exceeds a preset safety threshold for a duration longer than a preset duration threshold, a first temperature control command is generated to increase the target output temperature of the temperature chamber, and the first temperature control command is sent to the temperature chamber, wherein the temperature chamber is used to adjust the air inlet temperature of the server under test. The temperature chamber is used to receive the first temperature control command and increase the target output temperature based on the first temperature control command. The testing equipment is also used to determine the temperature adjustment time node and the corresponding target ambient temperature set for the temperature chamber in the configuration file, and when the current time reaches the temperature adjustment time node, generate a second temperature control command to adjust the target output temperature of the temperature chamber to the corresponding target ambient temperature, and send the second temperature control command to the temperature chamber. The temperature chamber is also used to receive the second temperature control command and adjust the target output temperature based on the second temperature control command.

[0095] Optionally, the testing equipment is further used for: After determining the matching target stress model from multiple preset business scenario stress models, the test monitoring data indicators corresponding to the server under test are determined based on the target stress model, and the matching monitoring tools are called. Wherein, when the target stress model is a high-performance computing stress model, the test monitoring data indicators include the operating frequency indicators and / or power consumption status indicators of each CPU core; When the target stress model is a memory throughput stress model, the test monitoring data indicators include memory bandwidth indicators; When the target stress model is an input / output throughput stress model, the test monitoring data indicators include network interface throughput indicators and / or disk throughput indicators; When the target stress model is a whole machine stress test model, the test monitoring data indicators include at least one of the following: CPU power consumption and temperature indicators, memory power consumption and temperature indicators, network interface throughput indicators, and disk throughput indicators. Accordingly, the testing equipment is also used for: During the testing process of the server under test, corresponding test monitoring data is collected by the monitoring tool based on the test monitoring data indicators.

[0096] Optionally, the testing equipment is further used for: During the test of the server under test, the system logs from the server under test are received and parsed in real time to identify whether there are system error events on the server under test based on the system logs, and to identify whether the test monitoring data exceeds the preset safety range corresponding to the matching test monitoring data indicators. When a system error event is detected and / or the test monitoring data of the test monitoring data indicators exceeds the corresponding preset safety range, the target time window corresponding to the current time is determined, and the test monitoring data and power consumption data within the target time window are obtained. Based on the test monitoring data and power consumption data within the target time window, as well as the target business scenario, an anomaly pattern and / or root cause are output through a preset anomaly analysis model.

[0097] Optionally, when there are multiple target business scenarios, the testing equipment is further used for: The configuration file is parsed to determine each target business scenario and the business weight configured for each target business scenario; The testing equipment is also used for: Based on each target business scenario, a baseline stress model matching each target business scenario is determined from multiple preset business scenario stress models. Based on the business weights corresponding to each target business scenario, the system resource quota and time slice scheduling strategy occupied by each baseline stress model are calculated. Based on the system resource quota and time slice scheduling strategy, the stress tools and test parameters contained in each benchmark stress model are fused to generate the target stress model.

[0098] In a specific embodiment, such as Figure 3 As shown, the server power consumption testing system includes a control unit (the aforementioned testing equipment), a power meter, and a temperature chamber. The control unit can remotely control the server under test to perform tests, remotely collect real-time power consumption data from the power meter, and remotely control the target output temperature of the temperature chamber.

[0099] It should be noted that other corresponding descriptions of the functional units involved in the server power consumption testing system provided in this application embodiment can be found in the following references. Figure 1 The corresponding descriptions in the method will not be repeated here.

[0100] This application also provides a computer device, which may specifically be a personal computer, a server, a network device, etc. Figure 4 As shown, the computer device includes a bus, a processor, memory, and a communication interface, and may also include an input / output interface and a display device. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a 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 location information. The network interface allows communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps in the various method embodiments.

[0101] Those skilled in the art will understand that Figure 4 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 computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0102] In one embodiment, a computer-readable storage medium is provided, which may be non-volatile or volatile, having stored thereon a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0103] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0104] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0105] Those skilled in the art will understand that all or part of the processes in 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. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0106] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0107] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for testing the overall power consumption of a server, characterized in that, include: Obtain the configuration file corresponding to the server under test, parse the configuration file, and determine the target business scenario; Based on the target business scenario, a matching target stress model is determined from multiple preset business scenario stress models, and a stress toolkit corresponding to the target stress model is obtained and sent to the server under test. The server under test is remotely controlled so that the stress toolkit in the server under test tests the server under test according to the predefined load pattern in the target stress model; During the test of the server under test, power consumption data is collected synchronously until the test ends. Based on the collected power consumption data, the overall power consumption test result of the server under test is generated. The power consumption data includes the overall power consumption data of the server under test, as well as the component power consumption data of each component of the server under test.

2. The method according to claim 1, characterized in that, The power consumption data was collected in the following manner: Determine the network address of the power meter connected to the server under test, and access the power meter based on the network address to remotely collect the first overall power consumption data of the server under test through the power meter; and, Send a remote management command to the BMC interface of the server under test to remotely collect the second overall power consumption data of the server under test, as well as the component power consumption data of each component, through the BMC interface.

3. The method according to claim 2, characterized in that, The method further includes: Record the first power consumption data of the whole machine collected through the power meter and the second power consumption data of the whole machine collected through the BMC interface, and record the timestamp corresponding to each data. Based on the timestamp, the first whole machine power consumption data and the second whole machine power consumption data are time aligned, and after the time alignment, the data difference between the first whole machine power consumption data and the second whole machine power consumption data at the same time is calculated. The data difference is compared with a preset difference threshold. If the data difference exceeds the preset difference threshold, an abnormal prompt message is generated to indicate the accuracy of the power consumption data. The generated whole-machine power consumption test result is marked based on the abnormal prompt message, or the test is stopped.

4. The method according to claim 1, characterized in that, The method further includes: During the testing process of the server under test, the power consumption data of a specified component obtained from the BMC interface of the server under test is monitored in real time. When the power consumption data of the specified component exceeds a preset safety threshold for a duration longer than a preset duration threshold, a first temperature control command is generated to increase the target output temperature of the temperature chamber, and the first temperature control command is sent to the temperature chamber, wherein the temperature chamber is used to adjust the air inlet temperature of the server under test; and / or, The temperature adjustment time node and the corresponding target ambient temperature set for the incubator in the configuration file are determined. When the current time reaches the temperature adjustment time node, a second temperature control command is generated to adjust the target output temperature of the incubator to the corresponding target ambient temperature, and the second temperature control command is sent to the incubator.

5. The method according to claim 1, characterized in that, After determining the matching target stress model from multiple preset business scenario stress models, the method further includes: Based on the target stress model, determine the test monitoring data indicators corresponding to the server under test, and call the matching monitoring tools; Wherein, when the target stress model is a high-performance computing stress model, the test monitoring data indicators include the operating frequency indicators and / or power consumption status indicators of each CPU core; When the target stress model is a memory throughput stress model, the test monitoring data indicators include memory bandwidth indicators; When the target stress model is an input / output throughput stress model, the test monitoring data indicators include network interface throughput indicators and / or disk throughput indicators; When the target stress model is a whole-system stress test model, the test monitoring data indicators include at least one of the following: CPU power consumption and temperature indicators, memory power consumption and temperature indicators, network interface throughput indicators, and disk throughput indicators. Accordingly, during the testing process of the server under test, the method further includes: Based on the aforementioned test monitoring data indicators, the corresponding test monitoring data is collected using the aforementioned monitoring tool.

6. The method according to claim 5, characterized in that, During the testing process of the server under test, the method further includes: Receive and parse system logs from the server under test in real time to identify whether there are system error events on the server under test based on the system logs, and to identify whether the test monitoring data exceeds the preset safety range corresponding to the matching test monitoring data indicators; When a system error event is detected and / or the test monitoring data of the test monitoring data indicators exceeds the corresponding preset safety range, the target time window corresponding to the current time is determined, and the test monitoring data and power consumption data within the target time window are obtained. Based on the test monitoring data and power consumption data within the target time window, as well as the target business scenario, an anomaly pattern and / or root cause are output through a preset anomaly analysis model.

7. The method according to claim 1, characterized in that, When there are multiple target business scenarios, the step of parsing the configuration file to determine the target business scenario includes: The configuration file is parsed to determine each target business scenario and the business weight configured for each target business scenario; The step of determining a matching target stress model from multiple preset business scenario stress models based on the target business scenario includes: Based on each target business scenario, a baseline stress model matching each target business scenario is determined from multiple preset business scenario stress models. Based on the business weights corresponding to each target business scenario, the system resource quota and time slice scheduling strategy occupied by each baseline stress model are calculated. Based on the system resource quota and time slice scheduling strategy, the stress tools and test parameters contained in each benchmark stress model are fused to generate the target stress model.

8. A server overall power consumption testing system, characterized in that, Includes testing equipment; the testing equipment is used to perform the following operations: Obtain the configuration file corresponding to the server under test, parse the configuration file, and determine the target business scenario; Based on the target business scenario, a matching target stress model is determined from multiple preset business scenario stress models, and a stress toolkit corresponding to the target stress model is obtained and sent to the server under test. The server under test is remotely controlled so that the stress toolkit in the server under test tests the server under test according to the predefined load pattern in the target stress model; During the test of the server under test, power consumption data is collected synchronously until the test ends. Based on the collected power consumption data, the overall power consumption test result of the server under test is generated. The power consumption data includes the overall power consumption data of the server under test, as well as the component power consumption data of each component of the server under test.

9. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.

10. A computer device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.