CN110795293B - Method, system and device for testing soft shutdown of server - Google Patents

Method, system and device for testing soft shutdown of server Download PDF

Info

Publication number
CN110795293B
CN110795293B CN201910926631.9A CN201910926631A CN110795293B CN 110795293 B CN110795293 B CN 110795293B CN 201910926631 A CN201910926631 A CN 201910926631A CN 110795293 B CN110795293 B CN 110795293B
Authority
CN
China
Prior art keywords
server
soft
state
ping
testing
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.)
Active
Application number
CN201910926631.9A
Other languages
Chinese (zh)
Other versions
CN110795293A (en
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 CN201910926631.9A priority Critical patent/CN110795293B/en
Publication of CN110795293A publication Critical patent/CN110795293A/en
Application granted granted Critical
Publication of CN110795293B publication Critical patent/CN110795293B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/2273Test methods
    • 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/2294Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by remote test

Abstract

The invention discloses a method for testing the soft shutdown of a server, which can enable the server to independently enter or exit a dormant state by setting the state parameters of the server, and can autonomously judge whether the server successfully enters or exits the dormant state by an operating system IP (Internet protocol) mode of a ping server, thereby determining the passing condition of the soft shutdown test of the server according to the dormant condition of the server. Therefore, the method and the device can automatically perform the soft-off test of the server, and can simultaneously test a plurality of servers at the same time, thereby shortening the test time and improving the test efficiency. The invention also discloses a system and a device for testing the soft shutdown of the server, and the system and the device have the same beneficial effects as the testing method.

Description

Method, system and device for testing soft shutdown of server
Technical Field
The present invention relates to the field of servers, and in particular, to a method, a system, and an apparatus for testing a soft shutdown of a server.
Background
The server soft-off (hibernation) test is a more important test in the server test project. In the prior art, the process of the server soft-off test includes: when the server is started, a tester presses the power key for a short time to enable the server to enter a dormant state, and presses the power key for a short time again to enable the server to exit the dormant state, in the process, the tester needs to check whether the server can successfully enter and exit the dormant state, if yes, the server soft shutdown test is passed, namely the server soft shutdown is normal; if not, the server soft-off test is failed, namely the server soft-off is abnormal. Therefore, the server soft-off test needs manual operation of a tester, and one tester cannot test multiple servers at the same time, which results in longer test time and lower test efficiency.
Therefore, how to provide a solution to the above technical problem is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a method, a system and a device for testing server soft-off, which can automatically test the server soft-off and simultaneously test a plurality of servers at the same time, thereby shortening the testing time and improving the testing efficiency.
In order to solve the above technical problem, the present invention provides a method for testing a server soft shutdown, comprising:
when a server is in a starting state, autonomously setting a state parameter of the server to a parameter value corresponding to a dormant state so as to enable the server to enter the dormant state;
autonomously detecting whether an operating system IP of the server can ping, and if not, determining that the server successfully enters a dormant state; if so, determining that the server fails to enter a dormant state;
autonomously restoring state parameters of the server to cause the server to exit the hibernation state after determining that the server successfully entered the hibernation state;
autonomously detecting whether the IP of the operating system can ping or not, and if so, determining that the server successfully exits from the sleep state; if not, determining that the server fails to exit the dormant state so as to determine the passing condition of the soft shutdown test of the server according to the dormant condition of the server.
Preferably, after autonomously setting the state parameter of the server to the parameter value corresponding to the hibernation state, before autonomously detecting whether the operating system IP of the server can ping, the test method further includes:
autonomously detecting whether the server is in a starting state or not;
if yes, executing the step of autonomously detecting whether the operating system IP of the server can ping;
if not, the step of autonomously detecting whether the operating system IP of the server can ping communication is not executed, and the failure of the soft-off test of the server is directly determined.
Preferably, before autonomously setting the state parameter of the server to the parameter value corresponding to the hibernation state, the testing method further includes:
autonomously detecting whether the current test environment of the server meets the soft-off test requirement of the server;
if yes, executing the step of autonomously setting the state parameters of the server to the parameter values corresponding to the dormant state;
if not, the step of autonomously setting the state parameters of the server to the parameter values corresponding to the dormant state is not executed.
Preferably, the process of autonomously detecting whether the current testing environment of the server meets the requirements of the server soft-off test includes:
autonomously detecting whether a baseboard management controller (IP) and an operating system (IP) of the server can ping;
if both the server and the server can be ping-connected, determining that the current testing environment of the server meets the requirement of the server soft-off test;
otherwise, determining that the current testing environment of the server does not meet the soft-off testing requirement of the server.
Preferably, before determining that the current testing environment of the server does not meet the server soft-off testing requirement, the testing method further comprises:
when the substrate management controller IP is not ping-on and the operating system IP is ping-on, circularly detecting whether the substrate management controller IP can ping-on or not within preset time;
if yes, determining that the current test environment of the server meets the soft-off test requirement of the server;
if not, executing the step of determining that the current testing environment of the server does not meet the soft-off testing requirement of the server.
Preferably, after the baseboard management controller IP is not ping for a preset time, the test method further includes:
restarting a substrate management controller, reconfiguring a static IP for the substrate management controller again, and then detecting whether the IP of the substrate management controller can ping;
if yes, finally determining that the current testing environment of the server meets the soft-off testing requirement of the server;
if not, finally determining that the current testing environment of the server does not meet the requirements of the server soft-off testing.
Preferably, before determining that the current testing environment of the server does not meet the server soft-off testing requirement, the testing method further comprises:
when the substrate management controller IP is ping-on and the operating system IP is not ping-on, acquiring the state of the operating system;
when the operating system is in a starting state, circularly detecting whether the operating system IP can ping in a preset time;
if yes, determining that the current test environment of the server meets the soft-off test requirement of the server;
if not, executing the step of determining that the current testing environment of the server does not meet the soft-off testing requirement of the server;
and when the operating system is in a power-off state, executing power-on operation, and returning to the step of circularly detecting whether the IP of the operating system can be ping-connected within preset time.
Preferably, after the operating system IP has not ping for a preset time, the test method further includes:
after the basic input and output system of the server is recovered and initialized, restarting operation is executed, and then whether the IP of the operating system can be ping-connected or not is re-detected;
if yes, finally determining that the current testing environment of the server meets the soft-off testing requirement of the server;
if not, finally determining that the current testing environment of the server does not meet the requirement of the server soft-off testing.
In order to solve the above technical problem, the present invention further provides a system for testing a server soft shutdown, including:
the automatic dormancy module is used for autonomously setting the state parameters of the server to the parameter values corresponding to the dormancy state when the server is in the starting state so as to enable the server to enter the dormancy state;
the first detection module is used for autonomously detecting whether the IP of the operating system of the server can ping, and if not, determining that the server successfully enters a dormant state; if so, determining that the server fails to enter a dormant state;
the sleep exit module is used for autonomously recovering the state parameters of the server after determining that the server successfully enters the sleep state so as to enable the server to exit the sleep state;
the second detection module is used for autonomously detecting whether the IP of the operating system can ping or not, and if so, determining that the server successfully exits the sleep state; if not, determining that the server fails to exit the dormant state so as to determine the passing condition of the soft shutdown test of the server according to the dormant condition of the server.
In order to solve the above technical problem, the present invention further provides a device for testing soft shutdown of a server, including:
a memory for executing a computer program;
and the processor is used for realizing the steps of any one of the server soft-off testing methods when executing the computer program.
The invention provides a method for testing the soft shutdown of a server, which can lead the server to enter or exit from a dormant state independently in a mode of setting state parameters of the server, and can judge whether the server successfully enters or exits from the dormant state independently in a mode of an operating system IP of a ping server, thereby determining the passing condition of the soft shutdown test of the server according to the dormant condition of the server. Therefore, the method and the device can automatically perform the soft-off test of the server, and can simultaneously test a plurality of servers at the same time, thereby shortening the test time and improving the test efficiency.
The invention also provides a system and a device for testing the soft shutdown of the server, and the system and the device have the same beneficial effects as the testing method.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required in the prior art and the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart of a method for testing a server soft shutdown according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a test system for server soft shutdown according to an embodiment of the present invention.
Detailed Description
The core of the invention is to provide a method, a system and a device for testing the soft shutdown of the server, which can automatically test the soft shutdown of the server and simultaneously test a plurality of servers at the same time, thereby shortening the testing time and improving the testing efficiency.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present 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.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for testing a server soft shutdown according to an embodiment of the present invention.
The method for testing the soft shutdown of the server comprises the following steps:
step S1: when the server is in a starting state, the state parameters of the server are set to the parameter values corresponding to the dormant state independently, so that the server enters the dormant state.
Specifically, when the server is tested in the soft-off mode, the server is ensured to be in the on state firstly, whether the server is in the on state can be judged by detecting the system state of the server, and if the server is in the on state, the soft-off test of the server can be carried out; if not, the soft-off test of the server cannot be carried out.
The process of testing the soft shutdown of the known server is that the server enters the dormant state and then exits the dormant state, and if the server can successfully complete the operation, the soft shutdown test of the server passes, so when the application performs the soft shutdown test of the server, the server is firstly made to enter the dormant state when the server is in the startup state, and the specific implementation mode is as follows: the method comprises the steps of setting a parameter setting function for automatically setting a state parameter of a server to a parameter value corresponding to a dormant state in advance, and when the server enters the dormant state, automatically calling the parameter setting function to automatically set the state parameter of the server to the parameter value corresponding to the dormant state, so that the server enters the dormant state.
Step S2: autonomously detecting whether an operating system IP of the server can ping or not, and if not, determining that the server successfully enters a dormant state; if yes, determining that the server fails to enter a dormant state.
Specifically, after the server successfully enters the sleep state, an operating system IP (Internet Protocol) of the server cannot be ping (a ping command can check whether a network is connected or not), so that the application autonomously detects whether the operating system IP of the server can be ping or not after the state parameter of the server is autonomously set to a parameter value corresponding to the sleep state, and if the ping is not possible, the server is determined to successfully enter the sleep state; if the server can be ping-on, the server is determined to fail to enter the dormant state, namely the soft-off test of the server fails.
Step S3: after determining that the server successfully enters the hibernation state, autonomously restoring the state parameters of the server to cause the server to exit the hibernation state.
Specifically, it is known that the soft-off test process of the server is that the server enters the sleep state and then exits the sleep state, and if the server can successfully complete the operation, the soft-off test of the server passes, so that the application makes the server exit the sleep state after determining that the server successfully enters the sleep state, and the specific implementation manner is as follows: and autonomously restoring the state parameter of the server by using the out-of-band instruction to restore the state of the server from the dormant state to the non-dormant state, so that the server exits the dormant state.
Step S4: autonomously detecting whether the IP of the operating system can be ping-connected, and if so, determining that the server successfully exits the dormant state; if not, determining that the server fails to exit the dormant state so as to determine the passing condition of the server soft-off test according to the dormant condition of the server.
Specifically, after the server successfully exits from the sleep state and enters the non-sleep state, the operating system IP of the server can be ping-enabled, so that the operating system IP of the server is autonomously detected whether ping-enabled or not after the state parameters of the server are autonomously restored, and if ping-enabled, the server is determined to successfully exit from the sleep state; if the ping connection is not available, the server is determined to fail to exit the sleep state, namely the soft-off test of the server fails.
In addition, in the process of the server soft-off test, the system log can correspondingly record the test process and the test result for the testers to check.
The invention provides a method for testing the soft shutdown of a server, which can lead the server to enter or exit from a dormant state independently in a mode of setting state parameters of the server, and can judge whether the server successfully enters or exits from the dormant state independently in a mode of an operating system IP of a ping server, thereby determining the passing condition of the soft shutdown test of the server according to the dormant condition of the server. Therefore, the method and the device can automatically perform the soft-off test of the server, and can simultaneously test a plurality of servers at the same time, thereby shortening the test time and improving the test efficiency.
On the basis of the above-described embodiment:
as an optional embodiment, after autonomously setting the state parameter of the server to the parameter value corresponding to the hibernation state, before autonomously detecting whether the operating system IP of the server can ping, the testing method further includes:
autonomously detecting whether a server is in a starting state or not;
if yes, executing a step of autonomously detecting whether the IP of the operating system of the server can ping;
if not, the step of autonomously detecting whether the operating system IP of the server can ping communication is not executed, and the failure of the soft-off test of the server is directly determined.
Further, considering that the server is required to be in the power-on state in the whole soft-off test process of the server, the present application not only detects whether the server is in the power-on state before the state parameter of the server is autonomously set to the parameter value corresponding to the hibernation state, but also detects whether the server is in the power-on state again after the state parameter of the server is autonomously set to the parameter value corresponding to the hibernation state, so as to secondarily confirm that the server is in the power-on state in the soft-off test process of the server.
If the result of the secondary confirmation is that the server is in a starting state, entering a subsequent detection step, namely executing a step of autonomously detecting whether the IP of the operating system of the server can be ping-connected; if the result of the secondary confirmation is that the server is not in the power-on state, the subsequent detection step is not entered, namely, the step of autonomously detecting whether the operating system IP of the server can ping communication is not executed, and the condition that the soft-off test of the server fails is directly determined.
As an optional embodiment, before autonomously setting the state parameter of the server to the parameter value corresponding to the hibernation state, the testing method further includes:
autonomously detecting whether the current test environment of the server meets the soft-off test requirement of the server;
if yes, executing a step of autonomously setting the state parameters of the server to the parameter values corresponding to the dormant state;
if not, the step of autonomously setting the state parameters of the server to the parameter values corresponding to the dormant state is not executed.
Further, considering that the accuracy of the test result can only be ensured when the server is subjected to the soft-shutdown test under the condition that the test environment of the server meets the soft-shutdown test requirement of the server, the application also autonomously detects whether the current test environment of the server meets the soft-shutdown test requirement of the server before the server is subjected to the soft-shutdown test, namely before the state parameter of the server is autonomously set to be a parameter value corresponding to the dormant state, and enters the soft-shutdown test of the server only when the current test environment of the server meets the soft-shutdown test requirement of the server, namely executes the step of autonomously setting the state parameter of the server to be the parameter value corresponding to the dormant state; otherwise, the server is abandoned to enter the soft-off test, namely, the step of autonomously setting the state parameters of the server to the parameter values corresponding to the dormant state is not executed, so that the accuracy of the test result is ensured.
In addition, the method and the device can restore factory settings of the server before the server is subjected to the soft-off test, so that the server is subjected to the soft-off test without interference, and the accuracy of the test result is further improved.
As an alternative embodiment, the process of autonomously detecting whether the current test environment of the server meets the soft-off test requirement of the server includes:
autonomously detecting whether a substrate management controller IP and an operating system IP of a server can ping;
if both the server and the server can be ping-connected, determining that the current test environment of the server meets the soft-off test requirement of the server;
otherwise, determining that the current testing environment of the server does not meet the soft-off testing requirement of the server.
Specifically, considering that the server soft-off test requirements mainly include that both the substrate management controller IP and the operating system IP of the server can be ping-connected, before the server is subjected to the soft-off test, whether the substrate management controller IP and the operating system IP can be ping-connected or not is autonomously detected, and if both the substrate management controller IP and the operating system IP can be ping-connected, the current test environment of the server is determined to meet the server soft-off test requirements, and then the server can be subjected to the soft-off test; if one or both of the two can not ping, determining that the current test environment of the server does not meet the requirements of the server soft-off test, namely giving up the soft-off test for entering the server.
As an optional embodiment, before determining that the current test environment of the server does not meet the server soft-off test requirement, the test method further includes:
when the substrate management controller IP is not ping-on and the operating system IP is ping-on, circularly detecting whether the substrate management controller IP can ping-on or not within preset time;
if yes, determining that the current test environment of the server meets the soft-off test requirement of the server;
if not, executing the step of determining that the current testing environment of the server does not meet the soft-off testing requirement of the server.
It should be noted that the preset of the present application is set in advance, and only needs to be set once, and the reset is not needed unless the modification is needed according to the actual situation.
Specifically, there are three situations in which the current testing environment of the known server does not meet the requirements of the server soft-off test: the substrate management controller IP is not ping-on and the operating system IP is ping-on; the substrate management controller IP ping is connected and the operating system IP is not ping connected; the baseboard management controller IP is not ping-on and the operating system IP is not ping-on.
The embodiment improves the situation that the substrate management controller IP is not ping-on and the operating system IP is ping-on: currently, detecting whether a substrate management controller (IP) of a server can ping once, but the method considers that the condition that the IP of the substrate management controller can ping but ping fails possibly exists in the condition that the IP of the substrate management controller ping once can ping, so that the method circularly detects whether the IP of the substrate management controller can ping within a preset time when the IP of the substrate management controller cannot ping once, and if ping is available, the IP of the substrate management controller can ping originally, determining that the current test environment of the server meets the requirement of soft shutdown test of the server, and entering the soft shutdown test of the server; and if the ping is not available, which indicates that the IP of the substrate management controller cannot ping originally, determining that the current testing environment of the server does not meet the requirement of the soft-off test of the server, and giving up the soft-off test of the server.
As an optional embodiment, after the board management controller IP has not ping for a preset time, the test method further includes:
restarting the substrate management controller, reconfiguring a static IP for the substrate management controller again, and then detecting whether the IP of the substrate management controller can ping;
if yes, finally determining that the current testing environment of the server meets the soft-off testing requirement of the server;
if not, finally determining that the current testing environment of the server does not meet the soft-off testing requirement of the server.
Further, according to the application, after the IP of the substrate management controller is not ping-on within the preset time, repair can be attempted, that is, the substrate management controller is restarted (specifically, the substrate management controller can be restarted when the IP of the substrate management controller is not changed, if the IP of the substrate management controller is changed, the step of re-configuring the static IP for the substrate management controller can be directly entered), the static IP of the substrate management controller is obtained from the configuration table, so as to re-configure the static IP for the substrate management controller, then whether the IP of the substrate management controller can ping-on is re-detected, if the IP can ping-on, it is finally determined that the current test environment of the server meets the requirements of the soft shutdown test of the server, and the soft shutdown test of the server can be entered; if the server cannot be ping-connected, the current testing environment of the server is finally determined not to meet the requirements of the server soft-off test, and the server is abandoned to enter the soft-off test.
As an optional embodiment, before determining that the current test environment of the server does not meet the server soft-off test requirement, the test method further includes:
when the substrate management controller IP pings and the operating system IP does not ping, acquiring the state of the operating system;
when the operating system is in a starting state, circularly detecting whether the operating system IP can ping in a preset time;
if yes, determining that the current test environment of the server meets the soft-off test requirement of the server;
if not, executing the step of determining that the current testing environment of the server does not meet the soft-off testing requirement of the server;
and when the operating system is in a power-off state, executing power-on operation, and returning to execute the step of circularly detecting whether the operating system IP can ping in the preset time.
Specifically, the present embodiment improves the case where the substrate management controller IP ping is on and the operating system IP is not ping (similarly, the above embodiment improves the case where the substrate management controller IP is not ping and the operating system IP ping is on): the method comprises the steps that whether an operating system IP of a server can be ping-connected or not is detected at present, but the condition that the operating system IP can be ping-connected but ping fails is considered in the application, so that the accuracy of detecting whether the operating system IP of the server can be ping-connected or not is improved, when the operating system IP is not ping-connected at one time, whether the operating system IP can be ping-connected or not is detected circularly within a preset time, if ping-connected is possible, the operating system IP can be ping-connected, the current testing environment of the server is determined to meet the requirement of the server soft shutdown testing, and the server can be subjected to the soft shutdown testing; if the ping connection is not available, which indicates that the operating system IP cannot ping connection originally, the current testing environment of the server is determined not to meet the requirement of the server soft-off test, and the server soft-off test is abandoned.
It should be noted that, the situation that the baseboard management controller IP is not ping-connected and the operating system IP is not ping-connected rarely occurs, so in this situation, the present application directly considers that the current test environment of the server does not meet the server soft-off test requirement.
As an optional embodiment, after the operating system IP is not ping for a preset time, the test method further includes:
the method comprises the steps that after a basic input and output system of a server is restored and initialized, restarting operation is executed, and then whether an operating system IP can ping or not is detected again;
if yes, finally determining that the current test environment of the server meets the soft-off test requirement of the server;
if not, finally determining that the current testing environment of the server does not meet the soft-off testing requirement of the server.
Furthermore, after the operating system IP is not ping-connected within the preset time, the method can also try to repair, namely, the basic input and output system of the server is initialized again and then the restarting operation is executed, and then whether the operating system IP can be ping-connected or not is detected again, if ping-connected, the current testing environment of the server is finally determined to meet the requirement of the server soft-off test, and the server soft-off test can be entered; if the ping connection is not possible, the current testing environment of the server is finally determined not to meet the requirement of the server soft-off test, and the server soft-off test is abandoned.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a test system for server soft shutdown according to an embodiment of the present invention.
The test system for the soft shutdown of the server comprises:
the autonomous dormancy module 1 is used for autonomously setting the state parameters of the server to the parameter values corresponding to the dormancy state when the server is in the starting state, so that the server enters the dormancy state;
the first detection module 2 is used for autonomously detecting whether the operating system IP of the server can ping, and if not, determining that the server successfully enters a dormant state; if so, determining that the server fails to enter a dormant state;
the dormancy exit module 3 is used for autonomously recovering the state parameters of the server after determining that the server successfully enters the dormancy state, so that the server exits the dormancy state;
the second detection module 4 is used for autonomously detecting whether the operating system IP can ping, and if so, determining that the server successfully exits the sleep state; if not, determining that the server fails to exit the dormant state so as to determine the passing condition of the server soft-off test according to the dormant condition of the server.
For introduction of the test system provided by the present invention, please refer to the above-mentioned embodiment of the test method, and the present invention is not repeated herein.
The invention also provides a testing device for the soft shutdown of the server, which comprises the following components:
a memory for executing a computer program;
and the processor is used for realizing the steps of any one of the server soft-off testing methods when executing the computer program.
For the introduction of the testing apparatus provided by the present invention, please refer to the above-mentioned embodiment of the testing method, and the present invention is not repeated herein.
It is further noted that, in the present specification, relational terms such as first and second, and the like are 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 an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. A method for testing soft shutdown of a server is characterized by comprising the following steps:
when a server is in a starting state, autonomously setting a state parameter of the server to a parameter value corresponding to a dormant state so as to enable the server to enter the dormant state;
autonomously detecting whether an operating system IP of the server can be ping-connected or not, and if not, determining that the server successfully enters a dormant state; if so, determining that the server fails to enter a dormant state;
autonomously restoring state parameters of the server to cause the server to exit the hibernation state after determining that the server successfully entered the hibernation state;
autonomously detecting whether the IP of the operating system can ping or not, and if so, determining that the server successfully exits from the sleep state; if not, determining that the server fails to exit the dormant state so as to determine the passing condition of the soft shutdown test of the server according to the dormant condition of the server;
before autonomously setting the state parameter of the server to the parameter value corresponding to the sleep state, the testing method further includes:
autonomously detecting whether the current test environment of the server meets the soft-off test requirement of the server;
if yes, executing the step of autonomously setting the state parameters of the server to the parameter values corresponding to the dormant state;
if not, the step of autonomously setting the state parameters of the server to the parameter values corresponding to the dormant state is not executed.
2. The method for testing soft shutdown of a server according to claim 1, wherein after autonomously setting the state parameter of the server to the parameter value corresponding to the hibernation state, before autonomously detecting whether the operating system IP of the server can ping, the method further comprises:
autonomously detecting whether the server is in a starting state or not;
if yes, executing the step of autonomously detecting whether the operating system IP of the server can ping;
if not, the step of autonomously detecting whether the operating system IP of the server can ping communication is not executed, and the failure of the soft-off test of the server is directly determined.
3. The method for testing server soft-off according to claim 1, wherein the process of autonomously detecting whether the current testing environment of the server meets the server soft-off testing requirements comprises:
autonomously detecting whether a baseboard management controller (IP) and an operating system (IP) of the server can ping;
if both the server and the server can be ping-connected, determining that the current test environment of the server meets the soft-off test requirement of the server;
otherwise, determining that the current testing environment of the server does not meet the soft-off testing requirement of the server.
4. The method for testing server soft-off as recited in claim 3, wherein prior to determining that the current testing environment of the server does not meet server soft-off testing requirements, the method further comprises:
when the substrate management controller IP is not ping-on and the operating system IP is ping-on, circularly detecting whether the substrate management controller IP can ping-on or not within preset time;
if yes, determining that the current testing environment of the server meets the soft-off testing requirement of the server;
if not, executing the step of determining that the current testing environment of the server does not meet the soft-off testing requirement of the server.
5. The method for testing server soft shutdown according to claim 4, wherein after the baseboard management controller (IP) is not ping for a preset time, the method further comprises:
restarting a substrate management controller, reconfiguring a static IP for the substrate management controller again, and then detecting whether the IP of the substrate management controller can be ping-connected or not again;
if yes, finally determining that the current testing environment of the server meets the soft-off testing requirement of the server;
if not, finally determining that the current testing environment of the server does not meet the requirements of the server soft-off testing.
6. The method for testing server soft shutdown as claimed in claim 3, wherein before determining that the current testing environment of the server does not meet the server soft shutdown testing requirements, the method further comprises:
when the substrate management controller IP is ping-on and the operating system IP is not ping-on, acquiring the state of the operating system;
when the operating system is in a starting state, circularly detecting whether the operating system IP can ping in a preset time;
if yes, determining that the current testing environment of the server meets the soft-off testing requirement of the server;
if not, executing the step of determining that the current testing environment of the server does not meet the soft-off testing requirement of the server;
and when the operating system is in a power-off state, executing a power-on operation, and returning to execute the step of circularly detecting whether the operating system IP can ping in the preset time.
7. The method for testing soft shutdown of a server according to claim 6, wherein after the operating system IP has not ping for a preset time, the method further comprises:
after the basic input and output system of the server is restored and initialized, restarting operation is executed, and then whether the IP of the operating system can ping or not is re-detected;
if yes, finally determining that the current testing environment of the server meets the soft-off testing requirement of the server;
if not, finally determining that the current testing environment of the server does not meet the requirements of the server soft-off testing.
8. A system for testing soft shutdown of a server, comprising:
the automatic dormancy module is used for autonomously setting the state parameters of the server to the parameter values corresponding to the dormancy state when the server is in the starting state so as to enable the server to enter the dormancy state;
the first detection module is used for autonomously detecting whether the IP of the operating system of the server can be ping-connected or not, and if not, determining that the server successfully enters a dormant state; if so, determining that the server fails to enter a dormant state;
the server management module is used for determining whether the server successfully enters the sleep state or not, and if so, automatically recovering the state parameters of the server to enable the server to exit the sleep state;
the second detection module is used for autonomously detecting whether the IP of the operating system can ping, and if so, determining that the server successfully exits the sleep state; if not, determining that the server fails to exit the dormant state so as to determine the passing condition of the server soft-off test according to the dormant condition of the server;
before the state parameter of the server is autonomously set to the parameter value corresponding to the hibernation state, the test system for the soft shutdown of the server is further configured to:
autonomously detecting whether the current test environment of the server meets the soft-off test requirement of the server;
if so, executing the step of autonomously setting the state parameters of the server to the parameter values corresponding to the dormant state;
if not, the step of autonomously setting the state parameters of the server to the parameter values corresponding to the dormant state is not executed.
9. A testing device for soft shutdown of a server is characterized by comprising:
a memory for executing a computer program;
a processor for implementing the steps of the method for testing soft-off of a server as claimed in any one of claims 1 to 7 when executing said computer program.
CN201910926631.9A 2019-09-27 2019-09-27 Method, system and device for testing soft shutdown of server Active CN110795293B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910926631.9A CN110795293B (en) 2019-09-27 2019-09-27 Method, system and device for testing soft shutdown of server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910926631.9A CN110795293B (en) 2019-09-27 2019-09-27 Method, system and device for testing soft shutdown of server

Publications (2)

Publication Number Publication Date
CN110795293A CN110795293A (en) 2020-02-14
CN110795293B true CN110795293B (en) 2022-07-15

Family

ID=69438635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910926631.9A Active CN110795293B (en) 2019-09-27 2019-09-27 Method, system and device for testing soft shutdown of server

Country Status (1)

Country Link
CN (1) CN110795293B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117348713A (en) * 2022-06-28 2024-01-05 中兴通讯股份有限公司 Shutdown control method, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662370A (en) * 2008-08-26 2010-03-03 华为技术有限公司 Dormancy/wakening method for server and server with dormancy/wakening function
CN101730120A (en) * 2009-11-20 2010-06-09 中兴通讯股份有限公司 Reactivation testing method and device
CN105915637A (en) * 2016-06-07 2016-08-31 厦门纳网科技股份有限公司 Remote automatic standby and awakening method based on storage system server
CN106452956A (en) * 2016-09-30 2017-02-22 深圳市吉祥腾达科技有限公司 Power modem sleep wake-up test system and test method
CN107728954A (en) * 2017-11-06 2018-02-23 郑州云海信息技术有限公司 A kind of control method, device and the equipment of disk running status

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662370A (en) * 2008-08-26 2010-03-03 华为技术有限公司 Dormancy/wakening method for server and server with dormancy/wakening function
CN101730120A (en) * 2009-11-20 2010-06-09 中兴通讯股份有限公司 Reactivation testing method and device
CN105915637A (en) * 2016-06-07 2016-08-31 厦门纳网科技股份有限公司 Remote automatic standby and awakening method based on storage system server
CN106452956A (en) * 2016-09-30 2017-02-22 深圳市吉祥腾达科技有限公司 Power modem sleep wake-up test system and test method
CN107728954A (en) * 2017-11-06 2018-02-23 郑州云海信息技术有限公司 A kind of control method, device and the equipment of disk running status

Also Published As

Publication number Publication date
CN110795293A (en) 2020-02-14

Similar Documents

Publication Publication Date Title
CN108038019B (en) Automatic fault recovery method and system for substrate management controller
CN107171833B (en) Method for realizing batch upgrading of BMC and BIOS of server through BMC
US8578182B2 (en) Power lock-up setting method performed by baseboard management controller and electronic apparatus using the same
CN112463222A (en) Data interaction method, device and equipment between server BIOS and BMC
CN111352779A (en) On-off test method of AC power supply of MOC card and related assembly
CN111338698A (en) Method and system for accurately booting server by BIOS (basic input output System)
CN110795293B (en) Method, system and device for testing soft shutdown of server
CN111966559A (en) Fault recovery method and device, electronic equipment and storage medium
CN111367743A (en) Method and system for diagnosing power failure of server in cycle restart test process
CN108897646B (en) Switching method of BIOS (basic input output System) chips and substrate management controller
CN113672306B (en) Server component self-checking abnormity recovery method, device, system and medium
CN102467427A (en) Method for entering basic output and input system setting
CN107870840B (en) IPMI-based server multi-test instruction automatic execution method
CN107168819B (en) Method and device for restarting operating system
CN114640709A (en) Edge node processing method, device and medium
CN112380083B (en) Method and system for testing master-slave switching stability of BMC (baseboard management controller)
CN112732486B (en) Redundant firmware switching method, device, equipment and storage medium
CN111752773B (en) Method and device for realizing power-on self-check verification of clustered system
CN114978973B (en) Communication interface testing method and device, testing machine and storage medium
CN108205480B (en) Abnormity processing method and device, intelligent rearview mirror and storage medium
TWI715005B (en) Monitor method for demand of a bmc
CN114253801A (en) Method for actively isolating fault peripheral in out-of-band mode
CN109412891B (en) Method and device for detecting client state
CN115129517A (en) BIOS option fault recovery method, device, equipment and storage medium
CN115658407A (en) Memory bank testing method, system, device, equipment and storage 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
GR01 Patent grant
GR01 Patent grant