Server power supply testing methods, apparatus, equipment, media, and procedures.

By building a target container instance from a container image and decoupling the configuration file, the problems of poor compatibility and low deployment efficiency in traditional server power testing methods are solved, thereby achieving standardization and improved accuracy in server power testing.

CN122309260APending Publication Date: 2026-06-30SUGON INFORMATION IND +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SUGON INFORMATION IND
Filing Date
2026-03-18
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Traditional server power supply testing methods suffer from poor test compatibility, low deployment efficiency, low accuracy and reliability of generated test results due to differences in operating systems, BMC hardware dependencies and complex environment configurations.

Method used

By building a target container instance containing all test dependencies, loading the server power test configuration file externally onto the container instance, a target container test environment is generated. Server power tests are then performed in the target container test environment according to the server power test type. This achieves standardization and portability of the test environment and decouples the container image from the configuration file, allowing testers to perform tests by modifying the configuration file.

Benefits of technology

It improves the compatibility of server power supply testing, significantly enhances the accuracy and reliability of test results, reduces the test error rate, and accelerates test deployment efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122309260A_ABST
    Figure CN122309260A_ABST
Patent Text Reader

Abstract

This application provides a server power supply testing method, apparatus, device, medium, and program product, which can be applied to the fields of computer technology and big data technology. The method includes: acquiring a base operating system image, integration testing tools, a communication protocol client, and test scripts; generating a target container instance based on the base operating system image, integration testing tools, communication protocol client, and test scripts; acquiring a pre-set server power supply test configuration file; loading the server power supply test configuration file onto the target container instance to generate a target container environment; wherein the server power supply test configuration file includes a server power supply test type; and performing server power supply testing on the target server in the target container environment according to the server power supply test type, generating server power supply test results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to the field of big data technology, and in particular to a server power supply testing method, apparatus, equipment, medium, and program product. Background Technology

[0002] With the development of internet technology, the demand for servers from businesses and individuals is increasing, making server reliability crucial. To ensure server reliability, power supply testing is required before the server leaves the factory.

[0003] Traditional server power testing methods typically involve directly controlling the motherboard's power-on and power-off cycles via a hard reboot controlled by the BMC or IPMI, or automatically logging in and running tools based on different operating systems, or performing power tests within a single container environment that does not interact with the underlying hardware. However, these methods suffer from poor test compatibility, low deployment efficiency, low accuracy of test results, and poor reliability due to differences in operating systems, BMC hardware dependencies, and complex environment configurations. Summary of the Invention

[0004] In view of the above problems, this application provides a server power supply testing method, apparatus, device, medium, and program product.

[0005] According to a first aspect of this application, a server power supply testing method is provided. The method includes: acquiring a base operating system image, an integration testing tool, a communication protocol client, and a test script; generating a target container instance based on the base operating system image, the integration testing tool, the communication protocol client, and the test script; acquiring a pre-set server power supply test configuration file; loading the server power supply test configuration file onto the target container instance to generate the target container environment; wherein the server power supply test configuration file includes a server power supply test type; and performing server power supply testing on a target server in the target container environment according to the server power supply test type to generate server power supply test results.

[0006] According to an embodiment of this application, obtaining a base operating system image, integration testing tools, a communication protocol client, and test scripts, and generating a target container instance based on the base operating system image, integration testing tools, communication protocol client, and test scripts, includes: obtaining the base operating system image, integration testing tools, communication protocol client, and test scripts; generating a container image containing a complete testing environment based on the base operating system image, integration testing tools, communication protocol client, and test scripts; and obtaining the container image containing the complete testing environment, and generating a target container instance based on the container image containing the complete testing environment.

[0007] According to an embodiment of this application, generating a container image containing a complete test environment based on the base operating system image, integration testing tools, communication protocol client, and test script includes: integrating the integration testing tools, the communication protocol client, and the test script into the base operating system image; generating a container image containing a complete test environment through build instructions; and storing the container image containing the complete test environment in a private image repository.

[0008] According to an embodiment of this application, the server power test type includes: a restart test. The server power test is performed on the target server in the target container environment according to the server power test type, generating server power test results. This includes: connecting to the target server via an in-band channel communication protocol client and performing a restart operation on the target server; and obtaining key information about the target server after restart, analyzing the key information about the target server after restart, and generating the server power test results.

[0009] According to an embodiment of this application, the server power test type includes: a shutdown test. The server power test is performed on the target server in the target container environment according to the server power test type, generating server power test results. This includes: connecting to the target server via an in-band channel communication protocol client and performing a shutdown operation on the target server; performing a power-on operation on the target server after the shutdown operation according to a preset power-on cycle; and obtaining key information of the target server after power-on, analyzing the key information of the target server after power-on, and generating the server power test results.

[0010] According to an embodiment of this application, the server power test type includes: a power-off test. The server power test is performed on a target server in the target container environment according to the server power test type, generating server power test results. This includes: connecting to the target server via an in-band channel communication protocol client and performing a shutdown operation on the target server; controlling a power distribution unit electrically connected to the target server via an out-of-band channel communication protocol client to perform a power-off operation; supplying power to the power distribution unit electrically connected to the target server after the power-off operation according to a preset power-off cycle; performing a power-on operation on the target server after the shutdown operation; and acquiring key information of the target server after power-on, analyzing the key information of the target server after power-on, and generating the server power test results.

[0011] According to an embodiment of this application, connecting to the target server via an in-band channel communication protocol client and performing a shutdown operation on the target server includes: connecting to the target server via an in-band channel communication protocol client, performing a shutdown operation on the target server, and verifying the shutdown of the target server after the shutdown operation using a network tool.

[0012] According to an embodiment of this application, performing a power-on operation on a target server after a power-off operation includes: performing a power-on operation on the target server after a power-off operation, and performing a power-on verification on the target server after the power-on operation through a communication protocol.

[0013] According to an embodiment of this application, the key information includes: CPU information, memory information, disk information, network interface card (NIC) information, power supply information, and controller event logs. Analyzing the key information after the target server is powered on generates the server power supply test result, including: verifying the consistency of the CPU information, memory information, disk information, NIC information, power supply information, and controller event logs after the target server is powered on with the initial baseline data; and if the CPU information, memory information, disk information, NIC information, power supply information, and controller event logs after the target server is powered on are inconsistent with the initial baseline data, then a server power supply test result indicating that the server power supply test has failed is generated.

[0014] According to an embodiment of this application, the method further includes: if the CPU information, memory information, disk information, network card information, power supply information and controller event log of the target server after power-on are consistent with the initial baseline data, then obtain the non-critical information of the target server after power-on, analyze the non-critical information of the target server after power-on, and generate the server power test results.

[0015] According to an embodiment of this application, the non-critical information includes: blacklist / whitelist information, server temperature information, and event log error code information. Analyzing the non-critical information after the target server is powered on to generate the server power test result includes: verifying the compliance of the blacklist / whitelist information, server temperature information, and event log error code information after the target server is powered on; if the blacklist / whitelist information, server temperature information, and event log error code information after the target server is powered on are compliant, then a server power test result indicating that the server power test has passed is generated.

[0016] According to an embodiment of this application, the method further includes: if a server power test result indicating that the server power test has passed is generated, then a preset counter is incremented and the test is performed again until the preset counter reaches a preset threshold, at which point the test is terminated and a structured test report is generated.

[0017] According to a second aspect of this application, a server power supply testing apparatus is provided, comprising: a first generation module, configured to acquire a base operating system image, an integration testing tool, a communication protocol client, and a test script, and generate a target container instance based on the base operating system image, the integration testing tool, the communication protocol client, and the test script; a second generation module, configured to acquire a pre-set server power supply test configuration file, load the server power supply test configuration file onto the target container instance, and generate the target container environment, wherein the server power supply test configuration file includes a server power supply test type; and a third generation module, configured to perform server power supply testing on a target server in the target container environment according to the server power supply test type, and generate server power supply test results.

[0018] According to a third aspect of this application, an electronic device is provided, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.

[0019] A fourth aspect of this application also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.

[0020] The fifth aspect of this application also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.

[0021] According to the embodiments of this application, by constructing a target container instance containing all test dependencies, externally loading a server power test configuration file onto the container instance to generate a target container test environment, and performing server power tests in the target container test environment according to the server power test type, the technical means of separating the container image and configuration file achieve the standardization and portability of the test environment, improving the compatibility of server power tests. Simultaneously, it decouples the container image code from the configuration file, allowing testers to perform server power tests without needing to fully understand the code, only needing to modify the configuration file, effectively reducing the test error rate and significantly improving the accuracy and reliability of the generated server power test results. Furthermore, by performing server power tests on the target server in the target container environment according to the server power test type, test execution isolation can be achieved, accelerating test deployment and improving the efficiency of server power tests. This solves the technical problems of poor test compatibility, low deployment efficiency, low accuracy of generated test results, and poor reliability caused by differences in operating systems, BMC hardware dependencies, and complex environment configurations in existing technologies. Attached Figure Description

[0022] The above-mentioned contents, other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0023] Figure 1 The illustration schematically depicts application scenarios of server power testing methods, apparatus, devices, media, and program products according to embodiments of this application;

[0024] Figure 2 A flowchart illustrating a server power supply testing method according to an embodiment of this application is shown schematically.

[0025] Figure 3 This illustration schematically shows a flowchart of generating a target container instance in a server power testing method according to an embodiment of the present application;

[0026] Figure 4 The flowchart illustrating the restart test in the server power test method according to an embodiment of this application is shown in the schematic diagram.

[0027] Figure 5 The flowchart of the power-off test in the server power test method according to an embodiment of this application is illustrated schematically.

[0028] Figure 6 A flowchart illustrating a server power supply test method for power interruption testing according to an embodiment of this application is shown schematically.

[0029] Figure 7This illustration schematically shows a flowchart of the consistency verification of key information in a server power supply testing method according to an embodiment of this application;

[0030] Figure 8 This illustration schematically shows a flowchart of the consistency verification of non-critical information in a server power supply testing method according to an embodiment of this application;

[0031] Figure 9 This schematic diagram illustrates a structural block diagram of a server power supply testing apparatus according to an embodiment of this application;

[0032] Figure 10 A block diagram schematically illustrates an electronic device suitable for implementing a server power supply testing method according to an embodiment of this application. Detailed Implementation

[0033] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.

[0034] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0035] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0036] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).

[0037] The accompanying drawings show some block diagrams and / or flowcharts. It should be understood that some blocks or combinations thereof in the block diagrams and / or flowcharts can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable control device, so that when executed by the processor, these instructions can create means for implementing the functions / operations described in these block diagrams and / or flowcharts.

[0038] First, the technical terms used in this article are explained as follows:

[0039] BMC (Baseboard Management Controller) is an independent embedded management controller in a server.

[0040] IPMI (Intelligent Platform Management Interface) is used for out-of-band management of server hardware.

[0041] Outbound management refers to monitoring and maintaining equipment through an independent, dedicated management channel that is completely separate from the "main channel" through which the equipment processes business data.

[0042] MachineCheck is a hardware-level error detection and reporting mechanism within the server CPU, used to capture and handle low-level hardware errors that lead to system crashes and data corruption.

[0043] CPU (Central Processing Unit) is used to execute computer instructions, process data, and coordinate and control the work of all other hardware in the computer.

[0044] SSH (Secure Shell) is an encrypted network protocol used to securely log in to servers or other network devices over the Internet and to perform command-line operations and management.

[0045] SNMP (Simple Network Management Protocol) is a standard Internet protocol used to collect, organize, and exchange management and monitoring information for network devices.

[0046] Python is a general-purpose, high-level, interpreted, dynamically typed language that supports multi-paradigm programming.

[0047] A container image is a software installation package and blueprint (containing all dependencies such as the program, libraries, and configuration). A container instance is an independent process environment created from a container image.

[0048] The config.ini configuration file is a text file that stores application settings, parameters, and connection information.

[0049] Ping is a network probing tool used to test connectivity and latency between your local machine and another network device.

[0050] A PSU (Power Supply Unit) is used to convert alternating current (AC) into stable direct current (DC) required by various components in a computer and to distribute different voltages to them.

[0051] A PDU (Power Distribution Unit) is a device with multiple output sockets used to centrally distribute power to servers, switches, and other equipment within a rack.

[0052] BIOS (Basic Input Output System) is a set of basic programs embedded in the computer's motherboard chip, used to control the detection and booting of computer hardware.

[0053] A RAID array is a data storage array that combines multiple independent physical hard drives to form a single logical drive.

[0054] This application provides a server power supply testing method, which includes: acquiring a base operating system image, integration testing tools, a communication protocol client, and test scripts; generating a target container instance based on the base operating system image, integration testing tools, communication protocol client, and test scripts; acquiring a pre-set server power supply test configuration file; loading the server power supply test configuration file onto the target container instance to generate the target container environment; wherein the server power supply test configuration file includes a server power supply test type; and performing server power supply testing on a target server in the target container environment according to the server power supply test type, generating server power supply test results.

[0055] According to the embodiments of this application, by constructing a target container instance containing all test dependencies, externally loading a server power test configuration file onto the container instance to generate a target container test environment, and performing server power tests in the target container test environment according to the server power test type, the technical means of separating the container image and configuration file achieve the standardization and portability of the test environment, improving the technical effect of server power test compatibility. Simultaneously, it decouples the container image code from the configuration file, allowing testers to perform server power tests without needing to fully understand the code, only needing to modify the configuration file, effectively reducing the test error rate and significantly improving the accuracy and reliability of the generated server power test results. Furthermore, by performing server power tests on the target server in the target container environment according to the server power test type, test execution isolation can be achieved, accelerating test deployment and improving server power test efficiency. This solves the technical problems of poor test compatibility, low deployment efficiency, low accuracy of generated test results, and poor reliability caused by differences in operating systems, BMC hardware dependencies, and complex environment configurations in existing technologies.

[0056] Figure 1 The diagram illustrates an application scenario of the server power supply testing method according to an embodiment of this application. For example... Figure 1 As shown, application scenario 100 according to an embodiment of this application may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables. For example, a user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send information, etc.

[0057] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be electronic devices such as private servers, wearable devices, personal computers, intelligent voice interaction devices, smart home appliances, intelligent vehicles, in-vehicle terminals, aircraft, unmanned vending terminals, and extended reality devices. Extended reality devices can include virtual reality devices, augmented reality devices, and mixed reality devices. A client application for the target application can be installed and run on the terminal devices. This target application can include, but is not limited to, financial transaction applications, payment applications, shopping applications, web browser applications, search applications, instant messaging tools, email clients, and social media platform software (these are just examples). Furthermore, this application embodiment does not limit the form of the target application, and it can include, but is not limited to, applications, mini-programs, etc., installed on the terminal devices, and can also be in web page form.

[0058] Server 105 can be a server providing various services, such as a backend management server supporting websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process received user requests and other data, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services such as cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and basic cloud computing services such as big data. The server can be the backend server of the aforementioned target application, used to provide backend services to the clients of the target application.

[0059] It should be noted that the server power supply testing method provided in this application embodiment can generally be executed by server 105 and / or terminal devices 101-103. Accordingly, the server power supply testing device provided in this application embodiment can generally be installed in server 105 and / or terminal devices 101-103.

[0060] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0061] The following will be based on Figure 1 The described scene, through Figures 2-8The server power supply testing method of the disclosed embodiments is described in detail. It should be noted that the above application scenarios are shown only to facilitate understanding of the spirit and principles of this application, and the implementation methods of this application are not limited in any way. Rather, the implementation methods of this application can be applied to any applicable scenario.

[0062] Figure 2 A flowchart illustrating a server power supply testing method according to an embodiment of this application is shown schematically.

[0063] like Figure 2 As shown, the method 200 includes steps S210 to S230.

[0064] Step S210: Obtain the base operating system image, integration testing tools, communication protocol client, and test scripts; and generate a target container instance based on the base operating system image, integration testing tools, communication protocol client, and test scripts.

[0065] Figure 3 The flowchart illustrating the generation of a target container instance in a server power testing method according to an embodiment of this application is shown in the illustration.

[0066] like Figure 3 As shown, the method 300 includes steps S310 to S320.

[0067] Step S310: Obtain the base operating system image, integration testing tools, communication protocol client, and test scripts; based on the base operating system image, integration testing tools, communication protocol client, and test scripts, generate a container image containing a complete testing environment.

[0068] According to an embodiment of this application, the integration testing tool, the communication protocol client, and the test script can be integrated into the base operating system image, a container image containing a complete test environment can be generated by building and generating instructions, and the container image containing the complete test environment can be stored in a private image repository.

[0069] For example, a base operating system image can be pulled from a remote repository, along with testing tools such as MachineCheck, communication protocol clients such as SSH and SNMP clients, test scripts such as Python scripts, and other dependency library data. These tools, along with other dependency library data, can be integrated into the base operating system image. A customized container image containing complete testing capabilities can then be generated using build instructions. This customized container image can be pushed to a private image repository for storage, facilitating version management and secure distribution.

[0070] By storing container images containing complete test environments in a private image repository, the efficiency of centralized management and version traceability of test environment assets can be effectively improved, thereby accelerating test deployment and achieving the technical effect of improving server power testing efficiency.

[0071] Return to reference Figure 3 In step S320, the container image containing the complete test environment is obtained, and a target container instance is generated based on the container image containing the complete test environment.

[0072] For example, a customized container image containing full testing capabilities can be pulled from a private repository on the test control node, and a container instance can be enabled based on the customized container image containing full testing capabilities to generate the target container instance.

[0073] By generating a target container instance from a base operating system image, integration testing tools, communication protocol clients, and test scripts, a container image containing a complete testing environment can be created. This allows the operating system, tools, and scripts to be packaged into a standardized, portable, and operational test unit. It offers advantages such as rapid test deployment and resource isolation, eliminates differences in testing environments, and significantly improves the compatibility of server power testing while also effectively enhancing the efficiency of server power testing.

[0074] Return to reference Figure 2 In step S220, a pre-set server power test configuration file is obtained, the server power test configuration file is loaded onto the target container instance, and the target container environment is generated. The server power test configuration file includes: server power test type.

[0075] According to the embodiments of this application, a pre-set server power test configuration file can be obtained. The server power test configuration file can be a config.ini configuration file. By loading the externally mounted config.ini configuration file onto the target container instance, the parameters and code are separated, and the target container environment is generated.

[0076] In addition, SSH and SNMP connection modules can be initialized in the target container environment to facilitate the execution of test tasks.

[0077] Step S230: Perform server power testing on the target server in the target container environment according to the server power test type, and generate server power test results.

[0078] According to embodiments of this application, server power supply test types may include restart tests, shutdown tests, and power-off tests. Test types can be defined and corresponding operations performed through the config.ini configuration file.

[0079] Figure 4 The flowchart illustrating the restart test in the server power test method according to an embodiment of this application is shown in the illustration.

[0080] like Figure 4 As shown, the method 400 includes steps S410 to S420.

[0081] Step S410: Connect to the target server via an in-band channel communication protocol client and restart the target server.

[0082] For example, the system can be restarted by sending the reboot command via SSH, triggering an operating system-level reboot.

[0083] Step S420: Obtain key information after the target server restarts, analyze the key information after the target server restarts, and generate the server power test results.

[0084] By performing the restart operation through the in-band channel and obtaining key information after the restart to generate test results, no additional agent programs need to be installed on the server, maintaining the purity of the tested system environment, effectively avoiding interference caused by installing third-party programs, and effectively ensuring the credibility of the restart test.

[0085] Figure 5 The flowchart illustrating the power-off test in the server power test method according to an embodiment of this application is shown in the illustration.

[0086] like Figure 5 As shown, the method 500 includes steps S510 to S530.

[0087] Step S510: Connect to the target server via an in-band channel communication protocol client and perform a shutdown operation on the target server.

[0088] For example, you can send the init 0 command via SSH to shut down the system. After shutting down the target server, use Ping to confirm that the target machine is offline, and then wait for the scheduled power-on.

[0089] Step S520: Power on the target server after it has been shut down, according to the preset power-on cycle.

[0090] For example, after powering on a target server that has been shut down, you can continuously attempt SSH connections to confirm that the system has started and you have entered the system.

[0091] Step S530: Obtain key information after the target server is powered on, analyze the key information after the target server is powered on, and generate the server power test results.

[0092] By employing in-band channel shutdown, automatic power-on according to preset cycles, and acquisition of post-power-on information to generate test results, the cold start server power supply test is completed through shutdown, waiting, power-on, and verification steps, effectively improving the accuracy and reliability of server power supply test results.

[0093] Figure 6 The flowchart illustrating the server power supply test method for power interruption testing according to an embodiment of this application is shown schematically.

[0094] like Figure 6 As shown, the method 600 includes steps S610 to S650.

[0095] Step S610: Connect to the target server via an in-band channel communication protocol client and perform a shutdown operation on the target server.

[0096] According to an embodiment of this application, the target server can be connected via an in-band channel communication protocol client to perform a shutdown operation on the target server, and the shutdown operation on the target server can be verified by a network tool.

[0097] For example, you can connect to the target server using an in-band channel communication protocol client via SSH, send the `init 0` command to the target server, and shut it down. After shutting down the target server, you can use a network tool like Ping to confirm that the target machine is offline, thus completing the shutdown verification process.

[0098] Verifying the shutdown of the target server using network tools can effectively avoid false shutdowns and ensure the reliability of the shutdown operation, thereby ensuring the reliability and accuracy of server power supply testing.

[0099] Step S620: The power distribution unit electrically connected to the target server is powered off by controlling the out-of-band channel communication protocol client.

[0100] For example, a power-off operation can be performed by controlling the power distribution unit (PDU) electrically connected to the target server via an out-of-band communication protocol client (SNMP).

[0101] Step S630: Power supply is supplied to the power distribution unit that is electrically connected to the target server after the power outage operation is performed, according to the preset power outage cycle.

[0102] Step S640: Power on the target server after the shutdown operation.

[0103] According to an embodiment of this application, a power-on operation can be performed on a target server after a power-off operation, and the power-on verification of the target server after the power-on operation can be performed through a communication protocol.

[0104] For example, after powering on a target server that has been shut down, you can try to connect to the target server using the SSH protocol to confirm that the system has started and you can enter the system, thus completing the power-on verification of the target server.

[0105] Verifying the target server after power-on via communication protocols can effectively avoid misjudgments caused by not being powered on or having a delayed power-on, ensuring the reliability of key data obtained after power-on, and thus ensuring the reliability and accuracy of server power testing.

[0106] Step S650: Obtain key information after the target server is powered on, analyze the key information after the target server is powered on, and generate the server power test results.

[0107] Figure 7 The flowchart illustrating the consistency verification of key information in the server power supply testing method according to an embodiment of this application is shown in the illustration.

[0108] like Figure 7 As shown, the method 700 includes steps S710 to S730.

[0109] Step S710: Verify the consistency between the central processing unit information, memory information, disk information, network card information, power supply information, and controller event log of the target server after it is powered on and the initial baseline data.

[0110] Step S720: If the CPU information, memory information, disk information, network card information, power supply information, and controller event log of the target server after power-on are inconsistent with the initial baseline data, a server power test result indicating that the server power test has failed is generated.

[0111] For example, if the CPU information, memory information, disk information, network card information, power supply information, and controller event log of the target server after power-on show inconsistencies with the initial baseline data, it indicates that there are problems such as BIOS version change, RAID array downgrade, or PSU abnormal alarm. In this case, it can be determined that the test has failed, a server power test result indicating that the server power test has failed is generated, the log is recorded, and the process is terminated.

[0112] Step S730: If the CPU information, memory information, disk information, network card information, power supply information, and controller event log of the target server after power-on are consistent with the initial baseline data, then obtain the non-critical information of the target server after power-on, analyze the non-critical information of the target server after power-on, and generate the server power test results.

[0113] Figure 8 The flowchart illustrating the consistency verification of non-critical information in the server power supply testing method according to an embodiment of this application is shown in the illustration.

[0114] like Figure 8 As shown, the method 800 includes steps S810 to S830.

[0115] Step S810: Verify the compliance of the blacklist / whitelist information, server temperature information, and event log error code information after the target server is powered on.

[0116] Step S820: If the blacklist / whitelist information, server temperature information, and event log error code information of the target server after power-on are compliant, then generate a server power test result indicating that the server power test has passed.

[0117] According to an embodiment of this application, if a server power test result indicating that the server power test has passed is generated, a preset counter is incremented and the test is performed again until the preset counter reaches a preset threshold, at which point the test is terminated and a structured test report is generated.

[0118] For example, a counter can be incremented after each round of testing. If the preset number of laps is not reached, the next round continues; otherwise, the test ends. After the test is completed, all intermediate logs, baseline comparison results, anomaly records, and other files can be collected to generate a structured test report.

[0119] By providing a loop mechanism and threshold control for testing through preset counters, the quality of testing can be effectively improved through multiple rounds of testing. Furthermore, by generating structured test reports, the test results can be effectively displayed, thereby enhancing the user experience.

[0120] Step S830: If the blacklist / whitelist information, server temperature information, and event log error code information of the target server after power-on are not compliant, a server power test result indicating that the server power test has failed is generated.

[0121] By verifying the compliance of the blacklist / whitelist information, server temperature information, and event log error code information after the target server is powered on, the test quality can be improved from the perspectives of security, heat dissipation, and stability, thereby further improving the reliability and accuracy of the generated server power test results.

[0122] By verifying the consistency of CPU, memory, disk, network interface card (NIC), power supply, and controller event logs after the target server is powered on with the initial baseline data, comprehensive data verification can be achieved, including verification of computer resources, storage and memory resources, network and power supply, and fault self-test logs. This makes the generated server power supply test results more accurate. Furthermore, by verifying non-critical information after confirming the consistency of critical information, the reliability and accuracy of the generated server power supply test results can be further improved.

[0123] By employing techniques such as in-band shutdown, out-of-band power failure, and delayed power-on, the system can acquire key information after power-on and generate test results. This allows the server to undergo a complete boot process, starting from hardware self-test. Furthermore, in-band shutdown and out-of-band power failure ensure the stability of server power supply testing, making the testing more accurate and effectively improving its reliability and precision.

[0124] According to an embodiment of this application, a base image can first be pulled from a remote repository. Testing tools such as MachineCheck, SSH / SNMP clients, Python scripts, and dependent libraries are then integrated into the container image. Container generation instructions are used to generate a customized image containing complete testing capabilities. This customized image is then pushed to an enterprise-level private image repository for version management and secure distribution, thereby completing the construction of a standardized test image.

[0125] Next, the latest test image is pulled from the private repository on the test control node, the container instance is started, and the externally mounted config.ini configuration file is loaded to separate parameters from code. Then, the SSH and SNMP connection modules are initialized to prepare for executing test tasks and complete the rapid deployment of the test environment.

[0126] Then, based on the test type defined in config.ini, select the corresponding operation path to perform multi-mode power cycle testing. For example, you can send the reboot command via SSH to trigger an operating system-level restart to complete the reboot test. Alternatively, you can send the init 0 command to shut down the system and then wait for a timed power-on to complete the DC shutdown test. Or, you can first shut down via SSH and then control the PDU via SNMP to perform a power-off → delay → power-on operation to complete the AC power-off test. During multi-mode power cycle testing, you can use Ping to confirm that the target machine is offline after the shutdown operation. After powering on, you can continuously try SSH connections to confirm that the system has started and entered the system. Once a successful connection is established, immediately run the MachineCheck tool to collect key information such as CPU, memory, disk, network card, PSU power consumption, and controller event logs, and compare the currently collected data with the initial baseline data item by item. If inconsistencies are found in fields such as BIOS version changes, RAID array downgrades, or PSU abnormal alarms after item-by-item comparison, the test is considered a failure, the log is recorded, and the process is terminated. If the data is consistent, further checks are performed on health indicators such as blacklist / whitelist compliance, temperature thresholds, and event log error codes. A counter is incremented after each round of testing; if the preset number of rounds is not reached, the next round continues; otherwise, the test ends.

[0127] Finally, after the test is completed, the container automatically collects all intermediate logs, baseline comparison results, exception records, and other files, and automatically generates a test report.

[0128] According to embodiments of this application, a three-layer decoupled architecture of "control layer, communication layer, and decision layer" is adopted to break down the barriers between the software environment and hardware operation in traditional testing, effectively improving the reliability and accuracy of testing. In the control layer, a container is used as a carrier to encapsulate a complete test execution environment, including a Python runtime, SSH / SNMP client library, MachineCheck tool, test scripts, and dependent components. This container, as a lightweight and portable "test engine," can be quickly deployed on any host that supports container operation, without needing to concern itself with the specific configuration of the host system. In the communication layer: the in-band channel uses the SSH protocol to connect to the target machine, executing commands such as reboot or init 0 during normal operating system operation to complete restart or shutdown operations. The out-of-band channel accesses the intelligent PDU via the SNMP protocol to achieve physical power-on and power-off. Full-scenario control of the target server is achieved through a dual-channel collaborative mechanism of in-band and out-of-band. In the decision layer, a closed-loop control process is formed based on configuration-driven and status verification mechanisms. The test type, number of runs, target identifier, authentication credentials, and other parameters are defined in the config.ini file. After each round of operation, the MachineCheck tool is automatically called to collect system information, compare it with the initial baseline data, determine whether the system has returned to normal and is consistent with the status, and generate test results.

[0129] Figure 9 A schematic block diagram of a server power supply testing apparatus according to an embodiment of this application is shown.

[0130] like Figure 9 As shown, the device 900 includes: a first generation module 910, a second generation module 920 and a third generation module 930.

[0131] The first generation module 910 is used to obtain a base operating system image, integration testing tools, a communication protocol client, and test scripts, and generate a target container instance based on the base operating system image, integration testing tools, communication protocol client, and test scripts. In one embodiment, the first generation module 910 can be used to execute step S210 described above.

[0132] The first generation module 910 includes: a fourth generation module and a fifth generation module.

[0133] The fourth generation module is used to obtain the base operating system image, integration testing tools, communication protocol client, and test scripts, and based on the base operating system image, integration testing tools, communication protocol client, and test scripts, generate a container image containing a complete testing environment. In one embodiment, the fourth generation module can be used to execute step S310 described above.

[0134] The fourth generation module, including the fifth generation module, is used to integrate the integration testing tool, the communication protocol client, and the test script into the base operating system image, generate a container image containing a complete test environment through build generation instructions, and store the container image containing the complete test environment in a private image repository.

[0135] The fifth generation module is used to obtain the container image containing the complete test environment, and generate a target container instance based on the container image containing the complete test environment. In one embodiment, the fifth generation module can be used to execute step S320 described above, which will not be repeated here.

[0136] The second generation module 920 is used to obtain a pre-set server power test configuration file, load the server power test configuration file onto the target container instance, and generate the target container environment. The server power test configuration file includes a server power test type. In one embodiment, the second generation module 920 can be used to execute step S220 described above, which will not be repeated here.

[0137] The third generation module 930 is used to perform server power testing on the target server in the target container environment according to the server power test type, and generate server power test results. In one embodiment, the third generation module 930 can be used to execute step S230 described above.

[0138] The third generation module 930 includes: the first restart module and the seventh generation module.

[0139] The first restart module is used to connect to the target server via an in-band channel communication protocol client and perform a restart operation on the target server. In one embodiment, the first restart module can be used to execute step S410 described above, which will not be repeated here.

[0140] The seventh generation module is used to obtain key information after the target server restarts, analyze the key information after the target server restarts, and generate the server power test results. In one embodiment, the seventh generation module can be used to execute step S420 described above, which will not be repeated here.

[0141] The third generation module 930 also includes: a first shutdown module, a first power-on module, and an eighth generation module.

[0142] The first shutdown module is used to connect to the target server via an in-band channel communication protocol client and perform a shutdown operation on the target server. In one embodiment, the first shutdown module can be used to execute step S510 described above, which will not be repeated here.

[0143] The first power-on module is used to power on the target server after it has been shut down, according to a preset power-on cycle. In one embodiment, the first power-on module can be used to execute step S520 described above, which will not be repeated here.

[0144] The eighth generation module is used to acquire key information about the target server after it is powered on, analyze the key information, and generate the server power test results. In one embodiment, the eighth generation module can be used to execute step S530 described above, which will not be repeated here.

[0145] The third generation module 930 also includes: a second shutdown module, a first power-off module, a first power-on module, a second power-on module, and a ninth generation module.

[0146] The second shutdown module is used to connect to the target server via an in-band channel communication protocol client and perform a shutdown operation on the target server. In one embodiment, the second shutdown module can be used to execute step S610 described above.

[0147] The second shutdown module includes a first verification module, which is used to connect to the target server via an in-band channel communication protocol client, perform a shutdown operation on the target server, and verify the shutdown of the target server after the shutdown operation via a network tool.

[0148] The first power-off module is used to control the power distribution unit electrically connected to the target server to perform a power-off operation via an out-of-band channel communication protocol client. In one embodiment, the first power-off module can be used to execute step S620 described above, which will not be repeated here.

[0149] The first power supply module is used to supply power to the power distribution unit electrically connected to the target server after a power outage operation, according to a preset power outage cycle. In one embodiment, the first power supply module can be used to execute step S630 described above, which will not be repeated here.

[0150] The second power-on module is used to power on the target server after a shutdown operation. In one embodiment, the second power-on module can be used to execute step S640 described above.

[0151] The second power-on module includes: a second verification module, used to perform a power-on operation on the target server after a power-off operation, and to perform power-on verification on the target server after the power-on operation through a communication protocol.

[0152] The ninth generation module is used to acquire key information after the target server is powered on, analyze the key information after the target server is powered on, and generate the server power test results. In one embodiment, the ninth generation module can be used to execute step S650 described above, which will not be repeated here.

[0153] The ninth generation module includes: the third verification module, the tenth generation module, and the eleventh generation module.

[0154] The third verification module is used to verify the consistency between the CPU information, memory information, disk information, network card information, power supply information, and controller event logs of the target server after it is powered on and the initial baseline data. In one embodiment, the third verification module can be used to execute step S710 described above, which will not be repeated here.

[0155] The tenth generation module is used to generate a server power test result indicating that the server power test has failed if the CPU information, memory information, disk information, network card information, power supply information, and controller event log of the target server after power-on are inconsistent with the initial baseline data. In one embodiment, the tenth generation module can be used to execute step S720 described above, which will not be repeated here.

[0156] The eleventh generation module is used to obtain non-critical information about the target server after it has been powered on, analyze this non-critical information, and generate the server power test results, if the CPU information, memory information, disk information, network card information, power supply information, and controller event log of the target server after power-on are consistent with the initial baseline data. In one embodiment, the eleventh generation module can be used to execute step S730 described above.

[0157] The eleventh generation module includes: the fourth verification module, the twelfth generation module, and the thirteenth generation module.

[0158] The fourth verification module is used to verify the compliance of the blacklist / whitelist information, server temperature information, and event log error code information after the target server is powered on. In one embodiment, the fourth verification module can be used to execute step S810 described above, which will not be repeated here.

[0159] The twelfth generation module is used to generate a server power test result indicating that the server power test has passed if the blacklist / whitelist information, server temperature information, and event log error code information after the target server is powered on are compliant. In one embodiment, the twelfth generation module can be used to execute step S820 described above, which will not be repeated here.

[0160] The thirteenth generation module is used to generate a server power test result indicating that the server power test failed if the blacklist / whitelist information, server temperature information, and event log error code information after the target server is powered on are non-compliant. In one embodiment, the thirteenth generation module can be used to execute step S830 described above, which will not be repeated here.

[0161] According to an embodiment of this application, the method further includes: a fourteenth generation module, configured to increment a preset counter and perform a second test if a server power test result indicating that the server power test has passed is generated, until the preset counter reaches a preset threshold, at which point the test is terminated and a structured test report is generated.

[0162] According to embodiments of this application, any plurality of modules among the first generation module 910, the second generation module 920, and the third generation module 930 can be merged into one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this application, at least one of the first generation module 910, the second generation module 920, and the third generation module 930 can be at least partially implemented as a hardware circuit, such as a field-programmable gate array, a programmable logic array, a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit, or implemented by any other reasonable means of integrating or packaging the circuit, or implemented by any one of software, hardware, and firmware, or by a suitable combination of any of these. Alternatively, at least one of the first generation module 910, the second generation module 920, and the third generation module 930 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.

[0163] Figure 10 A block diagram schematically illustrates an electronic device suitable for implementing a server power supply testing method according to an embodiment of this application.

[0164] like Figure 10 As shown, an electronic device 1000 according to an embodiment of this application includes a processor 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage portion 1008 into a random access memory 1003. The processor 1001 may include, for example, a general-purpose microprocessor, an instruction set processor and / or an associated chipset and / or a dedicated microprocessor. The processor 1001 may also include onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for executing different steps of the method flow according to an embodiment of this application.

[0165] Random access memory 1003 stores various programs and data required for the operation of electronic device 1000. Processor 1001, read-only memory 1002, and random access memory 1003 are interconnected via bus 1004. Processor 1001 executes various steps of the method flow according to embodiments of this application by executing programs in read-only memory 1002 and / or random access memory 1003. It should be noted that the programs may also be stored in one or more memories other than read-only memory 1002 and random access memory 1003. Processor 1001 may also execute various steps of the method flow according to embodiments of this application by executing programs stored in said one or more memories.

[0166] According to embodiments of this application, the electronic device 1000 may further include an input / output interface 1005, which is also connected to a bus 1004. The electronic device 1000 may also include one or more of the following components connected to the input / output interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including a cathode ray tube, liquid crystal display, etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card, such as a local area network card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the input / output interface 1005 as needed. A removable medium 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 1010 as needed so that computer programs read from it can be installed into the storage section 1008 as needed.

[0167] Embodiments of this application also provide a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.

[0168] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof. In embodiments of this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include the read-only memory 1002, and / or random access memory 1003, and / or one or more memories other than read-only memory 1002 and random access memory 1003 described above.

[0169] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of this application.

[0170] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 1009, and / or installed from a removable medium 1011. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0171] In embodiments of this application, the computer program can be downloaded and installed from a network via communication section 1009, and / or installed from removable medium 1011. When the computer program is executed by processor 1001, it performs the functions defined in the system of this application embodiment. According to embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0172] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0173] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0174] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.

Claims

1. A server power supply testing method, characterized in that, The method includes: Obtain the base operating system image, integration testing tools, communication protocol client, and test scripts; and generate the target container instance based on the base operating system image, integration testing tools, communication protocol client, and test scripts. Obtain a pre-configured server power test configuration file, load the server power test configuration file onto the target container instance, and generate the target container environment. The server power test configuration file includes: a server power test type; and According to the server power test type, perform server power test on the target server in the target container environment and generate server power test results.

2. The method according to claim 1, characterized in that, Obtain the base operating system image, integration testing tools, communication protocol client, and test scripts. Based on the base operating system image, integration testing tools, communication protocol client, and test scripts, generate a target container instance, including: Obtain the base operating system image, integration testing tools, communication protocol client, and test scripts; based on the base operating system image, integration testing tools, communication protocol client, and test scripts, generate a container image containing a complete testing environment; and Obtain the container image containing the complete test environment, and generate the target container instance based on the container image containing the complete test environment.

3. The method according to claim 1 or 2, characterized in that, The server power test types include: restart test, which involves performing server power tests on the target server in the target container environment according to the server power test type, and generating server power test results, including: Connect to the target server via an in-band channel communication protocol client and perform a restart operation on the target server; and Obtain key information about the target server after it restarts, analyze the key information about the target server after it restarts, and generate the server power test results.

4. The method according to claim 1 or 2, characterized in that, The server power test types include: shutdown test, which involves performing server power tests on the target server in the target container environment according to the server power test type, and generating server power test results, including: The target server is connected via an in-band channel communication protocol client, and the target server is shut down. Power on the target server after it has been shut down, according to a preset power-on cycle; and The key information of the target server after it is powered on is obtained, the key information of the target server after it is powered on is analyzed, and the power supply test results of the server are generated.

5. The method according to claim 1 or 2, characterized in that, The server power supply test types include: power outage test. Based on the server power supply test type, a server power supply test is performed on the target server in the target container environment, and server power supply test results are generated, including: The target server is connected via an in-band channel communication protocol client, and the target server is shut down. The power distribution unit electrically connected to the target server is powered off via an out-of-band communication protocol client. According to the preset power outage cycle, the power distribution unit electrically connected to the target server after the power outage operation is performed is powered on. To power on the target server after it has been shut down; and The key information of the target server after it is powered on is obtained, the key information of the target server after it is powered on is analyzed, and the power supply test results of the server are generated.

6. The method according to claim 5, characterized in that, The key information includes: CPU information, memory information, disk information, network card information, power supply information, and controller event logs. The key information after the target server is powered on is analyzed to generate the server power supply test results, including: The consistency of the target server's CPU information, memory information, disk information, network card information, power supply information, and controller event logs after power-on with the initial baseline data is verified; and If the CPU information, memory information, disk information, network card information, power supply information, and controller event log of the target server after power-on are inconsistent with the initial baseline data, a server power test result indicating that the server power test has failed will be generated.

7. The method according to claim 5, characterized in that, The method also includes: If a server power test result indicating that the server power test has passed is generated, the preset counter is incremented and the test is performed again until the preset counter reaches a preset threshold, at which point the test is terminated and a structured test report is generated.

8. A server power supply testing device, characterized in that, The device includes: The first generation module is used to obtain a base operating system image, integration testing tools, communication protocol clients and test scripts, and generate a target container instance based on the base operating system image, integration testing tools, communication protocol clients and test scripts; The second generation module is used to obtain a pre-set server power test configuration file, load the server power test configuration file onto the target container instance, and generate the target container environment. The server power test configuration file includes: a server power test type; and The third generation module is used to perform server power tests on the target server in the target container environment according to the server power test type, and generate server power test results.

9. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.