Server power consumption test method, apparatus, device, and medium
By simulating static and dynamic webpage access methods to obtain server power consumption test data, the problem of poor user experience in existing technologies is solved, and power consumption test results that are closer to real-world scenarios are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR SUZHOU INTELLIGENT TECH CO LTD
- Filing Date
- 2022-08-19
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies fail to conduct server power consumption tests based on customer application scenarios to the greatest extent possible, resulting in a poor user experience.
By simulating static and dynamic web page access methods, the server is tested using a preset simulated web page access and network tester to obtain static and dynamic power consumption test data and plot power curves.
It enables server power consumption testing that more closely resembles real-world scenarios, thus improving the user experience.
Smart Images

Figure CN115328715B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to server power consumption testing methods, apparatus, equipment, and media. Background Technology
[0002] A server is a computer that manages resources and provides services to users. Servers are typically categorized as file servers, database servers, and application servers. The computer or computer system running these software programs is also called a server. Compared to a regular PC (Personal Computer), servers have higher requirements in terms of stability, security, and performance. Therefore, their hardware, such as the CPU (central processing unit), chipset, memory, disk system, and network, differs from that of a regular PC. When a client makes a request to the server, the programs, web pages, and components running on the server side are dynamic web pages. These return different web pages depending on the client and the time, such as ASP (Active Server Pages), PHP (Hypertext Preprocessor), JSP (JavaServer Pages), .NET, and CGI (Common Gateway Interface). The programs, web pages, plugins, and components running on the client side are static web pages, such as HTML pages, Flash, JavaScript, and VBScript. These remain unchanged. Because the server needs to perform a large amount of processing and computation during use, it consumes a significant amount of electrical energy and generates heat. Therefore, it is necessary to test the server's power consumption when the client makes requests. Industry practice for server power consumption testing generally relies on conventional hard drive stress testing and CPU PTU stress testing, using tools like FIO and PTU under Linux to apply pressure to the server. Therefore, conventional testing is not based on client applications and cannot be implemented to the maximum extent according to client application scenarios, resulting in a poor user experience.
[0003] In summary, how to conduct server power consumption testing in a more realistic manner is a problem that needs to be solved in this field. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a server power consumption testing method, apparatus, device, and medium that more closely approximates real-world server power consumption testing scenarios. The specific solution is as follows:
[0005] Firstly, this application discloses a server power consumption testing method, including:
[0006] Receive the preset Internet information service activation command from the server to be tested;
[0007] Based on the Internet information service activation instruction, and using a preset simulated webpage access method and a preset network tester to perform static webpage testing on the server to be tested, and then using a preset power consumption tester to obtain the static power consumption test data generated by the static webpage test;
[0008] Receive the preset dynamic server page enable command from the server to be tested;
[0009] Based on the preset dynamic server page enable instruction, and using the preset simulated web page access method and the preset network tester to perform dynamic web page testing on the server to be tested, the preset power consumption tester is then used to obtain the dynamic power consumption test data generated by the dynamic web page test.
[0010] The power consumption test data of the server under test is generated using the static test data and the dynamic test data.
[0011] Optionally, the step of performing static webpage testing on the server under test using a preset simulated webpage access method and a preset network tester includes:
[0012] During the static webpage test of the server under test using a preset network tester, a preset number of clients are simulated to initiate a first access request to the server under test, so that the server under test can generate static power consumption test data based on the first access request.
[0013] Accordingly, the step of performing dynamic webpage testing on the server under test using the preset simulated webpage access method and the preset network tester includes:
[0014] During the process of performing dynamic webpage testing on the server under test using the preset network tester, a preset number of clients are simulated to initiate a second access request to the server under test, so that the server under test can generate dynamic power consumption test data based on the second access request.
[0015] Optionally, acquiring the static power consumption test data generated by the static webpage test using a preset power consumption tester includes:
[0016] The first static time point when the number of first requests for the first access request is at its highest value, the second static time point when the number of first requests is at its lowest value, and the third static time point when the number of first requests changes from satisfying a preset fluctuation condition to satisfying a preset smoothing condition are obtained.
[0017] The first static power consumption test data, the second static power consumption test data, and the third static power consumption test data generated by the static webpage test are obtained using a preset power consumption tester, respectively, corresponding to the first static time point, the second static time point, and the third static time point.
[0018] Accordingly, the step of acquiring the dynamic power consumption test data generated by the dynamic webpage test using the preset power consumption tester includes:
[0019] The first dynamic time point when the number of second requests for the second access request is at its highest value, the second dynamic time point when the number of first requests is at its lowest value, and the third dynamic time point when the number of second requests changes from satisfying the preset fluctuation condition to satisfying the preset smoothing condition are obtained.
[0020] The preset power consumption tester is used to obtain the first dynamic power consumption test data, the second dynamic power consumption test data, and the third dynamic power consumption test data generated by the dynamic webpage test, which correspond to the first dynamic time point, the second dynamic time point, and the third dynamic time point, respectively.
[0021] Optionally, generating power consumption test data for the server under test using the static test data and the dynamic test data includes:
[0022] The power consumption test data of the server under test is generated using the static test data and the dynamic test data, and a first time versus power curve and a second time versus power curve corresponding to the static test data and the dynamic test data are plotted using a preset computer.
[0023] Optionally, the step of using a preset computer to plot a first time versus power curve and a second time versus power curve corresponding to the static test data and the dynamic test data, respectively, includes:
[0024] Using a preset computer, plot the first time and power curve corresponding to the first static time point, the second static time point, the third static time point, the first static power consumption test data, the second static power consumption test data, and the third static power consumption test data;
[0025] The preset computer is used to plot a second time-power curve corresponding to the first dynamic time point, the second dynamic time point, the third dynamic time point, the first dynamic power consumption test data, the second dynamic power consumption test data, and the third dynamic power consumption test data.
[0026] Optionally, before receiving the preset Internet information service activation instruction from the server to be detected, the method further includes:
[0027] Connect the preset network tester to the server under test using the corresponding network cable, and electrically connect the preset power consumption tester to the power supply circuit of the server under test.
[0028] Optionally, connecting the preset network tester to the server under test via a corresponding network cable includes:
[0029] Connect the RXT 10GE PTN network tester to the server under test using the corresponding network cable.
[0030] Secondly, this application discloses a server power consumption testing device, comprising:
[0031] The first instruction receiving module is used to receive the preset Internet information service activation instruction of the server to be tested;
[0032] The static testing module is used to perform static webpage testing on the server under test based on the Internet information service activation command, using a preset simulated webpage access method and a preset network tester, and then use a preset power consumption tester to obtain the static power consumption test data generated by the static webpage test.
[0033] The second instruction receiving module is used to receive the preset dynamic server page enable instruction of the server to be detected;
[0034] The dynamic testing module is used to perform dynamic web page testing on the server under test based on the preset dynamic server page enable command, and using the preset simulated web page access method and the preset network tester. Then, it uses the preset power consumption tester to obtain the dynamic power consumption test data generated by the dynamic web page test.
[0035] The power consumption data acquisition module is used to generate power consumption test data for the server under test using the static test data and the dynamic test data.
[0036] Thirdly, this application discloses an electronic device, including:
[0037] Memory, used to store computer programs;
[0038] A processor is used to execute the computer program to implement the steps of the aforementioned disclosed server power consumption testing method.
[0039] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed server power consumption testing method.
[0040] As can be seen, this application receives a preset Internet information service activation instruction from the server under test; based on the Internet information service activation instruction, and using a preset simulated webpage access method and a preset network tester, it performs static webpage testing on the server under test, and then uses a preset power consumption tester to obtain static power consumption test data generated by the static webpage testing; it also receives a preset dynamic server page activation instruction from the server under test; based on the preset dynamic server page activation instruction, and using the preset simulated webpage access method and the preset network tester, it performs dynamic webpage testing on the server under test, and then uses the preset power consumption tester to obtain dynamic power consumption test data generated by the dynamic webpage testing; and finally, it uses the static test data and the dynamic test data to generate power consumption test data for the server under test. Therefore, this application is divided into static webpage testing and dynamic webpage testing, and uses a preset simulated webpage access method, i.e., simulating client webpage access, to perform static webpage testing and dynamic webpage testing respectively. Because it maximizes the implementation of power consumption testing based on client application scenarios, it can obtain server power consumption test data that is closer to actual scenarios, thus improving the user experience. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0042] Figure 1 This is a flowchart of a server power consumption testing method disclosed in this application;
[0043] Figure 2 This is a schematic diagram of a specific power consumption detection device disclosed in this application;
[0044] Figure 3 This application discloses a specific server power consumption testing method flowchart;
[0045] Figure 4 This is a schematic diagram of the structure of a server power consumption testing device disclosed in this application;
[0046] Figure 5 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0047] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0048] A server is a computer that manages resources and provides services to users. They are typically categorized as file servers, database servers, and application servers. The computer or computer system running these software programs is also called a server. Compared to a regular PC, servers have higher requirements in terms of stability, security, and performance. Therefore, their hardware, such as CPU, chipset, memory, disk system, and network, differs from that of a regular PC. When a client makes a request to the server, the programs, web pages, and components running on the server side are dynamic web pages. These return different web pages depending on the client and the time, such as ASP, PHP, JSP, .NET, and CGI. The programs, web pages, plugins, and components running on the client side are static web pages, such as HTML pages, Flash, JavaScript, and VBScript. These remain unchanged. Because servers require a large amount of processing and computation during use, they consume a significant amount of electrical energy and generate heat. Therefore, it is necessary to test the server's power consumption when a client makes a request. When testing server power consumption, the industry generally relies on conventional hard drive stress testing and CPU PTU stress testing. Tools such as FIO and PTU are used under Linux to stress the server. Therefore, conventional testing is not based on customer applications and cannot be implemented according to customer application scenarios to the greatest extent, resulting in a poor user experience.
[0049] Therefore, this application provides a server power consumption testing scheme that more closely reflects real-world server power consumption testing scenarios.
[0050] See Figure 1 As shown in the figure, this application discloses a server power consumption testing method, including:
[0051] Step S11: Receive the preset Internet information service activation command from the server to be tested.
[0052] In this embodiment, it is understood that before receiving the preset Internet Information Services (IIS) activation command from the server under test, a device for power consumption detection of the server under test needs to be set up, for example... Figure 2The diagram illustrates a specific power consumption detection device, which includes a housing. A pulley is fixedly installed on the lower end of the housing's outer wall. Inside the housing, there are an electrical compartment located at the lower end of the inner wall of the housing, a server compartment located at the upper end of the outer wall of the electrical compartment, and a lifting compartment located at the upper end of the outer wall of the server compartment. A preset power consumption tester is fixedly installed on the upper left side of the inner wall of the electrical compartment, and a preset network tester is fixedly installed on the upper right side of the inner wall of the electrical compartment. Springs are symmetrically fixedly installed on both the upper and lower sides of the inner wall of the server compartment under test. A placement block is fixedly installed between the upper and lower springs, and the server under test is placed between the two placement blocks. A temperature sensor is fixedly installed on the upper end of the inner wall of the server compartment under test. Motor frames are symmetrically fixedly installed on both the left and right sides of the lower end of the inner wall of the lifting compartment. The lower ends of the inner walls of the two motor frames are... Two motors are fixedly installed, with their output ends passing through the upper part of the outer wall of the motor frame and fixedly mounted with screws. The upper parts of the outer walls of the two screws are rotatably connected to the lower part of the inner wall of the lifting chamber. Slide rods are symmetrically fixedly installed on the upper parts of the outer walls of both motor frames. The upper parts of the outer walls of the four slide rods are fixedly connected to the lower part of the inner wall of the lifting chamber. Connectors are threaded onto the outer walls of both slide rods, and these connectors are slidably connected to the slide rods. A pre-set computer, such as an all-in-one computer, is fixedly installed on the opposite sides of the two connectors. The upper part of the all-in-one computer's outer wall passes through the upper part of the outer wall of the casing. Fan brackets are fixedly installed on both sides of the outer wall of the casing, passing through the inner wall of the server chamber. Fans are rotatably connected to the inner walls of the fan brackets. The power consumption tester, server, temperature sensor, motors, and fans are electrically connected to the all-in-one computer. The pre-set network tester can be an RXT 10GE PTN type network tester. The fans on both sides rotate in the same direction. The distance between the inner walls of the two placement blocks should be greater than the width of the server under test. The contact surface between the inner wall of the placement blocks and the server under test has anti-slip patterns. As can be seen, by setting springs, the vibration of the placement blocks during device movement can be reduced, thus preventing damage to the server under test from impacts. Using two placement blocks to place the server under test allows it to be suspended in the air, minimizing its contact area with the inner wall of the electrical appliance, which facilitates heat dissipation. Furthermore, the temperature sensor monitors the internal temperature of the server under test. When the temperature sensor detects that the internal temperature of the server under test is too high, the all-in-one computer can control the fan to start and cool the interior of the server under test. In addition, because the inner wall of the placement block has anti-slip patterns on the contact surface with the server under test, the server under test can be made more secure and stable.
[0053] Step S12: Based on the Internet information service activation instruction, and using a preset simulated webpage access method and a preset network tester, perform static webpage testing on the server to be tested, and then use a preset power consumption tester to obtain the static power consumption test data generated by the static webpage test.
[0054] In this embodiment, the step of performing static webpage testing on the server under test using a preset simulated webpage access method and a preset network tester specifically includes: during the static webpage testing of the server under test using the preset network tester, simulating a preset number of clients initiating first access requests to the server under test, so that the server under test generates static power consumption test data based on the first access requests. For example, simulating 10,000 clients initiating first access requests to the server under test, and recording the number of requests made by the server under test based on the static page test.htm in the first access requests.
[0055] In this embodiment, the step of acquiring the static power consumption test data generated by the static webpage test using a preset power consumption tester specifically includes: acquiring a first static time point when the number of first requests of the first access request is at its highest value, a second static time point when the number of first requests is at its lowest value, and a third static time point when the number of first requests changes from meeting a preset fluctuation condition to meeting a preset smoothing condition; acquiring the first static power consumption test data, second static power consumption test data, and third static power consumption test data generated by the static webpage test corresponding to the first static time point, the second static time point, and the third static time point, respectively, using the preset power consumption tester. Specifically, acquiring the first static time point t1 when the number of first requests of the first access request is at its highest value, the second static time point t2 when the number of first requests is at its lowest value, and the third static time point t3 when the number of first requests changes from meeting a preset fluctuation condition to meeting a preset smoothing condition, and acquiring the first static power consumption test data p1, the second static power consumption test data p2, and the third static power consumption test data p3 at t1, t2, and t3, respectively.
[0056] Step S13: Receive the preset dynamic server page enable command from the server to be tested.
[0057] In this embodiment, when the server to be tested enables a preset dynamic server page (ASP), a corresponding preset dynamic server page enable instruction will be generated to enable subsequent dynamic web page detection.
[0058] Step S14: Based on the preset dynamic server page enable instruction, and using the preset simulated webpage access method and the preset network tester, perform dynamic webpage testing on the server to be tested, and then use the preset power consumption tester to obtain the dynamic power consumption test data generated by the dynamic webpage test.
[0059] In this embodiment, the dynamic webpage test of the server under test using the preset simulated webpage access method and the preset network tester specifically includes: during the dynamic webpage test of the server under test using the preset network tester, simulating a preset number of clients initiating a second access request to the server under test, so that the server under test generates dynamic power consumption test data based on the second access request. For example, simulating 10,000 clients initiating a second access request to the server under test.
[0060] In this embodiment, the step of acquiring the dynamic power consumption test data generated by the dynamic webpage test using the preset power consumption tester specifically includes: acquiring a first dynamic time point when the number of second requests of the second access request is at its highest value, a second dynamic time point when the number of first requests is at its lowest value, and a third dynamic time point when the number of second requests changes from satisfying the preset fluctuation condition to satisfying the preset smoothing condition; acquiring first dynamic power consumption test data, second dynamic power consumption test data, and third dynamic power consumption test data generated by the dynamic webpage test corresponding to the first dynamic time point, the second dynamic time point, and the third dynamic time point, respectively, using the preset power consumption tester. Specifically, acquiring the first dynamic time point t4 when the number of second requests of the second access request is at its highest value, the second dynamic time point t5 when the number of second requests is at its lowest value, and the third dynamic time point t6 when the number of first requests changes from satisfying the preset fluctuation condition to satisfying the preset smoothing condition, and acquiring the first dynamic power consumption test data p4, the second dynamic power consumption test data p5, and the third dynamic power consumption test data p6 at t4, t5, and t6, respectively.
[0061] Step S15: Generate power consumption test data for the server under test using the static test data and the dynamic test data.
[0062] In this embodiment, a first time versus power curve is plotted using the first static time point t1, the second static time point t2, the third static time point t3, and the corresponding first static power consumption test data p1, the second static power consumption test data p2, and the third static power consumption test data p3. A second time versus power curve is plotted using the first dynamic time point t4, the second dynamic time point t5, the third dynamic time point t6, and the corresponding first dynamic power consumption test data p4, the second dynamic power consumption test data p5, and the third dynamic power consumption test data p6.
[0063] As can be seen, this application receives a preset Internet information service activation instruction from the server under test; based on the Internet information service activation instruction, and using a preset simulated webpage access method and a preset network tester, it performs static webpage testing on the server under test, and then uses a preset power consumption tester to obtain static power consumption test data generated by the static webpage testing; it also receives a preset dynamic server page activation instruction from the server under test; based on the preset dynamic server page activation instruction, and using the preset simulated webpage access method and the preset network tester, it performs dynamic webpage testing on the server under test, and then uses the preset power consumption tester to obtain dynamic power consumption test data generated by the dynamic webpage testing; and finally, it uses the static test data and the dynamic test data to generate power consumption test data for the server under test. Therefore, this application is divided into static webpage testing and dynamic webpage testing, and uses a preset simulated webpage access method, i.e., simulating client webpage access, to perform static webpage testing and dynamic webpage testing respectively. Because it maximizes the implementation of power consumption testing based on client application scenarios, it can obtain server power consumption test data that is closer to actual scenarios, thus improving the user experience.
[0064] See Figure 3 As shown in the figure, this application discloses a specific method for testing server power consumption, including:
[0065] Step S21: Connect the preset network tester to the server under test using the corresponding network cable, and electrically connect the preset power consumption tester to the power circuit of the server under test.
[0066] In this embodiment, connecting the preset network tester to the server under test via a corresponding network cable specifically includes connecting the RXT 10GE PTN network tester to the server under test via a corresponding network cable.
[0067] Step S22: Receive the preset Internet information service activation command from the server to be tested.
[0068] Step S23: Based on the Internet information service activation instruction, and using a preset simulated webpage access method and a preset network tester, perform static webpage testing on the server to be tested, and then use a preset power consumption tester to obtain the static power consumption test data generated by the static webpage test.
[0069] Step S24: Receive the preset dynamic server page enable command from the server to be tested.
[0070] Step S25: Based on the preset dynamic server page enable instruction, and using the preset simulated webpage access method and the preset network tester, perform dynamic webpage testing on the server to be tested, and then use the preset power consumption tester to obtain the dynamic power consumption test data generated by the dynamic webpage test.
[0071] Step S26: Generate power consumption test data of the server under test using the static test data and the dynamic test data, and use a preset computer to draw a first time versus power curve and a second time versus power curve corresponding to the static test data and the dynamic test data, respectively.
[0072] In this embodiment, the step of using a preset computer to draw a first time-power curve and a second time-power curve corresponding to the static test data and the dynamic test data respectively specifically includes: using a preset computer to draw a first time-power curve corresponding to the first static time point, the second static time point, the third static time point, the first static power consumption test data, the second static power consumption test data, and the third static power consumption test data; and using the preset computer to draw a second time-power curve corresponding to the first dynamic time point, the second dynamic time point, the third dynamic time point, the first dynamic power consumption test data, the second dynamic power consumption test data, and the third dynamic power consumption test data.
[0073] For more detailed information on the working process of steps S22, S23, S24 and S25, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0074] Therefore, after obtaining static and dynamic test data, this application can also use a preset computer to draw a first time-power curve corresponding to the static test data and a second time-power curve corresponding to the dynamic test data, which more intuitively shows the power consumption of the server under test under static and dynamic web page tests, making it easier for users to understand the relevant performance of the server under test and improving the user experience.
[0075] See Figure 4 As shown in the figure, this application discloses a server power consumption testing device, including:
[0076] The first instruction receiving module 11 is used to receive a preset Internet information service activation instruction from the server to be tested;
[0077] The static testing module 12 is used to perform static webpage testing on the server to be tested based on the Internet information service activation command and using a preset simulated webpage access method and a preset network tester, and then use a preset power consumption tester to obtain the static power consumption test data generated by the static webpage test.
[0078] The second instruction receiving module 13 is used to receive the preset dynamic server page enable instruction of the server to be detected;
[0079] The dynamic testing module 14 is used to perform dynamic web page testing on the server under test based on the preset dynamic server page enable command, and using the preset simulated web page access method and the preset network tester, and then use the preset power consumption tester to obtain the dynamic power consumption test data generated by the dynamic web page test.
[0080] The power consumption data acquisition module 15 is used to generate power consumption test data of the server under test using the static test data and the dynamic test data.
[0081] As can be seen, this application receives a preset Internet information service activation instruction from the server under test; based on the Internet information service activation instruction, and using a preset simulated webpage access method and a preset network tester, it performs static webpage testing on the server under test, and then uses a preset power consumption tester to obtain static power consumption test data generated by the static webpage testing; it also receives a preset dynamic server page activation instruction from the server under test; based on the preset dynamic server page activation instruction, and using the preset simulated webpage access method and the preset network tester, it performs dynamic webpage testing on the server under test, and then uses the preset power consumption tester to obtain dynamic power consumption test data generated by the dynamic webpage testing; and finally, it uses the static test data and the dynamic test data to generate power consumption test data for the server under test. Therefore, this application is divided into static webpage testing and dynamic webpage testing, and uses a preset simulated webpage access method, i.e., simulating client webpage access, to perform static webpage testing and dynamic webpage testing respectively. Because it maximizes the implementation of power consumption testing based on client application scenarios, it can obtain server power consumption test data that is closer to actual scenarios, thus improving the user experience.
[0082] In some specific embodiments, the static testing module 12 includes:
[0083] The first simulation unit is used to simulate a preset number of clients initiating first access requests to the server under test during the static webpage test of the server under test using a preset network tester, so that the server under test can generate static power consumption test data based on the first access requests.
[0084] In some specific embodiments, the dynamic testing module 14 includes:
[0085] The second simulation unit is used to simulate a preset number of clients initiating a second access request to the server under test during the process of performing dynamic webpage testing on the server under test using the preset network tester, so that the server under test can generate dynamic power consumption test data based on the second access request.
[0086] In some specific embodiments, the static testing module 12 includes:
[0087] The static time point acquisition unit is used to acquire the first static time point when the number of first requests of the first access request is at its highest value, the second static time point when the number of first requests is at its lowest value, and the third static time point when the number of first requests changes from meeting a preset fluctuation condition to meeting a preset smoothing condition.
[0088] The static power consumption test data acquisition unit is used to acquire, using a preset power consumption tester, the first static power consumption test data, the second static power consumption test data, and the third static power consumption test data generated by the static webpage test and corresponding to the first static time point, the second static time point, and the third static time point, respectively.
[0089] In some specific embodiments, the dynamic testing module 14 includes:
[0090] The dynamic time point acquisition unit is used to acquire the first dynamic time point when the number of second requests of the second access request is at its highest value, the second dynamic time point when the number of first requests is at its lowest value, and the third dynamic time point when the number of second requests changes from satisfying the preset fluctuation condition to satisfying the preset smoothing condition.
[0091] The dynamic power consumption test data acquisition unit is used to acquire, using the preset power consumption tester, the first dynamic power consumption test data, the second dynamic power consumption test data, and the third dynamic power consumption test data generated by the dynamic webpage test and corresponding to the first dynamic time point, the second dynamic time point, and the third dynamic time point, respectively.
[0092] In some specific embodiments, the power consumption data acquisition module 15 includes:
[0093] The plotting unit is used to generate power consumption test data of the server under test using the static test data and the dynamic test data, and to plot a first time versus power curve and a second time versus power curve corresponding to the static test data and the dynamic test data, respectively, using a preset computer.
[0094] In some specific embodiments, the drawing unit includes:
[0095] The first time and power curve plotting unit is used to plot the first time and power curve corresponding to the first static time point, the second static time point, the third static time point, the first static power consumption test data, the second static power consumption test data, and the third static power consumption test data using a preset computer.
[0096] The second time and power curve plotting unit is used to plot a second time and power curve corresponding to the first dynamic time point, the second dynamic time point, the third dynamic time point, the first dynamic power consumption test data, the second dynamic power consumption test data, and the third dynamic power consumption test data using the preset computer.
[0097] In some specific embodiments, the server power consumption testing device includes:
[0098] The connection unit is used to connect the preset network tester to the server under test via a corresponding network cable, and to electrically connect the preset power consumption tester to the power circuit of the server under test.
[0099] In some specific embodiments, the connection unit includes:
[0100] The network tester connection unit is used to connect the RXT 10GE PTN network tester to the server under test via a corresponding network cable.
[0101] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Specifically, it may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the following steps;
[0102] Receive the preset Internet information service activation command from the server to be tested;
[0103] Based on the Internet information service activation instruction, and using a preset simulated webpage access method and a preset network tester to perform static webpage testing on the server to be tested, and then using a preset power consumption tester to obtain the static power consumption test data generated by the static webpage test;
[0104] Receive the preset dynamic server page enable command from the server to be tested;
[0105] Based on the preset dynamic server page enable instruction, and using the preset simulated web page access method and the preset network tester to perform dynamic web page testing on the server to be tested, the preset power consumption tester is then used to obtain the dynamic power consumption test data generated by the dynamic web page test.
[0106] The power consumption test data of the server under test is generated using the static test data and the dynamic test data.
[0107] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:
[0108] During the static webpage test of the server under test using a preset network tester, a preset number of clients are simulated to initiate a first access request to the server under test, so that the server under test can generate static power consumption test data based on the first access request.
[0109] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:
[0110] During the process of performing dynamic webpage testing on the server under test using the preset network tester, a preset number of clients are simulated to initiate a second access request to the server under test, so that the server under test can generate dynamic power consumption test data based on the second access request.
[0111] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:
[0112] The first static time point when the number of first requests for the first access request is at its highest value, the second static time point when the number of first requests is at its lowest value, and the third static time point when the number of first requests changes from satisfying a preset fluctuation condition to satisfying a preset smoothing condition are obtained.
[0113] The first static power consumption test data, the second static power consumption test data, and the third static power consumption test data generated by the static webpage test are obtained using a preset power consumption tester, respectively, corresponding to the first static time point, the second static time point, and the third static time point.
[0114] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:
[0115] The first dynamic time point when the number of second requests for the second access request is at its highest value, the second dynamic time point when the number of first requests is at its lowest value, and the third dynamic time point when the number of second requests changes from satisfying the preset fluctuation condition to satisfying the preset smoothing condition are obtained.
[0116] The preset power consumption tester is used to obtain the first dynamic power consumption test data, the second dynamic power consumption test data, and the third dynamic power consumption test data generated by the dynamic webpage test, which correspond to the first dynamic time point, the second dynamic time point, and the third dynamic time point, respectively.
[0117] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:
[0118] The power consumption test data of the server under test is generated using the static test data and the dynamic test data, and a first time versus power curve and a second time versus power curve corresponding to the static test data and the dynamic test data are plotted using a preset computer.
[0119] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:
[0120] Using a preset computer, plot the first time and power curve corresponding to the first static time point, the second static time point, the third static time point, the first static power consumption test data, the second static power consumption test data, and the third static power consumption test data;
[0121] The preset computer is used to plot a second time-power curve corresponding to the first dynamic time point, the second dynamic time point, the third dynamic time point, the first dynamic power consumption test data, the second dynamic power consumption test data, and the third dynamic power consumption test data.
[0122] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:
[0123] Connect the preset network tester to the server under test using the corresponding network cable, and electrically connect the preset power consumption tester to the power circuit of the server under test.
[0124] In some specific embodiments, the processor, by executing a computer program stored in the memory, may further include the following steps:
[0125] Connect the RXT 10GE PTN network tester to the server under test using the corresponding network cable.
[0126] In this embodiment, the power supply 23 is used to provide operating voltage for various hardware devices on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0127] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0128] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored on it include operating system 221, computer program 222 and data 223, etc., and the storage method can be temporary storage or permanent storage.
[0129] The operating system 221 manages and controls the various hardware devices and computer programs 222 on the electronic device to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system can be Windows, Unix, Linux, etc. The computer program 222, in addition to including a computer program capable of performing the server power consumption test method executed by the electronic device as disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.
[0130] Furthermore, embodiments of this application also disclose a computer-readable storage medium storing a computer program. When the computer program is loaded and executed by a processor, it implements the method steps disclosed in any of the foregoing embodiments that are executed during server power consumption testing.
[0131] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0132] The above provides a detailed description of a server power consumption testing method, apparatus, device, and medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for testing server power consumption, characterized in that, Applications in power consumption detection devices include: Receive the preset Internet information service activation command from the server to be tested; Based on the Internet information service activation instruction, and using a preset simulated webpage access method and a preset network tester to perform static webpage testing on the server to be tested, and then using a preset power consumption tester to obtain the static power consumption test data generated by the static webpage test; Receive the preset dynamic server page enable command from the server to be tested; Based on the preset dynamic server page enable instruction, and using the preset simulated web page access method and the preset network tester to perform dynamic web page testing on the server to be tested, the preset power consumption tester is then used to obtain the dynamic power consumption test data generated by the dynamic web page test. The power consumption test data of the server under test is generated using the static power consumption test data and the dynamic power consumption test data; The step of performing static webpage testing on the server under test using a preset simulated webpage access method and a preset network tester includes: during the static webpage testing of the server under test using the preset network tester, simulating a preset number of clients to initiate a first access request to the server under test, so that the server under test generates static power consumption test data based on the first access request. Accordingly, the step of using the preset simulated webpage access method and the preset network tester to perform dynamic webpage testing on the server under test includes: during the process of using the preset network tester to perform dynamic webpage testing on the server under test, simulating the preset number of clients to initiate a second access request to the server under test, so that the server under test can generate dynamic power consumption test data based on the second access request. The power consumption detection device includes a housing. A pulley is fixedly installed on the lower end of the outer wall of the housing. Inside the housing, there are an electrical compartment located at the lower end of the inner wall of the housing, a server compartment located at the upper end of the outer wall of the electrical compartment, and a lifting compartment located at the upper end of the outer wall of the server compartment. A preset power consumption tester is fixedly installed on the upper left side of the inner wall of the electrical compartment, and a preset network tester is fixedly installed on the upper right side of the inner wall of the electrical compartment. Springs are symmetrically fixedly installed on both the upper and lower sides of the inner wall of the server compartment under test. A placement block is fixedly installed between the upper and lower springs, and the server under test is placed between the two placement blocks. A temperature sensor is fixedly installed on the upper end of the inner wall of the server compartment under test. Motor frames are symmetrically fixedly installed on both the left and right sides of the lower end of the inner wall of the lifting compartment. Each end is fixedly equipped with a motor. The output ends of the two motors pass through the upper end of the outer wall of the motor frame and are fixedly equipped with screws. The upper ends of the outer walls of the two screws are rotatably connected to the lower end of the inner wall of the lifting chamber. Slide rods are symmetrically fixedly installed on the upper ends of the outer walls of the two motor frames. The upper ends of the outer walls of the four slide rods are fixedly connected to the lower end of the inner wall of the lifting chamber. Connectors are threaded to the outer walls of the two slide rods. The connectors are slidably connected to the slide rods. A preset computer is fixedly installed on the opposite side of the two connectors. The upper end of the computer's outer wall passes through the upper end of the outer wall of the housing. Fan brackets are fixedly installed on both sides of the outer wall of the housing. The fan brackets pass through the inner wall of the server chamber. Fans are rotatably connected to the inner wall of the fan brackets. The power consumption tester, server, temperature sensor, motor, fan and computer are electrically connected.
2. The server power consumption testing method according to claim 1, characterized in that, The step of acquiring static power consumption test data generated by the static webpage test using a preset power consumption tester includes: The first static time point when the number of first requests for the first access request is at its highest value, the second static time point when the number of first requests is at its lowest value, and the third static time point when the number of first requests changes from satisfying a preset fluctuation condition to satisfying a preset smoothing condition are obtained. The first static power consumption test data, the second static power consumption test data, and the third static power consumption test data generated by the static webpage test are obtained using a preset power consumption tester, respectively, corresponding to the first static time point, the second static time point, and the third static time point. Accordingly, the step of acquiring the dynamic power consumption test data generated by the dynamic webpage test using the preset power consumption tester includes: The first dynamic time point when the number of second requests for the second access request is at its highest value, the second dynamic time point when the number of first requests is at its lowest value, and the third dynamic time point when the number of second requests changes from satisfying the preset fluctuation condition to satisfying the preset smoothing condition are obtained. The preset power consumption tester is used to obtain the first dynamic power consumption test data, the second dynamic power consumption test data, and the third dynamic power consumption test data generated by the dynamic webpage test, which correspond to the first dynamic time point, the second dynamic time point, and the third dynamic time point, respectively.
3. The server power consumption testing method according to claim 2, characterized in that, The step of generating power consumption test data for the server under test using the static power consumption test data and the dynamic power consumption test data includes: The power consumption test data of the server under test is generated using the static power consumption test data and the dynamic power consumption test data. A first time versus power curve and a second time versus power curve corresponding to the static power consumption test data and the dynamic power consumption test data are plotted using a preset computer.
4. The server power consumption testing method according to claim 3, characterized in that, The step of using a preset computer to plot a first time versus power curve and a second time versus power curve corresponding to the static power consumption test data and the dynamic power consumption test data, respectively, includes: Using a preset computer, plot the first time and power curve corresponding to the first static time point, the second static time point, the third static time point, the first static power consumption test data, the second static power consumption test data, and the third static power consumption test data; The preset computer is used to plot a second time-power curve corresponding to the first dynamic time point, the second dynamic time point, the third dynamic time point, the first dynamic power consumption test data, the second dynamic power consumption test data, and the third dynamic power consumption test data.
5. The server power consumption test method according to any one of claims 1 to 4, characterized in that, Before receiving the preset Internet information service activation instruction from the server to be detected, the method further includes: Connect the preset network tester to the server under test using the corresponding network cable, and electrically connect the preset power consumption tester to the power supply circuit of the server under test.
6. The server power consumption testing method according to claim 5, characterized in that, The step of connecting the preset network tester to the server under test via a corresponding network cable includes: Connect the RXT 10GE PTN network tester to the server under test using the corresponding network cable.
7. A server power consumption testing device, characterized in that, Applications in power consumption detection devices include: The first instruction receiving module is used to receive the preset Internet information service activation instruction of the server to be tested; The static testing module is used to perform static webpage testing on the server under test based on the Internet information service activation command, using a preset simulated webpage access method and a preset network tester, and then use a preset power consumption tester to obtain the static power consumption test data generated by the static webpage test. The second instruction receiving module is used to receive the preset dynamic server page enable instruction of the server to be detected; The dynamic testing module is used to perform dynamic web page testing on the server under test based on the preset dynamic server page enable command, and using the preset simulated web page access method and the preset network tester. Then, it uses the preset power consumption tester to obtain the dynamic power consumption test data generated by the dynamic web page test. The power consumption data acquisition module is used to generate power consumption test data of the server under test using the static power consumption test data and the dynamic power consumption test data; The static testing module is specifically used to simulate a preset number of clients to initiate a first access request to the server under test during the static webpage test of the server under test using a preset network tester, so that the server under test can generate static power consumption test data based on the first access request. Accordingly, the dynamic testing module is specifically used to simulate a preset number of clients initiating a second access request to the server under test during the process of performing dynamic webpage testing on the server under test using the preset network tester, so that the server under test can generate dynamic power consumption test data based on the second access request. The power consumption detection device includes a housing. A pulley is fixedly installed on the lower end of the outer wall of the housing. Inside the housing, there are an electrical compartment located at the lower end of the inner wall of the housing, a server compartment located at the upper end of the outer wall of the electrical compartment, and a lifting compartment located at the upper end of the outer wall of the server compartment. A preset power consumption tester is fixedly installed on the upper left side of the inner wall of the electrical compartment, and a preset network tester is fixedly installed on the upper right side of the inner wall of the electrical compartment. Springs are symmetrically fixedly installed on both the upper and lower sides of the inner wall of the server compartment under test. A placement block is fixedly installed between the upper and lower springs, and the server under test is placed between the two placement blocks. A temperature sensor is fixedly installed on the upper end of the inner wall of the server compartment under test. Motor frames are symmetrically fixedly installed on both the left and right sides of the lower end of the inner wall of the lifting compartment. Each end is fixedly equipped with a motor. The output ends of the two motors pass through the upper end of the outer wall of the motor frame and are fixedly equipped with screws. The upper ends of the outer walls of the two screws are rotatably connected to the lower end of the inner wall of the lifting chamber. Slide rods are symmetrically fixedly installed on the upper ends of the outer walls of the two motor frames. The upper ends of the outer walls of the four slide rods are fixedly connected to the lower end of the inner wall of the lifting chamber. Connectors are threaded to the outer walls of the two slide rods. The connectors are slidably connected to the slide rods. A preset computer is fixedly installed on the opposite side of the two connectors. The upper end of the computer's outer wall passes through the upper end of the outer wall of the housing. Fan brackets are fixedly installed on both sides of the outer wall of the housing. The fan brackets pass through the inner wall of the server chamber. Fans are rotatably connected to the inner wall of the fan brackets. The power consumption tester, server, temperature sensor, motor, fan and computer are electrically connected.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the server power consumption test method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, Used to store a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the server power consumption test method as described in any one of claims 1 to 6.