CN115599616A - Stability test method, system, device and medium for power-on startup strategy - Google Patents

Stability test method, system, device and medium for power-on startup strategy Download PDF

Info

Publication number
CN115599616A
CN115599616A CN202211312015.2A CN202211312015A CN115599616A CN 115599616 A CN115599616 A CN 115599616A CN 202211312015 A CN202211312015 A CN 202211312015A CN 115599616 A CN115599616 A CN 115599616A
Authority
CN
China
Prior art keywords
power
machine
state
strategy
test
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
CN202211312015.2A
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 CN202211312015.2A priority Critical patent/CN115599616A/en
Publication of CN115599616A publication Critical patent/CN115599616A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2284Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by power-on test, e.g. power-on self test [POST]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods

Abstract

The invention provides a method, a system, a device and a medium for testing the stability of a power-on startup strategy, wherein the method comprises the following steps: after the machine is started, the power-on starting strategy is set to be in an always-on state, and the fact that the machine can be kept in the starting state under the current power-on starting strategy is verified. Then, the power-on startup strategy is set to an always-off state, and the machine can be verified to be kept in a power-off state under the current power-on startup strategy. At the moment, the machine is started, the power-on starting strategy is set to be in a previous state, and the fact that the machine can be kept in the starting state under the current power-on starting strategy is verified. And then, detecting whether the current power-on startup strategy setting state of the machine is previous, if so, sending a shutdown command to shut down the machine, and verifying that the machine can be kept in a shutdown state under the current power-on startup strategy. The invention realizes the automatic power-off and power-on of the power supply controlled by the BMC and automatically verifies the stability of the power-on and power-on strategy.

Description

Stability test method, system, device and medium for power-on startup strategy
Technical Field
The invention relates to the technical field of computers, in particular to a method, a system, a device and a medium for testing the stability of a power-on startup strategy.
Background
The Power-on startup Policy (Power Restore Policy) colloquially says that several state options are provided for the server after the system is powered down and powered up again. There are generally several options as follows: power off, power on, previous state/Last state, namely, the Power is turned off after being electrified again, the Power is automatically turned on after being electrified again, and the state before Power failure is maintained after being electrified again. The mechanism can be realized through both BMC and BIOS, and because BIOS has a limitation on Last state selection, the realization mode of BMC is mainly selected at present. However, this function is problematical because of the BMC code logic and the blocking of ipmi processes.
In the prior art, the invention patent application with the application number CN201910099922.5 provides a method, a device, a terminal and a storage medium for real-time synchronization of power-down policies of a BIOS and a BMC. According to the technical scheme, the power-down strategy real-time synchronization is realized in a mode that the BIOS power-down setting is set as the master and the BMC synchronizes the BIOS power-down setting. However, after the setting under the BIOS is modified, the setting of the BMC cannot be immediately synchronized to take effect, and the setting under the BMC can be modified only after the BMC acquires the setting of the BIOS when the next reboot occurs, so that the BMC and the setting of the power-down policy of the BIOS are synchronized to have a delay phenomenon. This still causes a certain trouble to the customer. Therefore, the prior art only synchronizes the set values of the scheme, and does not verify the stability of the strategy.
Therefore, how to effectively verify the stability of the power-on startup strategy function is an urgent problem to be solved.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a method, a system, a device, and a medium for testing the stability of a power-on/power-on strategy, which implement automatic power-off and power-on control of a power supply by a BMC and automatically verify the stability of the power-on/power-on strategy.
In order to achieve the purpose, the invention is realized by the following technical scheme: a method for testing the stability of a power-on startup strategy comprises the following steps:
s1: setting the detection times N to be 1;
s2: after the machine is started, setting a power-on starting strategy to be in an always-on state, and enabling the machine to be automatically powered on after the power of the machine is cut off for one minute;
s3: verifying that the machine can be kept in a starting state under a current power-on starting strategy;
s4: setting a power-on startup strategy to an always-off state, and enabling the machine to be automatically powered on after the power of the machine is cut off for one minute;
s5: verifying that the machine can be kept in a shutdown state under the current power-on startup strategy;
s6: starting up a machine, and setting a power-on starting strategy to be in a previous state;
s7: verifying that the machine can be kept in a starting state under a current power-on starting strategy;
s8, detecting whether the current power-on startup strategy setting state of the machine is previous, if so, sending a shutdown command to shut down the machine, otherwise, outputting fail, and ending the test;
s9: verifying that the machine can be kept in a shutdown state under the current power-on startup strategy;
s10: adding 1 to the detection times N;
s11: and judging whether N is equal to 500, if so, ending the test and outputting a test result, otherwise, continuing to execute the step S2.
Further, the step S2 includes:
after the machine is started, setting the power-on starting strategy to an always-on state, and detecting whether the current power-on starting strategy setting state is always-on; if yes, sending a preset command to a power supply in a starting-up state, and ensuring that the machine is automatically powered on after the power failure occurs for one minute; if not, outputting fail and ending the test.
Further, the step S3 includes:
s31: continuing ping the BMC IP of the machine, if the machine has a ping on state after disconnection, checking the machine state after the BMC pings on for 30 seconds, if the machine is in a starting state, executing the next step, otherwise outputting fail, and ending the test;
s32: detecting whether a current power-on startup strategy is in an always-on state, if so, sending a shutdown command to shut down the machine, otherwise, outputting fail, and ending the test;
s33: detecting whether the machine is shut down at present;
if not, outputting fail and ending the test;
if the power supply is in the power-off state, a preset command is sent to the power supply to enable the machine to be automatically powered on after the power supply is powered off for one minute, the BMC IP of the ping machine is continuously Ping, if the machine is in the Ping-on state after disconnection, the normal power-on action is shown after power supply is recovered, the machine state is detected after the BMC is Ping-on for 30 seconds, if the machine state is in the power-on state, the next step is executed, if the machine state is in the power-off state, fail is output, and the test is finished.
Further, the step S4 includes:
setting the power-on startup strategy to an always-off state, and detecting whether the current power-on startup strategy setting state is always-off; if yes, sending a preset command to a power supply in a starting-up state, and ensuring that the machine is automatically powered on after the power failure occurs for one minute; if not, outputting fail and ending the test.
Further, the step S5 includes:
s51: continuing ping the BMC IP of the machine, if the machine has a ping on state after disconnection, checking the machine state after the BMC pings on for 30 seconds, if the machine is in a power-off state, executing the next step, otherwise outputting fail, and ending the test;
s52: detecting whether a current power-on startup strategy is in an always-off state, if so, sending a shutdown command to shut down the machine, otherwise, outputting fail, and ending the test;
s53: detecting whether the machine is shut down at present;
if not, outputting fail and ending the test;
if the power supply is in the power-off state, a preset command is sent to the power supply to enable the machine to be automatically powered on after the power supply is powered off for one minute, the BMC IP of the ping machine is continuously started, if the machine is in the ping-on state after the power supply is recovered, a normal power-on action is provided, the machine state is detected after the BMC is ping-on for 30 seconds, if the machine is in the power-off state, the next step is executed, if the machine is in the power-on state, fail is output, and the test is finished.
Further, the step S7 includes:
s71: detecting whether the current power-on startup strategy setting state of the machine is previous; if so, maintaining the machine in a starting state and sending a preset command to a power supply to realize automatic power-on after power failure for 1 minute, otherwise outputting fail and ending the test;
s72: and (3) continuing ping the BMC IP of the machine, if the machine has a ping on state after disconnection, indicating that normal power-on action exists after power supply is recovered, detecting the machine state after the BMC is ping on for 30 seconds, if the machine state is a power-on state, executing the next step, if the machine state is a power-off state, outputting fail, and ending the test.
Further, the step S9 includes:
s91, detecting whether the current machine is shut down; if yes, executing the next step, otherwise, outputting fail, and ending the test; s92: sending a preset command to a power supply to realize automatic power-on after power failure for 1 minute, continuously ping the BMC IP of the machine, if the machine has a ping on state after disconnection, indicating that normal power-on action exists after power supply is restored, and detecting the machine state after the BMC pins on for 30 s; if the test is in the power-off state, executing the next step, if the test is in the power-on state, outputting fail, and ending the test.
Correspondingly, the invention also discloses a stability test system of the power-on startup strategy, which comprises: the power-on strategy setting module is used for setting the power-on strategy to be in an always-on state, an always-off state or a previous state;
the first verification module is used for verifying that the machine can be kept in a starting state when the current power-on starting strategy is in an always-on state;
the second verification module is used for verifying that the machine can be kept in a shutdown state when the current power-on startup strategy is an always-off state;
the third verification module is used for verifying that the machine can be kept in a starting state after being started and when the power-on starting strategy is in a previous state;
the fourth verification module is used for verifying that the machine can be kept in a shutdown state after shutdown and when the power-on startup strategy is in a previous state;
and the counting module is used for setting the detection times N and judging whether N is equal to 500.
Correspondingly, the invention discloses a device for testing the stability of a power-on startup strategy, which comprises:
the storage is used for storing a stability test program of the power-on startup strategy;
and the processor is used for realizing the steps of the stability test method of the power-on starting strategy when executing the stability test program of the power-on starting strategy.
Correspondingly, the invention discloses a readable storage medium, wherein the readable storage medium is stored with a stability test program of the power-on startup strategy, and the stability test program of the power-on startup strategy is executed by a processor to realize the steps of the stability test method of the power-on startup strategy.
Compared with the prior art, the invention has the beneficial effects that:
1. the invention can carry out automatic test verification aiming at each power-on startup strategy, thereby greatly saving test time.
2. The invention can utilize the customized power supply firmware to control the power-off action of the power supply through the ipmi command without an additional intelligent PDU (Power distribution Unit) jig, and the test is convenient and quick.
3. The invention can be applied to all PCIE equipment, breaks through the limitation that the traditional test method is only applicable to the PCIE network card, and better meets the test requirement of the diversity of the PCIE equipment.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
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 description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a process flow diagram of an embodiment of the present invention.
Fig. 2 is a system configuration diagram of an embodiment of the present invention.
In the figure, 1, a power-on strategy setting module; 2. a first authentication module; 3. a second authentication module; 4. a third verification module; 5. a fourth verification module; 6. and a counting module.
Detailed Description
The core of the invention is to provide a method for testing the stability of the power-on startup strategy, in the prior art, because the setting of the BMC cannot be synchronously effective immediately after the setting of the BIOS is modified, the setting of the BMC can be modified only after the BMC acquires the setting of the BIOS at the next restart, and the phenomenon of time delay exists between the BMC and the setting of the power-off strategy of the BIOS synchronously. This still causes a certain trouble to the customer. In the prior art, only the synchronization of the set values of the scheme is performed, and the stability of the strategy is not verified.
Firstly, after the machine is started, the power-on startup strategy is set to be in an always-on state, and the machine can be verified to be in the startup state under the current power-on startup strategy. And then, setting the power-on startup strategy to an always-off state, enabling the machine to be automatically powered on after the power is off for one minute, and verifying that the machine can be kept in a power-off state under the current power-on startup strategy. At the moment, the machine is started, the power-on starting strategy is set to be in a previous state, and the fact that the machine can be kept in the starting state under the current power-on starting strategy is verified. And then, detecting whether the current power-on startup strategy setting state of the machine is previous, if so, sending a shutdown command to shut down the machine, otherwise, outputting fail, and ending the test. And finally, verifying that the machine can be kept in a shutdown state under the current power-on startup strategy. And circularly executing the operation 500 times, and outputting a test result after the test is finished. Therefore, the invention realizes the automatic power-off and power-on control of the power supply through the BMC and automatically verifies the stability of the power-on and power-on strategy.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The first embodiment is as follows:
as shown in fig. 1, the present embodiment provides a method for testing stability of a power-on startup policy, including the following steps:
s1: setting the detection times N to 1;
s2: after the machine is started, the power-on starting strategy is set to be in an always-on state, and the machine can be automatically powered on after being powered off for one minute.
Specifically, after the machine is started, setting the power-on starting strategy to an always-on state, and detecting whether the current power-on starting strategy setting state is always-on; if yes, sending a preset command to a power supply in a starting-up state, and ensuring that the machine is automatically powered on after the power failure occurs for one minute; if not, outputting fail and ending the test.
S3: and verifying that the machine can be kept in a starting state under the current power-on starting strategy.
Firstly, continuously ping the BMC IP of the machine, if the machine has a ping on state after disconnection, checking the machine state after the BMC ping on for 30 seconds, if the machine is in a power-on state, executing the next step, otherwise, outputting fail, and ending the test.
And then, detecting whether the current power-on startup strategy is in an always-on state, if so, sending a shutdown command to shut down the machine, otherwise, outputting fail, and ending the test.
Finally, whether the machine is shut down at present is detected; if not, outputting fail and ending the test; if the power supply is in the power-off state, a preset command is sent to the power supply to enable the machine to be automatically powered on after the power supply is powered off for one minute, the BMC IP of the ping machine is continuously Ping, if the machine is in the Ping-on state after disconnection, the normal power-on action is shown after power supply is recovered, the machine state is detected after the BMC is Ping-on for 30 seconds, if the machine state is in the power-on state, the next step is executed, if the machine state is in the power-off state, fail is output, and the test is finished.
S4: and setting the power-on and power-off strategy to be in an always-off state, and enabling the machine to be automatically powered on after the power is off for one minute.
Specifically, the power-on startup strategy is set to an always-off state, and whether the current power-on startup strategy setting state is always-off is detected; if yes, sending a preset command to a power supply in a starting-up state, and ensuring that the machine is automatically powered on after the power failure occurs for one minute; if not, outputting fail and ending the test.
S5: and verifying that the machine can be kept in a shutdown state under the current power-on and power-on strategy.
Firstly, the BMC IP of the ping machine is continuously ping, if the machine has a ping on state after disconnection, the machine state is checked after the BMC ping on for 30 seconds, if the machine is in a power-off state, the next step is executed, otherwise fail is output, and the test is finished.
And then, detecting whether the current power-on startup strategy is in an always-off state, if so, sending a shutdown command to shut down the machine, otherwise, outputting fail, and ending the test.
Finally, detecting whether the machine is shut down at present; if not, outputting fail and ending the test; if the power supply is in the power-off state, a preset command is sent to the power supply to enable the machine to be automatically powered on after the power supply is powered off for one minute, the BMC IP of the ping machine is continuously started, if the machine is in the ping-on state after the power supply is recovered, a normal power-on action is provided, the machine state is detected after the BMC is ping-on for 30 seconds, if the machine is in the power-off state, the next step is executed, if the machine is in the power-on state, fail is output, and the test is finished.
S6: the machine is started and the power-on strategy is set to be in previous state.
S7: and verifying that the machine can be kept in a starting state under the current power-on starting strategy.
Specifically, whether the current power-on strategy setting state of the machine is previous is detected; if so, maintaining the machine in a starting state and sending a preset command to the power supply so as to realize automatic power-on after power failure for 1 minute, otherwise outputting fail and ending the test. And then continuing ping the BMC IP of the machine, if the machine has a ping on state after disconnection, indicating that normal power-on action exists after power supply is recovered, detecting the machine state after the BMC is ping on for 30 seconds, if the machine state is a power-on state, executing the next step, if the machine state is a power-off state, outputting fail, and ending the test.
And S8, detecting whether the current power-on startup strategy setting state of the machine is previous, if so, sending a shutdown command to shut down the machine, otherwise, outputting fail, and finishing the test.
S9: and verifying that the machine can be kept in a shutdown state under the current power-on and power-on strategy.
The method specifically comprises the following two steps:
the first step is as follows: detecting whether the current machine is shut down; if yes, executing the next step, otherwise, outputting fail, and ending the test.
The second step: sending a preset command to a power supply to realize automatic power-on after power failure for 1 minute, continuously ping the BMC IP of the machine, if the machine has a ping on state after disconnection, indicating that normal power-on action exists after power supply is restored, and detecting the machine state after the BMC pins on for 30 s; if the test is in the power-off state, executing the next step, if the test is in the power-on state, outputting fail, and ending the test.
S10: and adding 1 to the detection times N.
S11: and judging whether N is equal to 500, if so, ending the test and outputting a test result, otherwise, continuing to execute the step S2.
Through the setting of the detection times N, the operation is circularly executed for 500 times, and a test result is output after the test is finished.
The embodiment provides a stability test method of a power-on startup strategy, and the power FW is customized according to the method, so that the BMC can control the power to be automatically powered off and on without controlling the power to be powered on and powered off by other intelligent PDUs, and the stability of the function is verified.
Example two:
based on the first embodiment, as shown in fig. 2, the present invention further discloses a stability testing system for a power-on startup strategy, which includes: the power-on policy verification system comprises a power-on policy setting module 1, a first verification module 2, a second verification module 3, a third verification module 4, a fourth verification module 5 and a counting module 5.
And the power-on strategy setting module 1 is used for setting the power-on startup strategy to an always-on state, an always-off state or a previous state.
The first verification module 2 is used for verifying that the machine can be kept in a boot state when the current power-on boot strategy is in an always-on state. The first verification module 2 is specifically configured to: firstly, continuously ping the BMC IP of the machine, if the machine has a ping on state after disconnection, checking the machine state after the BMC ping on for 30 seconds, if the machine is in a power-on state, executing the next step, otherwise, outputting fail, and ending the test. And then, detecting whether the current power-on startup strategy is in an always-on state, if so, sending a shutdown command to shut down the machine, otherwise, outputting fail, and ending the test. Finally, whether the machine is shut down at present is detected; if not, outputting fail and ending the test; if the power supply is in the power-off state, a preset command is sent to the power supply to enable the machine to be automatically powered on after the power supply is powered off for one minute, the BMC IP of the ping machine is continuously Ping, if the machine is in the Ping-on state after disconnection, the normal power-on action is shown after power supply is recovered, the machine state is detected after the BMC is Ping for 30 seconds, if the machine state is in the power-on state, the second verification module 3 is continuously used for verification, if the machine state is in the power-off state, fail is output, and the test is finished.
And the second verification module 3 is used for verifying that the machine can be kept in a shutdown state when the current power-on startup strategy is an always-off state. The second verification module 3 is specifically configured to: firstly, the BMC IP of the ping machine is continuously ping, if the machine has a ping on state after disconnection, the machine state is checked after the BMC ping on for 30 seconds, if the machine is in a power-off state, the next step is executed, otherwise fail is output, and the test is finished. And then, detecting whether the current power-on startup strategy is in an always-off state, if so, sending a shutdown command to shut down the machine, otherwise, outputting fail, and ending the test. Finally, detecting whether the machine is shut down at present; if not, outputting fail and ending the test; if the power supply is in the power-off state, a preset command is sent to the power supply to enable the machine to be automatically powered on after the power supply is powered off for one minute, the BMC IP of the ping machine is continuously Ping, if the machine is in the Ping-on state after disconnection, the normal power-on action is shown after power supply is recovered, the machine state is detected after the BMC is Ping for 30 seconds, if the machine state is in the power-off state, the verification is continuously carried out through the third verification module 4, if the machine state is in the power-on state, fail is output, and the test is finished.
And the third verification module 4 is used for verifying that the machine can be kept in a startup state after the machine is started and the power-on startup strategy is in a previous state. The third verification module 4 is specifically configured to: firstly, detecting whether the current power-on strategy setting state of a machine is previous; if so, maintaining the machine in a starting state and sending a preset command to the power supply so as to realize automatic power-on after power failure for 1 minute, otherwise outputting fail and ending the test. And then, continuously ping the BMC IP of the machine, if the machine has a ping on state after disconnection, indicating that normal power-on action exists after power supply is recovered, detecting the machine state after the BMC pings for 30 seconds, if the machine state is in a power-on state, continuously verifying through the fourth verification module 5, if the machine state is in a power-off state, outputting fail, and ending the test.
And the fourth verification module 5 is configured to verify that the machine can be kept in a shutdown state after shutdown and when the power-on startup policy is in a previous state. The fourth verification module 5 is specifically configured to: detecting whether the current machine is shut down; if yes, executing the next step, otherwise, outputting fail, and ending the test. Then, sending a preset command to a power supply to realize automatic power-on after power failure for 1 minute, continuously ping the BMC IP of the machine, if the machine has a ping on state after disconnection, indicating that normal power-on action exists after power supply is restored, and detecting the machine state after the BMC is ping on for 30 s; if the power-off state is the power-off state, counting detection is carried out, if the power-on state is the power-on state, fail is output, and the test is finished.
And the counting module 5 is used for setting the detection times N, judging whether N is equal to 500 or not, and if not, continuing to set the state and carrying out circular detection by the power-on strategy setting module 1.
The embodiment provides a stability test system of an electrifying and starting strategy, which can realize that the BMC can control the power supply to automatically power off and power on, does not need to control the power supply to power on and power off by other intelligent PDUs, and verifies the stability of the function.
Example three:
the embodiment discloses a stability testing device of a power-on startup strategy, which comprises a processor and a memory; wherein, the processor implements the following steps when executing the stability test program of the power-on startup strategy stored in the memory:
1. the number of detections N is set to 1.
2. After the machine is started, the power-on starting strategy is set to be in an always-on state, and the machine can be automatically powered on after being powered off for one minute.
3. And verifying that the machine can be kept in a power-on state under the current power-on strategy.
4. And setting the power-on startup strategy to an always-off state, and enabling the machine to be automatically powered on after the power of the machine is cut off for one minute.
5. And verifying that the machine can be kept in a shutdown state under the current power-on and power-on strategy.
6. The machine is started and the power-on strategy is set to be in previous state.
7. And verifying that the machine can be kept in a starting state under the current power-on starting strategy.
8. And detecting whether the current power-on startup strategy setting state of the machine is previous, if so, sending a shutdown command to shut down the machine, otherwise, outputting fail, and finishing the test.
9. And verifying that the machine can be kept in a shutdown state under the current power-on and power-on strategy.
10. And adding 1 to the detection times N.
11. And judging whether N is equal to 500, if so, ending the test and outputting a test result, otherwise, continuing to execute the step 2.
Further, the stability testing apparatus of the power-on startup policy in this embodiment may further include:
the input interface is used for acquiring a stability test program of an externally introduced power-on startup strategy, storing the acquired stability test program of the power-on startup strategy into the memory, and also used for acquiring various instructions and parameters transmitted by external terminal equipment and transmitting the instructions and parameters to the processor, so that the processor can utilize the instructions and parameters to perform corresponding processing. In this embodiment, the input interface may specifically include, but is not limited to, a USB interface, a serial interface, a voice input interface, a fingerprint input interface, a hard disk reading interface, and the like.
And the output interface is used for outputting various data generated by the processor to the terminal equipment connected with the output interface, so that other terminal equipment connected with the output interface can acquire various data generated by the processor. In this embodiment, the output interface may specifically include, but is not limited to, a USB interface, a serial interface, and the like.
And the communication unit is used for establishing remote communication connection between the stability testing device of the power-on startup strategy and the external server so that the stability testing device of the power-on startup strategy can mount the mirror image file into the external server. In this embodiment, the communication unit may specifically include, but is not limited to, a remote communication unit based on a wireless communication technology or a wired communication technology.
And the keyboard is used for acquiring various parameter data or instructions input by a user through real-time key cap knocking.
And the display is used for displaying relevant information in the short circuit positioning process of the power supply line of the running server in real time.
The mouse can be used for assisting a user in inputting data and simplifying the operation of the user.
Example four:
the present embodiments also disclose a readable storage medium, where the readable storage medium includes Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable hard disk, a CD-ROM, or any other form of storage medium known in the art. The readable storage medium stores a stability test program of the power-on strategy, and when the stability test program of the power-on strategy is executed by the processor, the following steps are realized:
1. the number of detections N is set to 1.
2. After the machine is started, the power-on starting strategy is set to be in an always-on state, and the machine can be automatically powered on after being powered off for one minute.
3. And verifying that the machine can be kept in a starting state under the current power-on starting strategy.
4. And setting the power-on startup strategy to an always-off state, and enabling the machine to be automatically powered on after the power of the machine is cut off for one minute.
5. And verifying that the machine can be kept in a shutdown state under the current power-on and power-on strategy.
6. The machine is started and the power-on strategy is set to be in previous state.
7. And verifying that the machine can be kept in a starting state under the current power-on starting strategy.
8. And detecting whether the current power-on startup strategy setting state of the machine is previous, if so, sending a shutdown command to shut down the machine, otherwise, outputting fail, and finishing the test.
9. And verifying that the machine can be kept in a shutdown state under the current power-on and power-on strategy.
10. And adding 1 to the detection times N.
11. And judging whether N is equal to 500, if so, ending the test and outputting a test result, otherwise, continuing to execute the step 2.
In conclusion, the invention realizes the automatic power-off and power-on of the power supply controlled by the BMC and automatically verifies the stability of the power-on and power-on strategy.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. For the method disclosed by the embodiment, the description is simple because the method corresponds to the system disclosed by the embodiment, and the relevant points can be referred to the description of the method part.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided by the present invention, it should be understood that the disclosed system, system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, systems or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit.
Similarly, each processing unit in the embodiments of the present invention may be integrated into one functional module, or each processing unit may exist physically, or two or more processing units are integrated into one functional module.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be 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 phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The method, system, device and readable storage medium for testing the stability of the power-on startup strategy provided by the invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (10)

1. A method for testing the stability of a power-on startup strategy is characterized by comprising the following steps:
s1: setting the detection times N to 1;
s2: after the machine is started, setting a power-on starting strategy to be in an always-on state, and enabling the machine to be automatically powered on after the power of the machine is cut off for one minute;
s3: verifying that the machine can be kept in a starting state under a current power-on starting strategy;
s4: setting a power-on startup strategy to an always-off state, and enabling the machine to be automatically powered on after the power of the machine is cut off for one minute;
s5: verifying that the machine can be kept in a shutdown state under the current power-on startup strategy;
s6: starting up a machine, and setting a power-on starting strategy to be in a previous state;
s7: verifying that the machine can be kept in a starting state under a current power-on starting strategy;
s8, detecting whether the current power-on startup strategy setting state of the machine is previous, if so, sending a shutdown command to shut down the machine, otherwise, outputting fail, and ending the test;
s9: verifying that the machine can be kept in a shutdown state under the current power-on startup strategy;
s10: adding 1 to the detection times N;
s11: and judging whether N is equal to 500, if so, ending the test and outputting a test result, otherwise, continuing to execute the step S2.
2. The method for testing the stability of the power-on startup strategy according to claim 1, wherein the step S2 comprises:
after the machine is started, setting the power-on starting strategy to an always-on state, and detecting whether the current power-on starting strategy setting state is always-on; if yes, sending a preset command to a power supply in a starting-up state, and ensuring that the machine is automatically powered on after the power failure occurs for one minute; if not, outputting fail and ending the test.
3. The method for testing the stability of the power-on startup strategy according to claim 1, wherein the step S3 comprises:
s31: continuing ping the BMC IP of the machine, if the machine has a ping on state after disconnection, checking the machine state after the BMC pings on for 30 seconds, if the machine is in a starting state, executing the next step, otherwise outputting fail, and ending the test;
s32: detecting whether a current power-on startup strategy is in an always-on state, if so, sending a shutdown command to shut down the machine, otherwise, outputting fail, and ending the test;
s33: detecting whether the machine is shut down at present;
if not, outputting fail and ending the test;
if the power supply is in the power-off state, a preset command is sent to the power supply to enable the machine to be automatically powered on after the power supply is powered off for one minute, the BMC IP of the ping machine is continuously Ping, if the machine is in the Ping-on state after disconnection, the normal power-on action is shown after power supply is recovered, the machine state is detected after the BMC is Ping-on for 30 seconds, if the machine state is in the power-on state, the next step is executed, if the machine state is in the power-off state, fail is output, and the test is finished.
4. The method for testing the stability of the power-on startup strategy according to claim 1, wherein the step S4 comprises:
setting the power-on strategy to an always-off state, and detecting whether the current power-on strategy setting state is always-off; if yes, sending a preset command to a power supply in a starting-up state, and ensuring that the machine is automatically powered on after the power failure occurs for one minute; if not, outputting fail and ending the test.
5. The method for testing the stability of the power-on startup strategy according to claim 1, wherein the step S5 comprises:
s51: continuing ping the BMC IP of the machine, if the machine has a ping on state after disconnection, checking the machine state after the BMC pings on for 30 seconds, if the machine is in a power-off state, executing the next step, otherwise outputting fail, and ending the test;
s52: detecting whether a current power-on startup strategy is in an always-off state, if so, sending a shutdown command to shut down the machine, otherwise, outputting fail, and ending the test;
s53: detecting whether the machine is shut down at present;
if not, outputting fail and ending the test;
if the power supply is disconnected, the machine is in a ping connection state, namely normal power-on action exists after power supply is recovered, the machine state is detected after the BMC is in the ping connection state for 30 seconds, if the machine is in a power-off state, the next step is executed, if the machine is in a power-on state, fail is output, and the test is finished.
6. The method for testing the stability of the power-on startup strategy according to claim 1, wherein the step S7 comprises:
s71: detecting whether the current power-on startup strategy setting state of the machine is previous; if so, maintaining the machine in a starting state and sending a preset command to a power supply to realize automatic power-on after power failure for 1 minute, otherwise outputting fail and ending the test;
s72: and (3) continuing ping the BMC IP of the machine, if the machine has a ping on state after disconnection, indicating that normal power-on action exists after power supply is recovered, detecting the machine state after the BMC is ping on for 30 seconds, if the machine state is a power-on state, executing the next step, if the machine state is a power-off state, outputting fail, and ending the test.
7. The method for testing the stability of the power-on startup strategy according to claim 1, wherein the step S9 comprises:
s91, detecting whether the current machine is shut down; if yes, executing the next step, otherwise, outputting fail, and ending the test;
s92: sending a preset command to a power supply to realize automatic power-on after power failure for 1 minute, continuously ping the BMC IP of the machine, if the machine has a ping on state after disconnection, indicating that normal power-on action exists after power supply is restored, and detecting the machine state after the BMC pins on for 30 s; if the test is in the power-off state, executing the next step, if the test is in the power-on state, outputting fail, and ending the test.
8. A system for testing stability of a power-on boot policy, comprising:
the power-on strategy setting module is used for setting the power-on startup strategy to an always-on state, an always-off state or a previous state;
the first verification module is used for verifying that the machine can be kept in a starting state when the current power-on starting strategy is in an always-on state;
the second verification module is used for verifying that the machine can be kept in a shutdown state when the current power-on startup strategy is an always-off state;
the third verification module is used for verifying that the machine can be kept in a starting state after being started and when the power-on starting strategy is in a previous state;
the fourth verification module is used for verifying that the machine can be kept in a shutdown state after shutdown and when the power-on startup strategy is in a previous state;
and the counting module is used for setting the detection times N and judging whether N is equal to 500.
9. A device for testing the stability of a power-on boot strategy, comprising:
the memory is used for storing a stability test program of the power-on startup strategy;
a processor, configured to implement the steps of the stability testing method of the power-on boot policy according to any one of claims 1 to 7 when executing the stability testing program of the power-on boot policy.
10. A readable storage medium, characterized by: the readable storage medium has stored thereon a stability test program of the power-on policy, which when executed by the processor implements the steps of the stability test method of the power-on policy according to any one of claims 1 to 7.
CN202211312015.2A 2022-10-25 2022-10-25 Stability test method, system, device and medium for power-on startup strategy Pending CN115599616A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211312015.2A CN115599616A (en) 2022-10-25 2022-10-25 Stability test method, system, device and medium for power-on startup strategy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211312015.2A CN115599616A (en) 2022-10-25 2022-10-25 Stability test method, system, device and medium for power-on startup strategy

Publications (1)

Publication Number Publication Date
CN115599616A true CN115599616A (en) 2023-01-13

Family

ID=84849406

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211312015.2A Pending CN115599616A (en) 2022-10-25 2022-10-25 Stability test method, system, device and medium for power-on startup strategy

Country Status (1)

Country Link
CN (1) CN115599616A (en)

Similar Documents

Publication Publication Date Title
CN109510742B (en) Server network card remote test method, device, terminal and storage medium
CN104133709B (en) The upgrade method and device of embedded system
CN109976816B (en) Computer system configuration method and server
CN109670319A (en) A kind of server flash method for managing security and its system
CN110838953B (en) Test method, test system, electronic equipment and storage medium
CN114116280A (en) Interactive BMC self-recovery method, system, terminal and storage medium
CN116107819A (en) Server start-up fault detection system, method, device and medium
CN115827111A (en) Method and device for adjusting server startup items, storage medium and electronic device
CN110445932B (en) Abnormal card dropping processing method and device, storage medium and terminal
CN109582324B (en) IC burning method and board card
CN110879768A (en) Power-on and power-off test method and device for multi-system server
CN111176897A (en) Closed BIOS self-repairing method, system, terminal and storage medium
CN113608930A (en) System chip and electronic device
CN115599616A (en) Stability test method, system, device and medium for power-on startup strategy
CN115098342A (en) System log collection method, system, terminal and storage medium
TWI753606B (en) Master-slave interchangeable power supply device and its host, master-slave interchangeable power supply method and computer-readable recording medium
CN111400113B (en) Complete machine self-checking method, device and system of computer system
CN114647531B (en) Failure solving method, failure solving system, electronic device, and storage medium
CN114385379B (en) Method, system, terminal and storage medium for detecting on-board information refreshing
CN115562900B (en) AMD server system installation power-off processing method, device, equipment and medium
CN111327722B (en) Conflict detection method, system, terminal and storage medium for static IP and dynamic IP
CN105893851A (en) Device and method for safe starting of server
CN117075936A (en) Board card FRU back brushing method, system, terminal and storage medium
CN115470054A (en) Server memory function testing method, system, device and storage medium
CN117349062A (en) BIOS fault processing method, system, device, equipment and medium

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