Server testing method, electronic device and storage medium
By obtaining the server's identity and power information, a server set is formed to determine the test status, solving the power waste and current overload problems caused by maximum power consumption reservation, and improving the overall efficiency and reliability of server testing.
Patent Information
- Application Number
- CN202510884238.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-06-27
AI Technical Summary
The existing method of reserving test power consumption based on the maximum power consumption value limits the number of test stations, resulting in power waste and inefficient energy management. In addition, reliance on manual power consumption estimation leads to current overload and power outages when a large number of servers are put on the shelf, affecting the continuity and stability of the test.
By obtaining the identity of the server to be tested, determining its test area, test rack position and power phase, forming a server set with the same area, rack position and phase, and determining the test status based on the total power consumption of the set, accurate power distribution and status monitoring are achieved to avoid power waste and current overload.
It improves the utilization rate of test stations, realizes system-level power consumption control, improves energy consumption management efficiency, ensures the continuity and stability of testing, and optimizes the utilization efficiency of power resources.
Smart Images

Figure CN120386675B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a server testing method, electronic equipment, and storage medium. Background Art
[0002] With the rapid development of information technology, market demand for servers, core equipment for data processing and storage, continues to expand. In particular, with the emergence of GPT (Generative Pre-trained Transformer), demand for high-power AI (Artificial Intelligence) servers has surged. During server production, after assembly is completed on the production side, a high power consumption estimate is calculated based on the approximate power consumption of high-power machines. This is then used to plan and schedule machine placement for testing based on the total available power consumption of the factory's production lines. If the number of racks exceeds the planned number, to ensure electrical safety during testing, the remaining assembled machines must wait until the previous batch of machines has finished loading before being placed for testing.
[0003] In the current server testing process, the links with higher power consumption are mainly concentrated in the stress testing stage. In contrast, projects such as customized firmware version refresh and basic function testing only require lower basic power consumption. However, the test power consumption reservation method in related technologies is planned based on the maximum power consumption value, which greatly limits the number of test stations, making it difficult to improve test efficiency, and also causes unnecessary waste of electricity use, making the energy consumption management of the overall testing process inefficient. When arranging server shelf testing, planning can only rely on manual power consumption estimation. When the number of servers on the shelf is large, due to the inability to accurately control and manage the total current, the current value is often too large and causes power outages, seriously affecting the continuity and stability of the test. Summary of the Invention
[0004] The present application provides a server testing method, electronic device and storage medium to at least solve the problem in the related art of limiting the number of test stations, wasting electricity and reducing energy management efficiency by reserving test power consumption based on the maximum power consumption value, as well as the problem of current overload and power failure when a large number of servers are put on the shelf due to reliance on manual power consumption estimation, which seriously affects the continuity and stability of the test.
[0005] The present application provides a server testing method, comprising: obtaining an identity identifier of a server to be tested, and determining a test area, a test rack position, and a power phase in which the server to be tested is located based on the identity identifier of the server to be tested; determining a first set of servers that are in the same test area, the same test rack position, and the same power phase as the server to be tested, when it is determined that the server to be tested, the test area, and the test rack position satisfy off-peak testing conditions; determining the total power consumption of the first set of servers, and determining a test status of the server to be tested based on the total power consumption.
[0006] The present application also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the aforementioned server testing method is implemented.
[0007] The present application also provides a non-volatile computer-readable storage medium having a computer program stored thereon, which implements the aforementioned server testing method when executed by a processor.
[0008] The present application also provides a computer program product, including a computer program / instruction, which implements the aforementioned server testing method when the computer program / instruction is executed by a processor.
[0009] This application obtains the identity of the server to be tested and determines its test area, test rack position and power phase, determines a first server set that is in the same test area, the same test rack position and the same power phase as the server to be tested, and determines the test status of the server to be tested based on the total power consumption of the first server set. This can effectively avoid the problem of power waste caused by reserving the maximum power consumption, increase the utilization rate of the test station, realize system-level power consumption control, solve the problem of lack of system-level control and inability to effectively avoid current overload and power outages, significantly improve the efficiency of energy consumption management, and thus comprehensively improve the overall efficiency and reliability of server testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0011] Figure 1 is a flowchart of a server testing method according to some embodiments of the present application;
[0012] Figure 2 380VPDU and cable connection topology diagram according to some embodiments of the present application;
[0013] Figure 3 220VPDU and cable connection topology diagram according to some embodiments of the present application;
[0014] Figure 4 is a block diagram of an electronic device according to some embodiments of the present application. DETAILED DESCRIPTION
[0015] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0016] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0017] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0018] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the server test method depends, the specific application environment architecture or specific hardware architecture is described here.
[0019] The following describes in detail the testing method, electronic device and storage medium of the patent name server according to the embodiment of the present application with reference to the accompanying drawings.
[0020] Figure 1 Flowchart of a server testing method according to some embodiments of the present application. Figure 1 The server testing method of the embodiment of the present application may include the following steps:
[0021] S110 , obtaining an identity of a server to be tested, and determining a test area, a test rack position, and a power phase of the server to be tested according to the identity of the server to be tested.
[0022] Specifically, the identity identifier of the server to be tested can be a barcode or QR code affixed to the server chassis, and the test area, test rack position, and power phase of the server to be tested can be determined by scanning the barcode or QR code. The identity identifier of the server to be tested can also be the serial number of the server to be tested, and the test area, test rack position, and power phase of the server to be tested can be determined by looking up a multidimensional relationship mapping table between the server's serial number and the test area, test rack position, and power phase of the server, wherein the multidimensional relationship mapping table includes the serial numbers of multiple servers and the test area, test rack position, and power phase corresponding to the serial number of each server. It should be noted that the power phase can be the power phase where the air switch is located.
[0023] S120: When it is determined that the server to be tested, the test area, and the test rack position meet the off-peak test conditions, determine a first server set that is in the same test area, the same test rack position, and the same power phase as the server to be tested.
[0024] Specifically, after determining the test area and test rack position where the server to be tested is located, it is also necessary to determine whether the server to be tested and the test area and test rack position where the server to be tested is located allow off-peak testing. If it is determined that the server to be tested and the test area and test rack position where the server to be tested is located allow off-peak testing, it can be determined that the server to be tested, the test area and the test rack position meet the off-peak testing conditions.
[0025] After determining that the server to be tested, the test area and the test rack position meet the off-peak test conditions, the servers in the same test area, the same test rack position and the same power phase as the server to be tested are determined and recorded as the first server set, wherein the first server set includes the server to be tested.
[0026] It should be noted that the 380V power supply PDU (Power Distribution Unit, power distribution unit) and cable connection topology is as follows Figure 2 As shown, a total of 6 PDUs are included, and each PDU is connected to 3 power phases. For example, when PDU1 includes 24 power output interfaces, power output interfaces 1-8 of PDU1 are connected to the first power phase, power output interfaces 9-16 of PDU1 are connected to the second power phase, and power output interfaces 17-24 of PDU1 are connected to the third power phase.
[0027] The PDU and cable connection topology of 220V power supply is as follows Figure 3As shown, each PDU is connected to one power phase, that is, when each PDU includes 24 power output interfaces, the 24 power output interfaces are all connected to the same power phase. For example, the power output interfaces of PDU1 and PDU2 are connected to the first power phase, the power output interfaces of PDU3 and PDU4 are connected to the second power phase, and the power output interfaces of PDU5 and PDU6 are connected to the third power phase.
[0028] S130: Determine the total power consumption of the first server set, and determine a test status of the server to be tested according to the total power consumption.
[0029] Specifically, the first server set includes the server to be tested and servers located in the same test area, at the same test rack location, and with the same power phase as the server to be tested. After determining the first server set, the total power consumption can be determined by querying the maximum power consumption of each first server in the first server set when executing a corresponding test item. For example, the total power consumption of the first server set can be determined by calculating the sum of the maximum power consumption of each first server in the first server set when executing a corresponding test item.
[0030] After determining the total power consumption of the first set of servers, the test status of the servers to be tested can be determined by judging the magnitude of the total power consumption. For example, if the total power consumption is high, adding the servers to be tested to the current power phase will cause a PDU overload, and the servers to be tested cannot be tested. If the total power consumption is low, adding the servers to be tested to the current power phase will not cause a PDU overload, and the servers to be tested can be tested.
[0031] This application obtains the identity of the server to be tested and determines its test area, test rack position and power phase, determines a first server set that is in the same test area, the same test rack position and the same power phase as the server to be tested, and determines the test status of the server to be tested based on the total power consumption of the first server set. This can effectively avoid the problem of power waste caused by reserving the maximum power consumption, increase the utilization rate of the test station, realize system-level power consumption control, solve the problem of lack of system-level control and inability to effectively avoid current overload and power outages, significantly improve the efficiency of energy consumption management, and thus comprehensively improve the overall efficiency and reliability of server testing.
[0032] In some embodiments, determining the test state of the server under test based on the total power consumption includes: determining that the server under test is in a waiting state for testing when the total power consumption is greater than or equal to a first preset power consumption threshold; and determining that the server under test is in a testing state when the total power consumption is less than the first preset power consumption threshold. The first preset power consumption threshold can be calibrated according to actual conditions and is not limited here.
[0033] Specifically, the test status of the server to be tested can be determined by comparing the total power consumption with a first preset power consumption threshold. For example, if the total power consumption is greater than or equal to the first preset power consumption threshold, it means that adding the server to be tested to the current power phase will cause the PDU to overload, and the server to be tested is determined to be in a waiting test state; if the total power consumption is less than the first preset power consumption threshold, it means that adding the server to be tested to the current power phase will not cause the PDU to overload, and the server to be tested is determined to be in a testing state, and the server to be tested can be controlled to execute the corresponding test item.
[0034] In some embodiments, after determining that the server to be tested is in a waiting-for-test state, the method further includes: re-determining the test state of the server to be tested based on a first preset time interval, and, if the server to be tested is determined to be in the testing state, controlling the server to be tested to execute a corresponding test item. The first preset time interval can be calibrated according to actual circumstances and is not specifically limited herein.
[0035] Specifically, when determining that the test status of the server to be tested is in the waiting test status, it is necessary to re-obtain the total power consumption of the first server set every first preset time interval, and re-determine the test status of the server to be tested based on the total power consumption of the first server set. If the total power consumption is less than the first preset power consumption threshold, it is determined that the server to be tested is in the test status, and the server to be tested can be controlled to execute the corresponding test items. If the total power consumption is greater than or equal to the first preset power consumption threshold, it is determined that the server to be tested is in the waiting test status.
[0036] In this way, by comparing the total power consumption of the first server set with the first preset power consumption threshold to determine the test status of the server to be tested, it is possible to monitor and intelligently adjust power distribution in real time, thereby avoiding the risk of power outages caused by current overload to a certain extent, and ensuring the continuity and stability of the test process; at the same time, it also significantly optimizes the energy consumption management efficiency and realizes the refined utilization of power resources.
[0037] In some embodiments, determining the total power consumption of the first server set includes: obtaining a target power consumption of each first server in the first server set; and determining the total power consumption based on a first sum of the target power consumptions of each first server.
[0038] Specifically, the first server set includes the server to be tested and servers located in the same test area, at the same test rack location, and with the same power phase as the server to be tested. For each first server in the first server set, the target power consumption of the first server can be determined by collecting the power consumption of servers that perform the same test task as the first server. For example, for first server 1, determine the server that performs the same test task as first server 1, randomly collect the power consumption of a server that performs the same test task as first server 1, and use this power consumption as the target power consumption of first server 1. Similarly, the target power consumption of each first server in the first server set can be determined.
[0039] After determining the target power consumption of each first server in the first server set, a first sum of the target power consumption of each first server is calculated to determine the total power consumption of the first server set.
[0040] In some embodiments, obtaining the target power consumption of each first server in the first server set includes: obtaining the identity of each first server in the first server set; determining the order of each first server based on the identity of each first server; and determining the target power consumption of each first server based on the order of each first server.
[0041] In some embodiments, the target power consumption of each first server is determined based on the order in which each first server is located, including: determining one or more second servers that perform the same test items as each first server based on the order in which each first server is located; and determining the target power consumption of the corresponding first server based on the power consumption of each second server.
[0042] Specifically, the identity identifier of each first server in the first server set can be a barcode or a QR code, and the order to which each first server belongs can be determined by scanning the barcode or QR code. The identity identifier of each first server in the first server set can also be a serial number, and the order to which the first server belongs can be determined by querying a two-dimensional relationship mapping table between serial numbers and orders, wherein the two-dimensional relationship mapping table includes multiple serial numbers and the order corresponding to each serial number.
[0043] Each order in which a first server is located includes one or more second servers that perform the same test task as the first server. The target power consumption of the corresponding first server can be determined based on the power consumption of each second server. For example, for first server 1, the order in which first server 1 is located is determined based on the identity of first server 1. The order in which first server 1 is located includes second server 11, second server 22, and second server 33. The power consumption of second server 11, second server 22, and second server 33 is collected using a power meter. The target power consumption of first server 1 is determined based on the power consumption of second server 11, second server 22, and second server 33. For example, one of the power consumption of second server 11, second server 22, and second server 33 is randomly selected as the target power consumption of first server 1. Similarly, the target power consumption of each first server in the first server set can be determined.
[0044] It should be noted that, when the order for the first server includes only one second server, the second server is the first server, and the power consumption of the second server is determined as the target power consumption of the first server.
[0045] In some embodiments, determining the target power consumption of the corresponding first server based on the power consumption of each second server includes: determining the target power consumption of the corresponding first server based on the maximum value of the power consumption of the second server, the average value of the power consumption of the second server, or a preset percentile of the power consumption of the second server.
[0046] Exemplarily, for the first server 1, the order in which the first server 1 is located is determined based on the identity identifier of the first server 1. The order in which the first server 1 is located includes multiple second servers. The power consumption of the multiple second servers is collected separately, the power consumption of the multiple second servers is compared, and the maximum power consumption among the power consumptions of the multiple second servers is used as the target power consumption of the first server 1.
[0047] Alternatively, the average power consumption of multiple second servers can be calculated and used as the target power consumption for first server 1. However, some test items may cause a sharp increase in the power consumption of the second servers. Simply calculating the average power consumption of all second servers may underestimate the actual peak power consumption, leading to power safety issues during the test, such as current overload and tripping. Therefore, the target power consumption of first server 1 can be determined by combining the historical average power consumption of each second server to reduce power safety issues. For example, the target power consumption of each second server can be calculated using the following formula:
[0048] P m2,i =αP h2,i +(1-α)P c2,i ,
[0049] Among them, P m2,i represents the target power consumption of the i-th second server; P h2,i represents the historical average power of the i-th second server; P c2,i represents the current power of the i-th second server; α represents a preset weight parameter, wherein the preset weight parameter α can be calibrated according to actual conditions, for example, the preset weight parameter α can be 0.25, and no specific limitation is made here.
[0050] After the target power consumption of each second server is determined according to the above formula, an average value is calculated and the average value is used as the target power consumption of the first server 1 .
[0051] Alternatively, a preset quantile of the power consumption of the second server can be calculated, and the preset quantile can be used as the target power consumption of the first server 1. For example, assuming that the power consumption of multiple second servers is 200W, 100W, 180W, 120W, and 150W respectively, the power consumption of the multiple second servers is sorted in order from small to large and represented as 100W, 120W, 150W, 180W, and 200W, and the preset quantile is determined based on the power consumption of the sorted second servers. In the embodiment of the present application, the 80% quantile is used as an example for illustration, but it is not intended to limit the present application. The calculation formula for the 80% quantile is as follows:
[0052] k= ,
[0053] P80%=P(k)+0.8(nk)(P(k+1)-P(k)),
[0054] Where P80% represents the 80% quantile; P(k) represents the kth power consumption; n represents the number of second servers; P(k+1) represents the k+1th power consumption; Indicates a floor operation.
[0055] k= = =4,
[0056] P80%=P(4)+0.8(5-4)(P(5)-P(4))=196 W,
[0057] That is, the 80% quantile is 196 W, that is, the target power consumption of the first server 1 is 196 W.
[0058] It should be noted that, when calculating the preset quantile of the power consumption of the second server, the current power consumption of the second server may be used, or a plurality of power consumptions of the second server collected over a period of time may be used.
[0059] It should be noted that when obtaining the power consumption of the second server in an order, in order to improve the test efficiency, only the power consumption of a preset number (for example, 5) second servers can be collected and uploaded, or when collecting the power consumption of the second servers, the collection and uploading of the power consumption can be stopped until the first server in the order is collected.
[0060] In some embodiments, the server to be tested, the test area and the test rack position include corresponding status information identifiers, and determining that the server to be tested, the test area and the test rack position meet the off-peak testing conditions includes: detecting the corresponding status information identifiers of the server to be tested, the test area and the test rack position; when the corresponding status information identifiers of the server to be tested, the test area and the test rack position are all in the preset state, determining that the off-peak testing conditions are met.
[0061] Specifically, the server to be tested, the test area and the test rack position all include corresponding status information identifiers. Before determining the test status of the server to be tested, it is also necessary to determine whether the server to be tested, the test area and the test rack position meet the off-peak test conditions based on the corresponding status information identifiers of the server to be tested, the test area and the test rack position.
[0062] Among them, the status information identifier of the server to be tested, the status information identifier of the test area, and the status information identifier of the test rack position can be serial numbers. For example, if the status information identifier of the server to be tested is serial number 1, the status of the server to be tested can be determined based on the mapping relationship between serial number 1 and the status of the server to be tested. If it is determined that the status of the server to be tested is the preset state, it is determined that the server to be tested allows off-peak testing; if the status information identifier of the test area is serial number 2, the status of the test area can be determined based on the mapping relationship between serial number 2 and the status of the test area. If it is determined that the status of the test area is the preset state, it is determined that the test area allows off-peak testing; if the status information identifier of the test rack position is serial number 3, the status of the test rack position can be determined based on the mapping relationship between serial number 3 and the status of the test rack position. If the status of the test rack position is determined, it is determined that the test rack position allows off-peak testing.
[0063] If it is detected that the states of the server to be tested, the test area and the test rack position are all in the preset states, it is determined that the server to be tested, the test area and the test rack position meet the off-peak test conditions.
[0064] In some embodiments, the method further includes: updating the first preset power consumption threshold based on a second preset time interval. The second preset time interval can be calibrated according to actual conditions and is not specifically limited here.
[0065] Specifically, because the power consumption of the server under test is calculated based on the power consumption of the second server in the order to which the server under test belongs, it may differ from the actual power consumption of the server under test, thereby affecting power safety. Therefore, it is necessary to update the first preset power consumption threshold based on the second preset time interval, for example, by increasing or decreasing the first preset power consumption threshold.
[0066] In this way, by regularly adjusting the first preset power consumption threshold, it is possible to dynamically respond to changes in power consumption during actual operation, and to a certain extent avoid power waste or overload problems caused by unreasonable threshold settings.
[0067] In some embodiments, updating the first preset power consumption threshold based on a second preset time interval includes: collecting the actual power consumption of the power phase in which the server to be tested is located based on the second preset time interval; and updating the first preset power consumption threshold according to the actual power consumption of the power phase in which the server to be tested is located and the total power consumption of the first server set.
[0068] Specifically, when the power phase of the server to be tested is the first power phase of PDU1 with a 380V power supply, the actual power consumption of the first power phase of PDU1 can be collected at every second preset time interval by a power meter set at the power line of the first power phase of PDU1. The actual power consumption of the first power phase of PDU1 is compared with the total power consumption of the first server set to obtain a comparison result, and whether to update the first preset power consumption threshold is determined based on the comparison result, and when it is determined that the first preset power consumption threshold is updated, how to update the first preset power consumption threshold is further determined. For example, if the actual power consumption of the first power phase of PDU1 is equal to the total power consumption of the first server set, the first preset power consumption threshold is not adjusted; if the actual power consumption of the first power phase of PDU1 is greater than the total power consumption of the first server set, the first preset power consumption threshold is increased; if the actual power consumption of the first power phase of PDU1 is less than the total power consumption of the first server set, the first preset power consumption threshold is lowered.
[0069] In the case where the power phase of the server to be tested is PDU1 with a 220V power supply, the actual power consumption of PDU1 can be directly read through PDU1 at every second preset time interval. The actual power consumption of PDU1 is compared with the total power consumption of the first server set to obtain a comparison result, and whether to update the first preset power consumption threshold is determined based on the comparison result. In the case of determining to update the first preset power consumption threshold, how to update the first preset power consumption threshold is further determined. For example, if the actual power consumption of PDU1 is equal to the total power consumption of the first server set, the first preset power consumption threshold is not adjusted; if the actual power consumption of PDU1 is greater than the total power consumption of the first server set, the first preset power consumption threshold is increased; if the actual power consumption of PDU1 is less than the total power consumption of the first server set, the first preset power consumption threshold is lowered.
[0070] In this way, by regularly collecting the actual power consumption of the power phase of the server to be tested and adjusting the first preset power consumption threshold in combination with the total power consumption of the first server set, power consumption deviations can be discovered and corrected in a timely manner, ensuring that the first preset power consumption threshold matches the actual power consumption, and to a certain extent avoiding the waste of power resources or overload risks caused by unreasonable setting of the first preset power consumption threshold, thereby optimizing the allocation and utilization efficiency of power resources.
[0071] In some embodiments, the first preset power consumption threshold is updated based on the actual power consumption of the power phase where the server to be tested is located and the total power consumption of the first server set, including: determining the absolute value of the difference between the actual power consumption of the power phase where the server to be tested is located and the total power consumption of the first server set; determining the adjustment ratio based on the ratio of the absolute value to the total power consumption of the first server set; when the actual power consumption of the power phase where the server to be tested is located is greater than the total power consumption of the first server set, raising the first preset power consumption threshold based on the adjustment ratio; when the actual power consumption of the power phase where the server to be tested is located is less than the total power consumption of the first server set, lowering the first preset power consumption threshold based on the adjustment ratio.
[0072] Specifically, when it is determined that the first preset power consumption threshold needs to be adjusted, the first preset power consumption threshold can be determined to be raised or lowered based on the comparison result of the actual power consumption of the power phase in which the server to be tested is located and the total power consumption of the first server set, and the adjustment ratio can be further determined based on the actual power consumption of the power phase in which the server to be tested is located and the total power consumption of the first server set. For example, the absolute value of the difference between the actual power consumption of the power phase and the total power consumption of the first server set is calculated, and the adjustment ratio is determined based on the ratio of the absolute value to the total power consumption of the first server set.
[0073] For example, if the actual power consumption of the power phase in which the server to be tested is located is greater than the total power consumption of the first server set, the first preset power consumption threshold is raised based on the adjustment ratio. For example, assuming that the adjustment ratio is 12% and the first preset power consumption threshold is 300W, then the adjusted first preset power consumption threshold is 336W. It should be noted that when raising the first preset power consumption threshold, it is necessary to ensure that the raised first preset power consumption threshold does not exceed the rated power consumption of the power phase in which the server to be tested is located; if the actual power consumption of the power phase is less than the total power consumption of the first server set, the first preset power consumption threshold is lowered based on the adjustment ratio. For example, assuming that the adjustment ratio is 12% and the first preset power consumption threshold is 300W, then the adjusted first preset power consumption threshold is 264W.
[0074] It should be noted that when the first preset power consumption threshold is increased or decreased based on the adjustment ratio, an adjustment coefficient may be added to control the adjustment range. For example, when the first preset power consumption threshold is increased based on the adjustment ratio, assuming the adjustment ratio is 12%, the adjustment coefficient is 0.1, and the first preset power consumption threshold is 300W, then the adjusted first preset power consumption threshold is 303.6W; when the first preset power consumption threshold is decreased based on the adjustment ratio, assuming the adjustment ratio is 12%, the adjustment coefficient is 0.1, and the first preset power consumption threshold is 300W, then the adjusted first preset power consumption threshold is 296.4W.
[0075] In this way, it can ensure to a certain extent that the first preset power consumption threshold matches the actual operating conditions, effectively avoid the waste of power resources or overload risks caused by unreasonable setting of the first preset power consumption threshold, and further improve the utilization efficiency of power resources and the stability of the system.
[0076] In some embodiments, before updating the first preset power consumption threshold, the method further includes: obtaining the actual power consumption of the test area where the server to be tested is located; determining the actual power consumption of the test area where the server to be tested is located based on the product of the actual power consumption of the test area where the server to be tested is located and a second preset time interval; determining a second sum of the actual power consumption of the power distribution units within the test area where the server to be tested is located; and updating the first preset power consumption threshold when the absolute value of the difference between the second sum and the actual power consumption of the test area where the server to be tested is located is less than the second preset power consumption threshold. The second preset power consumption threshold can be calibrated according to actual conditions and is not specifically limited here.
[0077] Specifically, if the power phase of the server to be tested is the first power phase of PDU1 with a 380V power supply, the actual power consumption of the first power phase of PDU1 collected by a power meter installed on the power line of the first power phase of PDU1 may be inaccurate due to a power meter failure. If the power phase of the server to be tested is a 220V power supply of PDU1, the actual power consumption of PDU1 can be directly read through PDU1, which may be inaccurate due to a PDU1 failure. Therefore, before updating the first preset power consumption threshold, the accuracy of the actual power consumption of the power phase of the server to be tested can be determined by obtaining the actual power of the test area where the server to be tested is located.
[0078] The actual power consumption of the test area where the server to be tested is located can be obtained through the electric meter set in the test area, and the actual power consumption of the test area where the server to be tested is located is determined based on the product of the actual power consumption of the test area where the server to be tested is located and the second preset time interval.
[0079] The test area where the server to be tested is located may include multiple power distribution units, and the actual power consumption of each power distribution unit can be directly read. After the reading is completed, the second sum value of the actual power consumption of the power distribution units in the test area where the server to be tested is located is calculated.
[0080] The absolute value of the difference between the second sum and the actual power consumption of the test area where the server to be tested is located is calculated, and the absolute value is compared with the second preset power consumption threshold to obtain a comparison result, and whether the first preset power consumption threshold can be updated is determined according to the comparison result.
[0081] Exemplarily, if the absolute value of the difference between the sum and the actual power consumption of the test area where the server to be tested is located is less than the second preset power consumption threshold, it means that the difference between the second sum and the actual power consumption of the test area where the server to be tested is located is relatively small, that is, the actual power consumption of the power phase where the server to be tested is located is determined to be relatively accurate, and then it is determined that the first preset power consumption threshold can be updated; if the absolute value of the difference between the sum and the actual power consumption of the test area where the server to be tested is located is greater than or equal to the second preset power consumption threshold, it means that the difference between the second sum and the actual power consumption of the test area where the server to be tested is located is relatively large, that is, the actual power consumption of the power phase where the server to be tested is located is determined to be inaccurate, and then it is determined that the first preset power consumption threshold cannot be updated.
[0082] In this way, by introducing a dual verification mechanism of the actual power consumption of the test area and the actual power consumption and value of the PDU, abnormal data can be effectively filtered out, ensuring that the update of the first preset power consumption threshold is more accurate and reliable, avoiding misjudgment due to local power consumption fluctuations or measurement errors, and improving the accuracy of power consumption management. At the same time, it also reduces the security risks caused by power consumption issues.
[0083] To sum up, the present application can achieve precise allocation of power resources by obtaining the identity of the server to be tested and determining its test area, test rack position and power phase, effectively avoiding the problem of power waste caused by reserving maximum power consumption, and increasing the utilization rate of the test station, effectively solving the problems of limited test stations and low testing efficiency in the prior art, and by determining the first server set that is in the same test area, the same test rack position and the same power phase as the server to be tested, and determining the test status of the server to be tested based on the total power consumption of the first server set, system-level power consumption control is achieved, solving the problems of lack of system-level control and inability to effectively avoid current overload and power outages, significantly improving the efficiency of energy management, and thus comprehensively improving the overall efficiency and reliability of server testing. reliability; at the same time, by regularly collecting the actual power consumption of the power phase of the server to be tested and adjusting the first preset power consumption threshold in combination with the total power consumption of the first server set, the power consumption deviation can be discovered and corrected in time, and the first preset power consumption threshold can be ensured to match the actual power consumption, avoiding the waste of power resources or overload risks caused by unreasonable setting of the first preset power consumption threshold, and optimizing the allocation and utilization efficiency of power resources; in addition, by introducing a dual verification mechanism of the actual power consumption of the test area and the actual power consumption and value of the PDU, abnormal data can be effectively filtered out, and the update of the first preset power consumption threshold can be ensured to be more accurate and reliable, avoiding misjudgment caused by local power consumption fluctuations or measurement errors, improving the accuracy of power consumption management, and reducing the safety risks caused by power consumption problems.
[0084] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0085] The embodiment of the present application also provides an electronic device, referring to Figure 4 The electronic device 200 includes a memory 210, a processor 220, and a computer program stored in the memory 210 and executable on the processor 220. When the processor 220 executes the computer program, the aforementioned server testing method is implemented.
[0086] An embodiment of the present application further provides a non-volatile computer-readable storage medium having a computer program stored thereon, which implements the aforementioned server testing method when executed by a processor.
[0087] In an exemplary embodiment, the non-volatile computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0088] An embodiment of the present application further provides a computer program product, including a computer program / instruction, which implements the aforementioned server testing method when the computer program / instruction is executed by a processor.
[0089] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned server testing method embodiments are implemented.
[0090] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0091] The above is a detailed introduction to the server testing method, electronic device and storage medium provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A server testing method, characterized in that: The method comprises: Obtaining an identity identifier of the server to be tested, and determining a test area, a test rack position, and a power phase of the server to be tested according to the identity identifier of the server to be tested; When it is determined that the server to be tested, the test area, and the test rack position meet the off-peak test conditions, determining a first server set that is in the same test area, the same test rack position, and the same power phase as the server to be tested; Determining the total power consumption of the first server set, and determining a test status of the server to be tested according to the total power consumption; Wherein, determining the total power consumption of the first server set includes: obtaining the target power consumption of each of the first servers in the first server set; determining the total power consumption based on the first sum of the target power consumption of each of the first servers; wherein, obtaining the target power consumption of each of the first servers in the first server set includes: obtaining the identity of each of the first servers in the first server set; determining the order of each of the first servers according to the identity of each of the first servers; and determining the target power consumption of each of the first servers according to the order of each of the first servers.
2. The server testing method according to claim 1, wherein: Determining a test state of the server to be tested according to the total power consumption includes: When the total power consumption is greater than or equal to a first preset power consumption threshold, determining that the server to be tested is in a waiting for test state; When the total power consumption is less than the first preset power consumption threshold, it is determined that the server to be tested is in a testing state.
3. The server testing method according to claim 2, wherein: After determining that the server to be tested is in a waiting-for-test state, the method further includes: The test status of the server to be tested is re-determined based on a first preset time interval, and when it is determined that the server to be tested is in the test status, the server to be tested is controlled to execute a corresponding test item.
4. The server testing method according to claim 1, wherein: Determining a target power consumption of each first server according to the order in which each first server is located includes: Determining, according to the order of each first server, one or more second servers that execute the same test item as each first server; The target power consumption of the corresponding first server is determined according to the power consumption of each second server.
5. The server testing method according to claim 4, characterized in that: Determining the target power consumption of the corresponding first server according to the power consumption of each second server includes: The target power consumption of the corresponding first server is determined according to a maximum value of the power consumption of the second server, an average value of the power consumption of the second server, or a preset quantile of the power consumption of the second server.
6. The server testing method according to claim 1, wherein: The server to be tested, the test area, and the test rack position include corresponding status information identifiers, and determining that the server to be tested, the test area, and the test rack position meet the off-peak test conditions includes: Detecting status information identifiers corresponding to the server to be tested, the test area, and the test rack position; When the status information identifiers corresponding to the server to be tested, the test area, and the test rack position are all in preset states, it is determined that the off-peak test condition is met.
7. The server testing method according to claim 2, wherein: The method further comprises: The first preset power consumption threshold is updated based on a second preset time interval.
8. The server testing method according to claim 7, characterized in that: Updating the first preset power consumption threshold based on a second preset time interval includes: collecting the actual power consumption of the power phase of the server to be tested based on the second preset time interval; The first preset power consumption threshold is updated according to the actual power consumption of the power phase where the server to be tested is located and the total power consumption of the first server set.
9. The server testing method according to claim 8, characterized in that: Updating the first preset power consumption threshold according to the actual power consumption of the power phase where the server to be tested is located and the total power consumption of the first server set includes: Determine an absolute value of a difference between actual power consumption of a power phase where the server to be tested is located and the total power consumption of the first set of servers; determining an adjustment ratio based on a ratio of the absolute value to the total power consumption of the first set of servers; When the actual power consumption of the power phase where the server to be tested is located is greater than the total power consumption of the first set of servers, increasing the first preset power consumption threshold based on the adjustment ratio; When the actual power consumption of the power phase where the server to be tested is located is less than the total power consumption of the first server set, the first preset power consumption threshold is lowered based on the adjustment ratio.
10. The server testing method according to claim 7, characterized in that: Before updating the first preset power consumption threshold, the method further includes: Obtaining the actual power consumption of the test area where the server to be tested is located; Determining the actual power consumption of the test area where the server to be tested is located based on the product of the actual power consumption of the test area where the server to be tested is located and the second preset time interval; Determine a second sum value of actual power consumption of power distribution units within a test area where the server to be tested is located; When the absolute value of the difference between the second sum and the actual power consumption of the test area where the server to be tested is located is smaller than the second preset power consumption threshold, the first preset power consumption threshold is updated.
11. A non-volatile computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the server testing method according to any one of claims 1 to 10 is implemented.
12. An electronic device, characterized in that: The server testing method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the server testing method according to any one of claims 1 to 10 is implemented.
13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the server testing method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Server pressure measurement scheduling method and device
CN115543710A