CN115981934A - Method, system, electronic device and storage medium for automatically performing stability test - Google Patents

Method, system, electronic device and storage medium for automatically performing stability test Download PDF

Info

Publication number
CN115981934A
CN115981934A CN202211634496.9A CN202211634496A CN115981934A CN 115981934 A CN115981934 A CN 115981934A CN 202211634496 A CN202211634496 A CN 202211634496A CN 115981934 A CN115981934 A CN 115981934A
Authority
CN
China
Prior art keywords
power
bmc
server
psu
stability
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211634496.9A
Other languages
Chinese (zh)
Inventor
万玲辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211634496.9A priority Critical patent/CN115981934A/en
Publication of CN115981934A publication Critical patent/CN115981934A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a method, a system, electronic equipment and a storage medium for automatically performing stability test, wherein the method is applied to terminal equipment and comprises the following steps: accessing a BMC system through a BMC serial port; presetting a static IP of a BMC system; according to a preset static IP of the BMC system, sending and storing the stability automatic test script to a root directory of the BMC system, and sending and storing an executable authority file of the stability automatic test script to the root directory of the BMC system; after the BMC system is powered on and started, the stability automatic test script automatically runs to control the PSU to perform power-off and power-on circulation; after the PSU is powered on and the BMC system is detected to be normal each time, the server is started to execute the AC test script so as to carry out stability test. The purpose is to automatically control the input and disconnection of the power supply of the server through the BMC so as to improve the testing efficiency and reduce the occupation of human resources.

Description

Method, system, electronic device and storage medium for automatically performing stability test
Technical Field
The present invention relates to the technical field of server stability testing, and in particular, to a method, a system, an electronic device, and a storage medium for automatically performing a stability test.
Background
And (4) performing Cycle tests including restarting, DC (direct current) tests and AC (alternating current) tests, testing and checking the reliability of the server through different shutdown and startup modes, checking whether system downtime exists, equipment loss exists, whether an alarm log is generated, the error record numerical value is increased and other abnormal conditions, and testing whether the server product is on-line and has high availability. The three main differences are as follows: the system software layer is restarted, a reboot instruction is executed under the system to realize, and S5/S0power of the system is reserved; DC is the actions of simulating the user to press a power key to turn off and on, the S5power of the system is reserved, and the S0power has a process of restarting; and the AC simulates the disconnection of the external power supply input of the server, and the S5/S0power of the system is disconnected and then started (S5 power waits for power generation and S0power is started), which is the worst abnormal scene.
At present, the disconnection of the external power supply of the server is controlled through the manual control switch, so that the testing efficiency is low, and excessive human resources are occupied.
Disclosure of Invention
In view of this, the present invention provides a method, a system, an electronic device and a storage medium for automatically performing a stability test. The purpose is to automatically control the input and disconnection of the power supply of the server through the BMC so as to improve the testing efficiency and reduce the occupation of human resources.
In a first aspect of an embodiment of the present invention, a method for automatically performing a stability test is provided, where the method is applied to a terminal device, and includes:
accessing a BMC system through a BMC serial port;
presetting a static IP of a BMC system;
according to a preset static IP of the BMC system, sending and storing the stability automatic test script to a root directory of the BMC system, and sending and storing an executable authority file of the stability automatic test script to the root directory of the BMC system;
after the BMC system is powered on and started, the stability automatic test script automatically runs to control the PSU to perform power-off and power-on circulation;
after the PSU is powered on every time and the BMC system is detected to be normal, the server is started to execute the AC test script so as to perform stability test.
Optionally, the method further includes:
and determining the target times of automatically performing the stability test according to the stability test requirement, presetting the power-off and power-on cycle times in the stability automatic test script as the target times, and controlling the server to automatically perform the stability test of the target times.
Optionally, the stability automatic test script includes a counting unit; recording the power-off and power-on cycle times of the PSU in the stability test process through the counting unit, and ending the power-off and power-on cycle of the PSU when the cycle times are equal to the target times;
and setting a time stamp for each stability test through the counting unit so as to record the execution duration of each stability test.
Optionally, the stability automatic test script includes an environment setting unit and a power-off and power-on control unit;
outputting a bios log obtained by performing a stability test on the recording server to a serial port of the BMC system through the environment setting unit;
after the BMC system is powered on and started, the automatic stability test script automatically runs to control the PSU to perform power-off and power-on circulation, and the method comprises the following steps:
after the BMC system is powered on and started, the automatic stability test script is controlled to automatically run through the environment setting unit;
and after the stability automatic test script runs, controlling the PSU to perform power-off and power-on circulation through the power-off and power-on control unit.
Optionally, the stability automatic test script includes a flow control unit;
after the PSU is powered on every time and the BMC system is detected to be normal, the server is started to execute the AC test script so as to perform stability test, and the method comprises the following steps:
after the PSU is powered on every time and the BMC system is detected to be normal, the server is automatically started;
after the server is normally started, the server executes the AC test script to carry out stability test, and the starting state of the server is monitored in real time through the flow control unit;
after the server completes the stability test, executing a shutdown action;
and after the process control unit monitors the shutdown action, the power-off and power-on control unit controls the PSU to perform power-off operation.
Optionally, after the automatic stability test script runs, the power-off and power-on control unit controls the PSU to perform power-off and power-on cycles, including:
after the PSU is controlled to perform power-off operation through the power-off and power-on control unit, the PSU of the control server is powered on after a preset time interval after power-off through the power-off and power-on control unit.
Optionally, the building of the power-off and power-on control unit in the automatic stability test script includes: inputting a PSU register address query instruction in a BMC serial port environment through a terminal device to obtain a PSU register address of a server;
and constructing a power-off and power-on control unit in the stability automatic test script according to the obtained PSU register address of the server.
Optionally, the method further comprises:
and monitoring the operation of carrying out power failure on the PSU by the BMC through the flow control unit, and retrying for a preset number of times when the execution of the power failure operation on the PSU by the BMC is invalid.
In a second aspect of an embodiment of the present invention, there is provided a system for automatically performing a stability test, the system including: the system comprises terminal equipment, a BMC system and a server; the terminal equipment is accessed to the BMC system through a BMC serial port;
the terminal equipment is used for presetting a static IP of the BMC system through the BMC serial port after the terminal equipment is accessed to the BMC system through the BMC serial port;
the terminal device is used for sending and storing the stability automatic test script to a root directory of the BMC system according to a preset static IP of the BMC system, and sending and storing an executable authority file of the stability automatic test script to the root directory of the BMC system;
the BMC system is used for controlling the automatic running of the stability automatic test script to control the PSU to perform power-off and power-on circulation after the BMC system is powered on and started;
and the server is used for starting up the server to execute the AC test script after the PSU is powered on and the BMC system is detected to be normal every time so as to perform stability test.
In a third aspect of the embodiments of the present invention, there is further provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
the processor is configured to implement the steps of the method for automatically performing the stability test according to the first aspect of the present invention when executing the program stored in the memory.
In a fourth aspect of the embodiments of the present invention, there is further provided a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements a method for automatically performing a stability test according to the first aspect of the present invention.
Aiming at the prior art, the invention has the following advantages:
according to the method for automatically testing the stability, provided by the embodiment of the invention, the terminal equipment is accessed to the BMC system through the BMC serial port. After the BMC system is accessed, the BMC system is controlled through the terminal device, a static IP of the BMC system is preset, the created automatic stability test script is sent and stored to a root directory of the BMC system according to the preset static IP of the BMC system, the created automatic stability test script can be executed in the BMC system, and meanwhile an executable authority file of the automatic stability test script is sent and stored to the root directory of the BMC system. After the BMC system is powered on and started up each time, the automatic stability test script automatically runs to control a PSU (power supply unit) of the server to perform power-off and power-on circulation. After the PSU is powered on every time, namely, after power is input to a system comprising the BMC and the server, the BMC system is started immediately, the server is automatically started after the BMC system detects the normal state, and an AC test script is executed after the server is automatically started to carry out stability test. Therefore, the AC test of the server can be carried out by only controlling the server to be automatically carried out through the BMC system by an engineer on the terminal equipment side without manually controlling a switch to control the power-off and power-on of an external power supply of the server, so that the AC test efficiency of the server can be effectively improved, and the labor cost can be saved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below.
FIG. 1 is a flow chart of a method for automatically performing a stability test according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a terminal device accessing a BMC system in a method for automatically performing a stability test according to an embodiment of the present invention;
fig. 3 is a schematic diagram of static IP settings of a BMC system in a method for automatically performing a stability test according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating register address acquisition of a PSU of a server in a method for automatically performing a stability test according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a system for automatically performing a stability test according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a method for automatically performing a stability test according to an embodiment of the present invention, and as shown in fig. 1, the method is applied to a terminal device, and the method includes:
step S101: accessing a BMC system through a BMC serial port;
step S102: presetting a static IP of a BMC system;
step S103: according to a preset static IP of the BMC system, sending and storing the stability automatic test script to a root directory of the BMC system, and sending and storing an executable authority file of the stability automatic test script to the root directory of the BMC system;
step S104: after the BMC system is powered on and started, the stability automatic test script automatically runs to control the PSU to perform power-off and power-on circulation;
step S105: after the PSU is powered on every time and the BMC system is detected to be normal, the server is started to execute the AC test script so as to perform stability test.
In the embodiment of the invention, the BMC serial port environment is connected through the terminal equipment. The USB to Type C cable is used to connect a Type C system debug interface on a CMU (Communication Management Unit) of the server, and the other end of the cable is connected to a terminal device, such as a notebook device. The method comprises the steps of starting serial port software such as MobaXterm on the notebook device, and entering a BMC serial port environment by inputting an account number and a password (root/OpenBmc). Fig. 2 is a schematic diagram of accessing a BMC system by a terminal device in the method for automatically performing a stability test according to the embodiment of the present invention, as shown in fig. 2, that is, the terminal device successfully accesses the BMC system and enters a BMC serial port environment.
After the terminal device is accessed to a BMC (Baseboard Management Controller) system through a BMC serial port, an engineer can control the BMC system through the terminal device. The invention automatically carries out AC test through a BMC system control server based on the constructed stability automatic test script. Therefore, the constructed stability automatic test script is sent to the BMC system, so that the BMC system can control the server to automatically perform the AC test by executing the constructed stability automatic test script. In order to send the constructed automatic stability test script to the BMC system, the static IP of the BMC system is preset through the terminal device after the terminal device is connected to the BMC system. After the static IP of the BMC system is set through the terminal device, the constructed automatic stability test script is sent and stored into a root directory of the BMC system of the static IP through the terminal device according to the static IP. And simultaneously, in order to enable the constructed automatic stability test script to be correctly executed in the BMC system, the executable authority file of the constructed automatic stability test script is sent and stored into a root directory of the BMC system.
After the constructed automatic stability test script and the executable authority file of the constructed automatic stability test script are both sent and stored to the root directory of the BMC system, after the BMC system is powered on and started each time, the constructed automatic stability test script automatically runs to control a Power Supply Unit (PSU) of a server to perform power-off and power-on cycles. The PSU of the server is a power supply device component of the server, the PSU of the server always has a power supply to provide power for the PSU, and the stability automatic test script constructed by the invention controls whether the PSU inputs power to a system consisting of the server and the BMC, so that the power-off and power-on of the server side are realized.
After the PSU of the server is powered on each time, the BMC system is powered on immediately, and after the PSU of the server is powered on each time and the BMC system detects that the whole total system consisting of the server and the BMC is normal, the server is powered on and executes the AC test script to perform stability test.
In an embodiment of the present invention, fig. 3 is a schematic diagram of a static IP setting of a BMC system in the method for automatically performing a stability test according to the embodiment of the present invention, and as shown in fig. 3, a terminal device is connected in an ssh manner through a serial software (such as MobaXterm) in a BMC serial environment, and a constructed automatic stability test script is sent to and stored in a root directory of the BMC system. As shown in fig. 3, the first line of the code enters a BMC static IP setting mode, the second line of the code is the set static IP of the BMC, that is, 172.27.35.102, the third line of the code is the set subnet mask, that is, 255.255.255.0, and the fifth line of the code is the set static IP of the BMC system, and the set static IP and the set subnet mask are obtained.
According to the method for automatically testing the stability, provided by the embodiment of the invention, the terminal equipment is accessed to the BMC system through the BMC serial port. After the BMC system is accessed, the BMC system is controlled through the terminal device, a static IP of the BMC system is preset, the created automatic stability test script is sent and stored to a root directory of the BMC system according to the preset static IP of the BMC system, the created automatic stability test script can be executed in the BMC system, and meanwhile an executable authority file of the automatic stability test script is sent and stored to the root directory of the BMC system. After the BMC system is powered on and started up each time, the automatic stability test script automatically runs to control a PSU (power supply unit) of the server to perform power-off and power-on circulation. After the PSU is powered on every time, namely power is input to a system comprising the BMC and the server, the BMC system is started immediately, the server is automatically started after the BMC system detects the normal state, and the AC test script is executed after the server is automatically started so as to perform stability test. Therefore, the AC test of the server can be carried out by only controlling the server to be automatically carried out through the BMC system by an engineer on the terminal equipment side without manually controlling a switch to control the power-off and power-on of an external power supply of the server, so that the AC test efficiency of the server can be effectively improved, and the labor cost can be saved.
In the present invention, the method further comprises: and determining the target times of automatically performing the stability test according to the stability test requirement, presetting the power-off and power-on cycle times in the stability automatic test script as the target times, and controlling the server to automatically perform the stability test of the target times.
In the embodiment of the invention, different servers have different requirements for stability testing, so that the method for automatically testing the stability can be suitable for different testing requirements. And presetting the power-off and power-on cycle times in the automatic stability test script as target times according to the determined target times for the server to perform the stability test, so as to control the server to automatically perform the stability test of the target times.
In the invention, the stability automatic test script comprises a counting unit; recording the power-off and power-on cycle times of the PSU in the stability test process through the counting unit, and ending the power-off and power-on cycle of the PSU when the cycle times are equal to the target times; and setting a time stamp for each stability test through the counting unit so as to record the execution duration of each stability test.
In the embodiment of the invention, the constructed automatic stability test script comprises a counting unit, the power-off and power-on cycle times of the PSU in the stability test process of the server are recorded by the counting unit, and when the power-off and power-on cycle times are equal to the target times, the power-off and power-on cycle of the PSU is ended, so that the server finishes the test after the stability test of the target times. Meanwhile, a time stamp is set for each stability test through a counting unit in the constructed automatic stability test script so as to record the execution time of each stability test, and the problem in the test process can be found in the process of debugged on the result of the stability test in the follow-up process.
In an embodiment of the present invention, the code of the counting unit in the constructed stability automatic test script is as follows:
Figure BDA0004007032360000081
in the invention, the stability automatic test script comprises an environment setting unit and a power-off and power-on control unit; outputting a bios log obtained by performing a stability test on the recording server to a serial port of the BMC system through the environment setting unit; after the BMC system is powered on and started, the automatic stability test script automatically runs to control the PSU to perform power-off and power-on circulation, and the method comprises the following steps: after the BMC system is powered on and started, the automatic stability test script is controlled to automatically run through the environment setting unit; and after the automatic stability test script runs, controlling the PSU to perform power-off and power-on circulation through the power-off and power-on control unit.
In the embodiment of the invention, the constructed stability automatic test script comprises an environment setting unit and a power-off and power-on control unit. And outputting the bios logs obtained by performing the stability test on the recorded server each time to a serial port of the BMC system through an environment setting unit in the constructed automatic stability test script, so that the terminal equipment can obtain the bios logs to perform subsequent debug.
In the embodiment of the present invention, after the BMC system is powered on and started up in step S104, the automatic stability test script automatically runs to control the PSU to perform the power-off and power-on cycles, which specifically includes: after the PSU of the server is powered on, the BMC system is powered on immediately, and at the moment, after the BMC system is powered on and started, the environment setting unit in the constructed automatic stability test script enables the whole constructed automatic stability test script to automatically run.
And after the constructed automatic stability test script runs, the power-off and power-on control unit in the constructed automatic stability test script controls the PSU of the server to perform power-off and power-on circulation. Specifically, the PSU of the server is controlled to power off under a specific condition according to the code of the power-off and power-on control unit, and the PSU is instructed to power on after a certain time interval when the power-off and power-on cycle does not reach the target number.
In an embodiment of the present invention, the code of the environment setting unit in the constructed stability automatic test script is as follows:
Figure BDA0004007032360000091
in the embodiment of the present invention, the code of the power-off and power-on control unit in the constructed stability automatic test script is as follows:
Figure BDA0004007032360000101
in the invention, the stability automatic test script comprises a flow control unit; after the PSU is powered on every time and the BMC system is detected to be normal, the server is started to execute the AC test script so as to perform stability test, and the method comprises the following steps: after the PSU is powered on every time and the BMC system is detected to be normal, the server is automatically started; after the server is normally started, the server executes the AC test script to carry out stability test, and the starting state of the server is monitored in real time through the flow control unit; after the server completes the stability test, executing a shutdown action; and after the process control unit monitors the shutdown action, the power-off and power-on control unit controls the PSU to perform power-off operation.
In the embodiment of the invention, the built stability automatic test script comprises a flow control unit. After the PSU of the server is powered on every time, namely after the PSU of the server outputs power to the total system consisting of the server and the BMC, the BMC system is started immediately, and after the BMC system detects that the total system consisting of the server and the BMC is normal, the server is triggered to be automatically started. After the server is normally powered on, the server executes the AC test script to perform the stability test. Meanwhile, after the server is normally started, the flow control unit in the constructed stability automatic test script monitors the starting state of the server in real time. The process control unit in the constructed automatic stability test script monitors the starting state of the server in real time to determine whether the server executes a trigger condition for triggering the power-off and power-on control unit to control the PSU to perform power-off operation, wherein the trigger condition is that the server executes a shutdown action.
Specifically, after the server is normally started, the process control unit in the constructed automatic stability test script monitors the starting state of the server in real time, and in the monitoring process of the process control unit in the constructed automatic stability test script, when the server executes a shutdown action after completing the stability test, the process control unit in the constructed automatic stability test script monitors the shutdown action. After the process control unit in the constructed automatic stability test script monitors the shutdown action, the power-off and power-on control unit in the constructed automatic stability test script controls the PSU to perform power-off operation so as to perform new circulation.
In the embodiment of the present invention, the code of the flow control unit in the constructed stability automatic test script is as follows:
Figure BDA0004007032360000111
/>
Figure BDA0004007032360000121
in the present invention, after the automatic stability test script runs, the power-off and power-on control unit controls the PSU to perform power-off and power-on cycles, including: after the PSU is controlled to perform power-off operation through the power-off and power-on control unit, the PSU of the control server is powered on after a preset time interval after power-off through the power-off and power-on control unit.
In the embodiment of the invention, the power-off and power-on control unit in the constructed stability automatic test script controls the PSU to perform the automatic power-off operation through the above embodiment of the invention. Meanwhile, after the power-off and power-on control unit in the constructed automatic stability test script controls the PSU to perform power-off operation, the PSU of the server is automatically powered on after a preset time interval after power-off so as to supply power to a main system consisting of the BMC system and the server, so that the PSU of the server is controlled to perform automatic power-off and power-on, and further, the server is automatically subjected to stability test.
In an embodiment of the present invention, the building of the power-off and power-on control unit in the stability automatic test script includes: inputting a PSU register address query instruction in a BMC serial port environment through a terminal device to obtain a PSU register address of a server; and constructing a power-off and power-on control unit in the stability automatic test script according to the obtained PSU register address of the server.
In the embodiment of the invention, the query instruction of the PSU register address of the server is input in the BMC serial port environment through the terminal equipment, and the query instruction is i2cdetect-y 5, so that the PSU register address of the server is obtained. And after the PSU register address of the server is obtained, constructing a power-off and power-on control unit in the stability automatic test script according to the obtained PSU register address of the server.
In an embodiment of the present invention, fig. 4 is a schematic diagram illustrating obtaining of a register address of a PSU of a server in a method for automatically performing a stability test according to an embodiment of the present invention, as shown in fig. 4, a query instruction i2cdetect-y 5 of the register address of the PSU of the server is input by a terminal device in a BMC serial environment, and the content shown in fig. 4 is obtained, where a part showing a UU in the diagram indicates the register address of a PSU device with a power suspended thereon, a vertical axis indicates a high order of the register address, and a horizontal axis indicates a low order of the register address. Therefore, the power PSU devices of the server shown in fig. 4 are mounted in the case of 0x58,0x59, i.e., two power PSU devices are mounted. When power is cut off and power is supplied, the power cut-off and the power supply of the two power supply PSU devices need to be controlled simultaneously.
In the present invention, the method further comprises: and monitoring the operation of carrying out power failure on the PSU by the BMC through the flow control unit, and retrying for a preset number of times when the execution of the power failure operation on the PSU by the BMC is invalid.
In the embodiment of the invention, in the actual test process, the power-off and power-on control unit in the constructed automatic stability test script fails to control the power-off of the PSU of the server when the PSU of the server is powered off, that is, the execution is unsuccessful, so that the power-off of the PSU of the server cannot be controlled. And when the process control unit in the constructed automatic stability test script monitors that the power-off operation of the PSU of the server is failed by the BMC system, retrying for a preset number of times. The preset times can be set according to actual requirements, and are not specifically limited herein.
In an embodiment of the present invention, the complete code of the constructed stability automatic test script is as follows:
Figure BDA0004007032360000141
/>
Figure BDA0004007032360000151
/>
Figure BDA0004007032360000161
/>
Figure BDA0004007032360000171
in an embodiment of the present invention, as shown in the complete code of the stability automatic test script constructed as described above, the script name of the stability automatic test script stored in the BMC system is psu _ cycle.sh, the stability automatic test script psu _ cycle.sh is stored in the root directory of the BMC system, and the executable authority chmod-R777 psu _ cycle.sh of the stability automatic test script psu _ cycle.sh is stored in the root directory of the BMC system, so as to ensure that the stability automatic test script psu _ cycle.sh can be correctly executed. And according to the test requirement, setting the cycle times of power-off and power-on of the stability automatic test script psu _ cycle. The complete code of the stability automatic test script constructed as described above, wherein if [ ] morph-ge 502; 502 in the then is the cycle times of power-off and power-on of the stability automatic test script psu _ cycle.sh, and the cycle times of power-off and power-on of the stability automatic test script psu _ cycle.sh can be set as the target times according to the test requirements. And (3) operating a stability automatic test script sh./psu _ cycle.sh, executing the original AC test script by the server side, and realizing the AC stability automatic test of the target times by linkage of the two scripts.
In an embodiment of the present invention, the sleep65 in the automatic stability test script PSU _ cycle.sh represents that after the PSU of the server is powered on, the BMC system is immediately started, and a period of time is required until the BMC system is ready, at this time, the preset automatic stability test script PSU _ cycle.sh starts to automatically run after waiting for 65 seconds, so as to provide a sufficient preparation time for the BMC system, and then the automatic stability test script PSU _ cycle.sh is automatically run after the BMC system is ready. Sh runs automatically after the automatic stability test script psu _ cycle, and the BMC system detects that the total system composed of the BMC system and the server is normal, the server is started automatically, at the moment, the starting state of the server is monitored through an instruction ipmitoo lc hassis power status, and the starting state is stored in an independent log, so that whether the automatic starting function of the server is normal or not can be checked, and meanwhile, the starting failure condition and the failure rate can be monitored.
In the embodiment of the invention, after the server is normally started, the starting state of the server is always monitored, the server executes the AC test script to finish the stability test and then executes the power-off action, after the stability automatic test script PSU _ cycle monitors the shutdown action of the server, the PSU of the server is controlled to be powered off, and after the power-off is carried out for the preset time, the PSU is powered on to the total system consisting of the BMC system and the server to automatically carry out the next AC test of the server.
In the embodiment of the invention, in the practical application process, the condition of failure exists in the process that the stability automatic test script PSU _ cycle.sh powers off the PSU of the control server, namely the PSU of the control server is not successfully powered off. In order to improve the effectiveness of the automatic execution process of the invention, a failure monitoring mechanism of power supply outage and power supply is added in the automatic stability test script PSU _ cycle.sh, the terminal device performs retry outage actions for preset times after the PSU of the server is powered off and fails through the automatic stability test script PSU _ cycle.sh in the BMC system so as to ensure the reliability and stability of the outage process, and the retry outage actions for the preset times are realized by a flow control unit in the automatic stability test script PSU _ cycle.sh as shown by the complete code of the automatic stability test script PSU _ cycle.sh.
In the embodiment of the present invention, the embodiment of the present invention is applicable to a server with a CPU architecture of ARM (Advanced RISC Machine). It should be understood that, for other CPU architectures, the embodiment of the present invention in which the PSU of the BMC serial port environment control server is automatically powered off and powered on via the terminal device is also applicable, and only the automatic stability test script constructed in the present invention needs to be adaptively modified.
In the embodiment of the invention, the whole implementation process of the invention is as follows: firstly, the terminal equipment is connected with a BMC serial port environment. Specifically, a USB to Type C cable is used to connect a Type C system debug interface on a CMU (Communication Management Unit) of the server, and the other end of the cable is connected to a terminal device, such as a notebook device. Serial port software such as MobaXterm is started on the notebook computer device, and the notebook computer device enters a BMC serial port environment by inputting an account and a password (root/OpenBmc). After the terminal device is accessed to a BMC (Baseboard management controller) system through a BMC serial port, a static IP of the BMC is preset in a BMC serial port environment through the terminal device. After the terminal device performs static IP setting on the BMC system through the BMC serial environment, the engineer connects the terminal device with serial software (such as MobaXterm) in the ssh manner, sends and stores the constructed automatic stability test script into the root directory of the BMC system, and sends and stores the executable authority file of the constructed automatic stability test script into the root directory of the BMC system.
After the constructed automatic stability test script and the executable authority file of the constructed automatic stability test script are both sent and stored to the root directory of the BMC system, the BMC system is immediately powered on and started up after the PSU of the server is powered on, and at the moment, after the BMC system is powered on and started up, the environment setting unit in the constructed automatic stability test script enables the whole constructed automatic stability test script to automatically run after the BMC system is powered on and started up.
And after the constructed automatic stability test script runs, the power-off and power-on control unit in the constructed automatic stability test script controls the PSU of the server to perform power-off and power-on circulation. Specifically, the process control unit in the constructed automatic stability test script monitors a trigger condition capable of triggering the power-off and power-on control unit in the constructed automatic stability test script to execute, and when the process control unit in the constructed automatic stability test script monitors the trigger condition, the power-off and power-on control unit in the automatic stability test script executes to control the PSU of the server to power off and power on.
In the embodiment of the present invention, the triggering process for triggering the power-off and power-on control unit in the constructed automatic stability test script to execute includes: after the PSU of the server is powered on every time, namely after the PSU of the server outputs power to the total system consisting of the server and the BMC, the BMC system is started immediately, and after the BMC system detects that the total system consisting of the server and the BMC is normal, the server is triggered to be automatically started. After the server is normally powered on, the server executes the AC test script to perform the stability test. Meanwhile, after the server is normally started, the process control unit in the constructed automatic stability test script simultaneously monitors the starting state of the server in real time, when the server finishes AC test, the server executes shutdown action, at the moment, the process control unit in the constructed automatic stability test script monitors the shutdown action of the server, and at the moment, the execution of the power-off power-on control unit in the automatic stability test script is triggered so as to control the PSU of the server to cut off power supply to a main system consisting of the BMC system and the server. And at the preset time after controlling the PSU to be powered off, the PSU of the server automatically powers on the main system consisting of the BMC system and the server.
Meanwhile, after the server performs the stability test each time, the bios logs are obtained and are output to the serial port environment of the BMC system through an environment setting unit in the constructed automatic stability test script, so that the terminal device can obtain the bios logs to perform subsequent debug.
Meanwhile, the flow control unit in the automatic stability test script constructed in the invention can monitor whether the power-off and power-on control unit in the automatic stability test script in the BMC system fails to execute the power-off operation of the PSU of the server, and when the power-off and power-on control unit in the automatic stability test script in the BMC system fails to execute the power-off operation of the PSU of the server, the flow control unit in the automatic stability test script in the BMC system controls the power-off and power-on unit in the automatic stability test script in the BMC system to retry the power-off operation for a preset number of times.
According to the method for automatically testing the stability, provided by the embodiment of the invention, the terminal equipment is accessed to the BMC system through the BMC serial port. After the BMC system is accessed, the BMC system is controlled through the terminal device, a static IP of the BMC system is preset, the created automatic stability test script is sent and stored to a root directory of the BMC system according to the preset static IP of the BMC system, the created automatic stability test script can be executed in the BMC system, and meanwhile an executable authority file of the automatic stability test script is sent and stored to the root directory of the BMC system. After the BMC system is powered on and started up each time, the automatic stability test script automatically runs to control a PSU (power supply unit) of the server to perform power-off and power-on circulation. After the PSU is powered on every time, namely, after power is input to a system comprising the BMC and the server, the BMC system is started immediately, the server is automatically started after the BMC system detects the normal state, and an AC test script is executed after the server is automatically started to carry out stability test. Therefore, the AC test of the server can be automatically carried out by only engineering personnel through the BMC system control server on the terminal equipment side without controlling the power-off and power-on of the external power supply of the server through an artificial control switch, so that the AC test efficiency of the server can be effectively improved, and the labor cost can be saved.
In a second aspect of the embodiment of the present invention, a system for automatically performing a stability test is provided, and fig. 5 is a schematic diagram of the system for automatically performing a stability test according to the embodiment of the present invention. As shown in fig. 5, the system 500 includes: a terminal device 501, a BMC system 502, a server 503; the terminal equipment 501 is accessed to the BMC system 502 through a BMC serial port;
the terminal device 501 is configured to preset a static IP of the BMC system through the BMC serial port after the terminal device accesses the BMC system through the BMC serial port;
the terminal device 501 is configured to send and store the automatic stability test script to a root directory of the BMC system according to a preset static IP of the BMC system, and send and store an executable authority file of the automatic stability test script to the root directory of the BMC system;
the BMC system 502 is used for controlling the automatic running of the stability automatic test script to control the PSU to perform power-off and power-on circulation after the BMC system is powered on and started;
the server 503 is configured to start up the server to execute the AC test script after the PSU is powered on and the BMC system is detected to be normal, so as to perform a stability test.
Optionally, the stability automatic test script in the BMC system includes a cycle number determining unit, configured to determine a target number of times for performing the stability test automatically according to a stability test requirement, and preset the cycle number of power-off and power-on in the stability automatic test script as the target number of times to control the server to perform the stability test of the target number of times automatically.
Optionally, the stability automatic test script in the BMC system includes a counting unit; the counting unit in the automatic stability test script is used for recording the power-off and power-on cycle times of the PSU in the stability test process, and ending the power-off and power-on cycle of the PSU when the cycle times are equal to the target times;
and the counting unit in the automatic stability test script is used for setting a time stamp for each stability test so as to record the execution duration of each stability test.
Optionally, the automatic stability test script in the BMC system includes an environment setting unit and a power-off and power-on control unit;
the environment setting unit in the automatic stability test script is used for outputting a bios log obtained by the stability test of the recording server to a serial port of the BMC system;
the environment setting unit in the automatic stability test script is used for controlling the automatic stability test script to automatically run after the BMC system is powered on and started up;
and the power-off and power-on control unit in the automatic stability test script is used for controlling the PSU to perform power-off and power-on circulation after the automatic stability test script runs.
Optionally, the automatic stability test script in the BMC system includes a flow control unit;
the flow control unit in the automatic stability test script is used for monitoring the automatic startup of the server after each PSU power-on and normal BMC system detection, and the server executes the AC test script after the server is normally started so as to monitor the startup state of the server in real time in the process of stability test;
and the flow control unit in the automatic stability test script is used for controlling the PSU to perform power-off operation through the power-off and power-on control unit after the shutdown action of the server after the stability test is completed is monitored.
Optionally, the power-off and power-on control unit in the automatic stability test script in the BMC system controls a PSU to perform power-off and power-on cycles, which specifically includes: after the PSU is controlled to perform power-off operation through the power-off and power-on control unit, the PSU of the control server is powered on after a preset time interval after power-off through the power-off and power-on control unit.
Optionally, the building of the power-off and power-on control unit in the automatic stability test script in the BMC system includes: inputting a PSU register address query instruction in a BMC serial port environment through a terminal device to obtain a PSU register address of a server; and constructing a power-off and power-on control unit in the stability automatic test script according to the obtained PSU register address of the server.
Optionally, the process control unit in the automatic stability test script in the BMC system is configured to monitor a power-off operation performed on the PSU by the BMC system, and perform power-off operation retries for a preset number of times when the power-off operation performed on the PSU by the BMC system fails.
In a third aspect of the embodiments of the present invention, there is further provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
the processor is configured to implement the steps of the method for automatically performing the stability test according to the first aspect of the present invention when executing the program stored in the memory.
In a fourth aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements a method of automatically performing a stability test according to the first aspect of the present invention.
According to the method for automatically testing the stability, provided by the embodiment of the invention, the terminal equipment is accessed to the BMC system through the BMC serial port. After the BMC system is accessed, the BMC system is controlled through the terminal device, a static IP of the BMC system is preset, the created automatic stability test script is sent and stored to a root directory of the BMC system according to the preset static IP of the BMC system, the created automatic stability test script can be executed in the BMC system, and meanwhile an executable authority file of the automatic stability test script is sent and stored to the root directory of the BMC system. After the BMC system is powered on and started up each time, the automatic stability test script automatically runs to control a PSU (power supply unit) of the server to perform power-off and power-on circulation. After the PSU is powered on every time, namely, after power is input to a system comprising the BMC and the server, the BMC system is started immediately, the server is automatically started after the BMC system detects the normal state, and an AC test script is executed after the server is automatically started to carry out stability test. Therefore, the AC test of the server can be carried out by only controlling the server to be automatically carried out through the BMC system by an engineer on the terminal equipment side without manually controlling a switch to control the power-off and power-on of an external power supply of the server, so that the AC test efficiency of the server can be effectively improved, and the labor cost can be saved.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "...," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the system embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (11)

1. A method for automatically performing stability test is characterized in that the method is applied to terminal equipment and comprises the following steps:
accessing a BMC system through a BMC serial port;
presetting a static IP of a BMC system;
according to a preset static IP of the BMC system, sending and storing the stability automatic test script to a root directory of the BMC system, and sending and storing an executable authority file of the stability automatic test script to the root directory of the BMC system;
after the BMC system is powered on and started, the stability automatic test script automatically runs to control the PSU to perform power-off and power-on circulation;
after the PSU is powered on every time and the BMC system is detected to be normal, the server is started to execute the AC test script so as to perform stability test.
2. The method of claim 1, further comprising:
and determining the target times of automatically performing the stability test according to the stability test requirement, presetting the power-off and power-on cycle times in the stability automatic test script as the target times, and controlling the server to automatically perform the stability test of the target times.
3. The method for automatically performing stability testing according to claim 1, wherein the stability automatic test script comprises a counting unit; recording the power-off and power-on cycle times of the PSU in the stability test process through the counting unit, and ending the power-off and power-on cycle of the PSU when the cycle times are equal to the target times;
and setting a time stamp for each stability test through the counting unit so as to record the execution duration of each stability test.
4. The method for automatically performing the stability test according to claim 1, wherein the stability automatic test script comprises an environment setting unit and a power-off and power-on control unit;
outputting a bios log obtained by performing a stability test on the recording server to a serial port of the BMC system through the environment setting unit;
after the BMC system is powered on and started, the automatic stability test script automatically runs to control the PSU to perform power-off and power-on circulation, and the method comprises the following steps:
after the BMC system is powered on and started, the automatic stability test script is controlled to automatically run through the environment setting unit;
and after the stability automatic test script runs, controlling the PSU to perform power-off and power-on circulation through the power-off and power-on control unit.
5. The method of claim 4, wherein the stability automatic test script comprises a process control unit;
after the PSU is powered on every time and the BMC system is detected to be normal, the server is started to execute the AC test script so as to perform stability test, and the method comprises the following steps:
after the PSU is powered on every time and the BMC system is detected to be normal, the server is automatically started;
after the server is normally started, the server executes the AC test script to carry out stability test, and the starting state of the server is monitored in real time through the flow control unit;
after the server completes the stability test, executing a shutdown action;
and after the process control unit monitors the shutdown action, the power-off and power-on control unit controls the PSU to perform power-off operation.
6. The method of claim 5, wherein the controlling the PSU to perform the power-off and power-on cycle by the power-off and power-on control unit after the automatic stability test script runs comprises:
after the PSU is controlled to perform power-off operation through the power-off and power-on control unit, the PSU of the control server is powered on after a preset time interval after power-off through the power-off and power-on control unit.
7. The method of claim 4, wherein the step of constructing the power-off and power-on control unit in the stability automatic test script comprises: inputting a PSU register address query instruction in a BMC serial port environment through a terminal device to obtain a PSU register address of a server;
and constructing a power-off and power-on control unit in the stability automatic test script according to the obtained PSU register address of the server.
8. The method of claim 5, further comprising:
and monitoring the operation of carrying out power failure on the PSU by the BMC through the flow control unit, and retrying for a preset number of times when the execution of the power failure operation on the PSU by the BMC is invalid.
9. A system for automatically performing a stability test, the system comprising: the system comprises terminal equipment, a BMC system and a server; the terminal equipment is accessed to the BMC system through a BMC serial port;
the terminal equipment is used for presetting a static IP of the BMC system through the BMC serial port after the terminal equipment is accessed to the BMC system through the BMC serial port;
the terminal device is used for sending and storing the stability automatic test script to a root directory of the BMC system according to a preset static IP of the BMC system, and sending and storing an executable authority file of the stability automatic test script to the root directory of the BMC system;
the BMC system is used for controlling the automatic stability test script to automatically run to control the PSU to perform power-off and power-on circulation after the BMC system is powered on and started up;
and the server is used for starting up the server to execute the AC test script after the PSU is powered on and the BMC system is detected to be normal every time so as to perform stability test.
10. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of a method of automatically performing a stability test as claimed in any one of claims 1 to 8 when executing a program stored in the memory.
11. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method of automatically performing a stability test according to any one of claims 1-8.
CN202211634496.9A 2022-12-19 2022-12-19 Method, system, electronic device and storage medium for automatically performing stability test Pending CN115981934A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211634496.9A CN115981934A (en) 2022-12-19 2022-12-19 Method, system, electronic device and storage medium for automatically performing stability test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211634496.9A CN115981934A (en) 2022-12-19 2022-12-19 Method, system, electronic device and storage medium for automatically performing stability test

Publications (1)

Publication Number Publication Date
CN115981934A true CN115981934A (en) 2023-04-18

Family

ID=85958902

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211634496.9A Pending CN115981934A (en) 2022-12-19 2022-12-19 Method, system, electronic device and storage medium for automatically performing stability test

Country Status (1)

Country Link
CN (1) CN115981934A (en)

Similar Documents

Publication Publication Date Title
WO2022198972A1 (en) Method, system and apparatus for fault positioning in starting process of server
CN102571498B (en) Fault injection control method and device
CN111324192A (en) System board power supply detection method, device, equipment and storage medium
CN114116280B (en) Interactive BMC self-recovery method, system, terminal and storage medium
EP2798428B1 (en) Apparatus and method for managing operation of a mobile device
TWI668567B (en) Server and method for restoring a baseboard management controller automatically
CN111737064A (en) BMC system control method and device, storage medium and computer equipment
CN110879768A (en) Power-on and power-off test method and device for multi-system server
CN111352662B (en) Server starting sequence control method, system, terminal and storage medium
CN116662050A (en) Error injection support function verification method, device, terminal and medium
CN115981934A (en) Method, system, electronic device and storage medium for automatically performing stability test
CN115168146A (en) Anomaly detection method and device
CN115080132A (en) Information processing method, information processing apparatus, server, and storage medium
CN110795293B (en) Method, system and device for testing soft shutdown of server
CN114138587A (en) Reliability verification method, device and equipment for upgrading server power firmware
CN106909489B (en) Method and device for testing EventLog state
CN111488250A (en) High-density multi-node server testing method, system, terminal and storage medium
JP5268820B2 (en) Rewriting method for monitoring device program
CN117389819B (en) Hot plug error reporting method, processor architecture, equipment and storage medium
CN115562900B (en) AMD server system installation power-off processing method, device, equipment and medium
TWI715005B (en) Monitor method for demand of a bmc
CN112732486B (en) Redundant firmware switching method, device, equipment and storage medium
JP6697102B1 (en) Information processing apparatus, information processing apparatus control method, and information processing apparatus control program
CN113900890B (en) Method, device, equipment and medium for collecting server component information
CN115756648A (en) Active recovery method and terminal for double-substrate management controller chip

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination