Independent AC cycle restart test method and system for production test server
By using the USB flash drive to store physical location information and PDU binding information in server production testing, the problem of server positioning is solved, and precise control and efficient testing of the production test server are achieved.
Patent Information
- Application Number
- CN202510510510.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-04-23
AI Technical Summary
In server production testing, it is difficult for the prior art to accurately locate the physical location of the server under test, resulting in the inability to accurately control the power supply of the server, affecting the accuracy and efficiency of the test.
Through the independent AC loop restart test method in dynamic scenarios, the U disk stores the physical location information of the server under test, obtains PDU binding information, conducts connection tests between the PDU and the server under test, ensures that the power supply interface is connected correctly, and performs the AC loop restart test.
Accurate control of production test servers is achieved, positioning difficulties caused by random IP changes are avoided, maintenance costs and workload of the test environment are reduced, and concurrency and efficiency of the test are improved.
Smart Images

Figure CN120045398A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an independent AC cycle restart test method and system for producing test servers, belonging to the field of communication technologies. Background Art
[0002] Servers need to go through a series of test items during mass production testing to ensure the quality of server products. Among them, the AC cycle restart test item is an important part of the aging test, ensuring that the server can still work normally after being powered on in the event of a sudden power outage. Obviously, the above test requires an external PDU to control the power on and off. However, since the servers are produced with all new components and new network cards, their MAC addresses are not fixed, and the IPs obtained after being racked are randomly changed, making it impossible to accurately locate the physical location of the tested machine, that is, the test machine position number. Summary of the Invention
[0003] The present invention provides an independent AC cycle restart test method and system for producing test servers, aiming to solve at least one of the technical problems existing in the prior art.
[0004] The technical solution of the present invention relates to an independent AC cycle restart test method for producing test servers in a dynamic scenario. The method according to the present invention includes the following steps: S100. Determine whether the tested server is ready for racking; S200. Start the test script and read the location information; S300. Obtain the PDU binding information to obtain the PDU address and its power supply interface information; S400. Conduct a connection test between the PDU and the tested server to determine that the connection between the tested server and the PDU power supply interface is correct; S500. Perform an AC cycle restart test on the tested server.
[0005] Further, the step S400 includes: S410. Obtain the quantity and voltage information of all power supplies; S420. Determine whether the quantity of power supplies is consistent with the quantity of PDU power supply interface information. If not, directly report an error and exit; S430. After setting all the power supplies to be powered on, wait for several seconds; S440. Traverse and check whether all PDU power supply interfaces are correct; S450. If each power supply interface passes the inspection, determine that the power supply interface connection is correct.
[0006] Further, the step S440 includes: S441. Cut off the power supply and cyclically check the number of power supplies with a voltage of 0 within N minutes. If the return value shows that there is exactly one powered-on power supply, it is determined to be normal; otherwise, an error is reported. S442. Apply power and cyclically check the number of power supplies with a voltage of 0 within M minutes (such as 2 minutes). If the return value is 0, it is determined to be normal; otherwise, an error is reported.
[0007] Furthermore, in step S200, the physical location of the server under test is stored via a USB flash drive.
[0008] Furthermore, the physical location of each server under test corresponds to the number of a USB flash drive.
[0009] Furthermore, step S500 includes: S510. After receiving a test instruction, obtain the number of the USB flash drive corresponding to the server under test to be tested, and determine the PDU interface of the server under test according to the pre-recorded PDU binding relationship. S520. Invoke a PDU request to request a delayed restart request for the corresponding power supply interface, trigger a power-off restart, and write a file to record the current number of restart tests. S530. After restarting, determine the current number of restarts. If the number of restarts has reached the required number of test standards and there are no other abnormal situations, the AC cyclic restart test passes.
[0010] The technical solution of the present invention also relates to a computer-readable storage medium, on which program instructions are stored. When the program instructions are executed by a processor, the above-mentioned method is implemented.
[0011] The technical solution of the present invention also relates to an independent AC cyclic restart system for a production test server. The system includes a computer device, and the computer device includes the above-mentioned computer-readable storage medium.
[0012] Furthermore, the system includes a server, a server under test, and a PDU. The server, the server under test, and the PDU are set in the same local area network.
[0013] Furthermore, the system also includes a USB network card or a USB flash drive for storing location information.
[0014] The beneficial effects of the present invention are as follows: The independent AC cycle restart test method and system for production test servers proposed by the present invention can locate the physical positions of production test servers and the binding relationships between the corresponding server intelligent PDU IPs and power supply interfaces, so as to accurately control the power on and off of a certain production test server. The production test servers under test can operate independently of each other during testing without interference. The binding relationship between the power supply of the server under test and the PDU power supply interface only needs to be maintained once, and the method of reading the physical position from the USB flash drive is stable and efficient, without the need to increase additional fixtures and server costs. The test of a single server under test is independent, and the power on and off tests of each server under test do not affect each other, and the test progress of each server under test can be different, thus improving concurrency and test efficiency. Before the test, an anti-fooling check test of the PDU power supply interface is carried out to ensure whether the power supply of the server under test is correctly connected to the PDU power supply interface, and to avoid abnormal impacts caused by human operation errors. The overall architecture is simple, and the server only needs to provide the data maintenance of the PDU power supply interface binding relationship and obtain the power supply interface, without complex scanning control operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is the basic flowchart of the method according to the present invention.
[0016] Figure 2 is the server deployment architecture diagram of the system according to the present invention.
[0017] Figure 3 is the relationship diagram of the PDU and the rack position according to the system of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] The concept, specific structure and technical effects of the present invention will be clearly and completely described below in conjunction with the embodiments and the drawings, so as to fully understand the purpose, solution and effects of the present invention.
[0019] It should be noted that, unless otherwise specified, when a feature is referred to as "fixed" or "connected" to another feature, it can be directly fixed or connected to the other feature, or indirectly fixed or connected to the other feature. The singular forms "a", "the" and "said" used herein are also intended to include the plural forms, unless the context clearly indicates otherwise. In addition, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs. The terms used in the description of this specification are only for describing specific embodiments, and are not intended to limit the present invention. The term "and / or" used herein includes any combination of one or more of the related listed items.
[0020] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various elements, these elements should not be limited to these terms. These terms are only used to distinguish elements of the same type from each other. For example, without departing from the scope of this disclosure, the first element may also be referred to as the second element, and similarly, the second element may also be referred to as the first element. The use of any and all examples or exemplary language (such as "for example", "such as", etc.) provided herein is only intended to better illustrate the embodiments of the present invention and will not impose a limitation on the scope of the present invention unless otherwise required.
[0021] Referring to Figures 1 to 2 , in some embodiments, an independent AC cycle restart test method for producing a test server according to the present invention includes at least the following steps: S100. Determine whether the server under test is ready for rack installation; S200. Start the test script and read the location information; S300. Obtain the PDU binding information to obtain the PDU address and its power supply interface information; S400. Perform a connection test between the PDU and the server under test to determine that the server under test is correctly connected to the PDU power supply interface; S500. Perform an AC cycle restart test on the server under test.
[0022] This solution realizes the precise control of the power on and off of a specific server under test by establishing a precise binding relationship between the physical location of the server under test, the IP of the intelligent PDU, and the power supply interface, enabling each server under test to independently run the AC (Alternating Current) cycle restart test, effectively avoiding the positioning difficulty problem caused by the random change of the IP in the traditional test method. Moreover, this binding relationship only needs to be maintained once during system initialization and can be stably used for a long time during subsequent test processes, greatly reducing the maintenance cost and workload of the test environment.
[0023] Among them, adopting the technical path of reading the physical location information from a USB flash drive can effectively improve the stability and efficiency of information acquisition, and effectively avoid the procurement cost of additional fixtures and the cost of server hardware transformation. In addition, the system supports each server under test to independently run the test process, and the test progress can be flexibly adjusted according to actual needs, and there will be no interference between different servers, thus qualitatively improving the concurrency of the test and being beneficial to shortening the test cycle of mass server production.
[0024] Among them, an anti-fooling inspection and test link for the PDU power supply interface is introduced, which automatically verifies the connection accuracy between the server power supply and the PDU power supply interface before the formal test, effectively preventing test anomalies caused by mistakes such as human wiring errors, and improving the reliability and stability of the test process. Moreover, the overall system architecture design is simple and efficient. The server only needs to undertake basic functions such as data maintenance of the binding relationship of the PDU power supply interface and providing interface information, without performing complex scanning control operations, which can reduce the consumption of computing resources during system operation and greatly reduce the difficulty of system deployment and maintenance.
[0025] In some embodiments, referring to Figure 2 and Figure 3 , the server of the present invention includes a server, a server under test, and an intelligent PDU (Power Distribution Unit), and the three are in the same local area network. Moreover, the U disk number corresponds to the physical location of the test position (server under test). Specifically, a batch of U disks are labeled to bind the physical location of the test position, so that one test position corresponds to one U disk number. And the physical location information of the test position is stored in the U disk. Specifically, structured physical location information of the test position is written into the U disk and stored in the location.yaml file, and its format is as follows: location: rack_number: 01 / / Rack number chest_number: 01 / / Position number Furthermore, each PDU is set with a fixed IP. And the binding relationship between the PDU power supply interface number and the test position is maintained by the server and pre-stored in the database. Among them, the server under test may have different situations such as 2 power supplies, 4 power supplies, 6 power supplies, or 8 power supplies, etc. The binding relationship with the PDU (i.e., the power connection method) can be divided into the following several modes.
[0026] For example: 2-power supply mode: T01-01 -> Bind to PDU1 IP: 192.168.11.15, bound plug positions 1, 2; T01-02 -> Bind to PDU1 IP: 192.168.11.15, bound power supply interfaces 3, 4; 4-power supply mode: T01-01 -> Bind to PDU1 IP: 192.168.11.15, bound power supply interfaces 1, 2, 3, 4; T01-02 -> Bind PDU1 IP: 192.168.11.15, bound power supply interfaces 5, 6, 7, 8; 6 Power supply mode: T01-01 -> Bind PDU1 IP: 192.168.11.15, bound power supply interfaces 1, 2, 3, 4, 5, 6; T01-02 -> Bind PDU2 IP: 192.168.11.16, bound power supply interfaces 1, 2, 3, 4, 5, 6; Among them, T01 represents the 1st rack, T01-01 represents the 1st test position of the 1st rack, that is, the physical location where the server under test is located. Correspondingly, T01-02 represents the 2nd test position of the 1st rack. There are multiple test positions on one rack of the present invention, and one server under test can be placed / connected on one test position. For example, one rack is equipped with 3 PDUs with 8 power supply interfaces. T01-01 and T01-02 respectively represent position 01 and position 02 of rack T01. In the 2 power supply mode, the server on position 01 is connected to the 1st and 2nd power supply interfaces of the first PDU; the server on position 02 is connected to the 3rd and 4th power supply interfaces of the first PDU. It can be understood that the binding relationships in power supply modes such as 8 power supply mode, 10 power supply mode, and 12 power supply mode are analogized accordingly. It should be noted that the binding relationship of the method of the present invention only needs to be maintained once, and subsequent tests of all servers only need to connect the power supply to the corresponding power supply interfaces of the PDU according to the binding rules.
[0027] See Figure 2 , the system of the present invention includes a server under test, an intelligent PDU, a USB flash drive storing location information, a server under test, and a server. Among them, the intelligent PDU is connected to the test script of the server under test and is used to perform AC cycle restart operations; the USB flash drive storing location information is inserted into the server under test to record the binding relationship between the physical location of the server under test and the corresponding intelligent PDU. The server communicates with the intelligent PDU through a switch, maintains the corresponding relationship between the physical location of the server under test and the PDU, and issues test instructions. During testing, the system automatically identifies the intelligent PDU to which the server under test belongs through the location information in the USB flash drive, triggers the test script by the server, controls the intelligent PDU to complete periodic power-off / power-on operations, and monitors the server status at the same time to achieve accurate automated testing and fault location.
[0028] Here, a specific embodiment is used for illustration. See Figure 3The relationship between the PDU power supply interface number and the test machine position. Specifically, multiple test machine positions for connecting the servers under test are set inside the rack 01, including test machine positions from 01 to 12, and three intelligent PDUs are configured, including intelligent PDU1 with 8 power supply interfaces, intelligent PDU2, and intelligent PDU3. When the server under test has 2 power supplies, the 2 - power supply mode is adopted. The 8 power supply interfaces of intelligent PDU1 are respectively connected to test machine positions 01 to 04 of rack 01, with 2 power supply interfaces connected to each position; the 8 power supply interfaces of intelligent PDU2 are respectively connected to test machine positions 05 to 08 of rack 01; the 8 power supply interfaces of intelligent PDU3 are respectively connected to test machine positions 09 to 12 of rack 01. Each test machine position corresponds to a USB flash drive number, and the physical position information of this test machine position is stored in the USB flash drive. For example, the server under test is deployed at T01 - 01, that is, on the 01st position of the 01st rack; the server under test plugs in the USB flash drive storing the position number of this position; the power supply of the server under test is connected to the 1st and 2nd power supply interfaces of the PDU (IP: 192.168.11.15), and the PDU binding relationship is pre - entered in the server - side system, such as: T01 - 01 = { PduIp: 192.168.11.15 Port: 1, 2 } After the server under test is started, the test script runs. First, it reads the position information in the USB flash drive as T01 - 01, and then requests the PDU information bound to T01 - 01 from the server - side; the information returned by the interface is, for example: { PduIp: 192.168.11.15 Port: 1, 2 } At this time, the server under test can accurately request operations such as power - on, power - off, and delayed restart from the PDU to perform test tasks.
[0029] In some embodiments, the test operation process of the present invention includes the steps: S100. Determine whether the server under test is ready for rack installation. Specifically, determine that the USB flash drive corresponding to the position has been plugged in, and set the BIOS power - on automatic startup parameters.
[0030] S200. The test script starts to read the physical position information. Specifically, read all USB flash drives, search for the location.yaml file in the root directory of the USB flash drive, and read the physical position information inside.
[0031] S300. Obtain the PDU binding information. Specifically, obtain the PDU IP and power supply interface information corresponding to the position from the server - side according to the physical position.
[0032] S400. Conduct a connection test between the PDU and the server under test to ensure that the power supply interface of the server under test is correctly connected to the PDU. This includes the following steps: S410. Use the command "ipmitool sdr | grep PSU[0-9]_VIN" to obtain the number of power supplies and voltage information.
[0033] S420. Check whether the number of power supplies is consistent with the number of PDU power supply interface information. If they are inconsistent, directly report an error and exit.
[0034] S430. After setting all the power supplies to be powered on, wait for a certain number of seconds, such as 60s.
[0035] S440. Traverse all PDU power supply interfaces. For each power supply interface: First, cut off the power. Check the number of power supplies with a voltage of 0 within N minutes (such as 2 minutes) in a loop. If the return value shows that there is exactly one powered-on power supply, it is determined to be normal; otherwise, report an error. Then, power on and check the number of power supplies with a voltage of 0 within M minutes (such as 2 minutes) in a loop. If the return value is 0, it is determined to be normal; otherwise, report an error.
[0036] S450. If each power supply interface passes the inspection, it is determined that the power supply interface connection is correct.
[0037] S500. Perform an AC cycle restart test. Specifically, call the PDU request, and the corresponding power supply interface request delays the restart request to trigger a power-off restart, and write a file to record the current number of restart tests. After restarting, judge the current number of restarts. If the number of restarts has reached the required test standard and there are no other abnormal situations, the AC cycle restart test passes. It should be noted that according to each server under test having a unique SN number, it is scanned and written into the server motherboard during the first startup, and the server side distinguishes different servers under test through this. Further, both the SN number and the location number are reported to the server side, and the status information (idle, under test, completed, test exception, etc.) of each machine position can be clearly seen on the server side dashboard. Further, when tracing the test records of a certain server, it is also possible to know on which machine position the test was conducted at that time through this location information, which is useful when troubleshooting and suspecting that it is related to the current environment.
[0038] In some embodiments, the present invention first obtains the PDU binding information by calling pdu_manager.get_pdu_info(), and obtains the number of power supplies with a current voltage of 0 by calling get_zero_vin_count(). If there are power supplies with a voltage of 0, all PDUs are set to the powered-on state by pdu_manager.power_on() and wait for 60 seconds; subsequently, all power supply voltage information is obtained by get_all_psu_vin() to verify whether the number of power supplies matches the PDU configuration number and whether the voltage of each power supply is greater than 0; then, an alternating power-off test is performed on each PDU. The PDU power supply interface is disconnected one by one through pdu_manager.power_off(). After each power-off, a maximum of 6 retry checks are performed at 20-second intervals until it is detected that only one power supply voltage becomes 0 and remains stable for 30 seconds; finally, the power supply of this PDU interface is restored and it is verified that all power supply voltages return to normal. After all PDU connection checks are completed, a test success result is returned.
[0039] In some embodiments, when the present invention performs the AC cycle restart test, it first outputs the preset number of restart cycles and obtains the number of completed tests by get_done_times(); if the number of completed tests is less than the preset number, the serial number of the current restart test is output, the number of completed tests is incremented by 1 and stored by set_flag(), the passed-in call_reboot() function is called to perform the restart operation, and if the device still fails to restart normally after waiting for 300 seconds, a timeout exception is thrown; when the number of completed tests reaches the preset number, a test end prompt is output and a test success flag is returned.
[0040] Further, a test start prompt message is output. An internal function call_reboot() is defined in the try code block to perform the specific restart operation. After setting the restart flag bit file by set_power_flag(), this function calls pdu_manager.get_pdu_info() to obtain the PDU binding information, and uses pdu_manager.ac_reboot() to perform an AC restart operation on the PDU. Subsequently, the counter.do_loop() method is called to execute this restart process in a loop for the preset number of times; regardless of whether the test is successful, finally, in the finally code block, the restart flag bit file is cleared by counter.remove_flag() and remove_power_flag() to ensure the test environment is cleaned up.
[0041] It should be noted that the USB flash drive mode of the present invention can be replaced by a USB network card. Taking advantage of the fact that the MAC of the USB network card is fixed, the present invention can maintain the binding relationship between the MAC of the USB network card and the PDU power supply interface on the server side.
[0042] It should be recognized that the method steps in the embodiments of the present invention can be implemented or carried out by computer hardware, a combination of hardware and software, or computer instructions stored in a non-transitory computer-readable memory. The method can use standard programming techniques. Each program can be implemented in a high-level procedural or object-oriented programming language to communicate with the computer system. However, if necessary, the program can be implemented in assembly or machine language. In any case, the language can be a compiled or interpreted language. In addition, for this purpose, the program can run on a dedicated integrated circuit programmed for this purpose.
[0043] In addition, the operations of the processes described herein can be performed in any suitable order, unless otherwise indicated herein or otherwise clearly contradicted by the context. The processes described herein (or variations and / or combinations thereof) can be executed under the control of one or more computer systems configured with executable instructions and can be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) executed jointly on one or more processors, by hardware, or by a combination thereof. The computer program includes multiple instructions executable by one or more processors.
[0044] Furthermore, the method can be implemented in any type of computing platform operably connected, including but not limited to personal computers, minicomputers, mainframes, workstations, network or distributed computing environments, separate or integrated computer platforms, or communicating with charged particle tools or other imaging devices, etc. Aspects of the present invention can be implemented in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into the computing platform, such as a hard disk, optical read and / or write storage medium, RAM, ROM, etc., such that it can be read by a programmable computer and can be used to configure and operate the computer to execute the processes described herein when the storage medium or device is read by the computer. In addition, the machine-readable code, or portions thereof, can be transmitted via a wired or wireless network. When such media include instructions or programs that implement the above-described steps in combination with a microprocessor or other data processor, the inventions described herein include these and other different types of non-transitory computer-readable storage media. When programmed according to the methods and techniques of the present invention, the present invention can also include the computer itself.
[0045] A computer program can be applied to input data to perform the functions described herein, thereby transforming the input data to generate output data stored in a non-volatile memory. The output information can also be applied to one or more output devices such as a display. In a preferred embodiment of the present invention, the transformed data represents physical and tangible objects, including a specific visual depiction of the physical and tangible objects generated on the display.
[0046] As described above, it is only a preferred embodiment of the present invention. The present invention is not limited to the above embodiments. As long as it achieves the technical effects of the present invention by the same means, any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the scope of protection of the present invention. Within the scope of protection of the present invention, its technical solutions and / or implementation manners can have various different modifications and changes.
Claims
1. An independent AC cycle restart test method for a production test server, characterized in that: The method comprises the following steps: S100, determining whether the server under test is ready for launch; S200, the test script is started and the location information is read; S300, obtaining PDU binding information to obtain the PDU address and its power supply interface information; S400, performing a connection test between the PDU and the server under test to determine that the server under test is correctly connected to the PDU power supply interface; S500: Perform an AC cycle restart test on the server under test.
2. The method according to claim 1, characterized in that The step S400 includes: S410, obtaining the quantity and voltage information of all power supplies; S420, determining whether the number of power supplies is consistent with the number of power supply interface information of the PDU, and directly reporting an error and exiting if they are inconsistent; S430, after all power sources are set to be powered on, wait for several seconds; S440, check all PDU power supply interfaces to see if they are correct; S450: If each power supply interface passes the inspection, it is determined that the power supply interface is connected correctly.
3. The method according to claim 2, characterized in that The step S440 includes: S441, power off, and cyclically check the number of power supplies with voltage 0 within N minutes. If the return value shows that only one power supply is powered on, it is normal, otherwise an error is reported; S442, power on, and cyclically check the number of power supplies with a voltage of 0 within M minutes. If the return value is 0, it is normal, otherwise an error is reported.
4. The method according to claim 1, characterized in that: In step S200, the physical location of the server under test is stored via a USB flash drive.
5. The method according to claim 4, characterized in that The physical location of each of the tested servers corresponds to a serial number of the USB flash drive.
6. The method according to claim 5, characterized in that The step S500 includes: S510, after receiving the test instruction, obtain the U disk number corresponding to the tested server to be tested, and determine the PDU interface of the tested server according to the pre-entered PDU binding relationship; S520, calling the PDU request, the corresponding power supply interface requests a delayed restart request, triggering a power-off restart, and writing a file to record the current restart test; S530: After the restart, determine the number of restarts. If the number of restarts has reached the number required by the test standard and there are no other abnormal conditions, the AC cycle restart test passes.
7. A computer-readable storage medium, characterized in that: Program instructions are stored thereon, and when the program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.
8. An independent AC cycle restart system for production test servers, characterized in that: include: A computer device comprising a computer readable storage medium according to claim 7.
9. The system according to claim 8, characterized in that include: The server, the server under test and the PDU are arranged in the same local area network.
10. The system according to claim 9, characterized in that It also includes a USB network card or a USB flash drive for storing location information.
Citation Information
Patent Citations
Stability testing method and device for repeated power-on and power-off of server
CN110489282A
SSD abnormal power failure test method and device, computer equipment and storage medium
CN111552601A
Server power supply test method and device, electronic equipment and readable medium
CN115480627A
Method, device and system for controlling PDU, electronic equipment and storage medium
CN118796013A
Cited By
Python-based multi-thread remote server stability test system and method
CN121501688A
A python-based multi-thread remote server stability test system and method
CN121501688B