CN113626270A - Server switch testing method, system and device, storage medium and starting device - Google Patents

Server switch testing method, system and device, storage medium and starting device Download PDF

Info

Publication number
CN113626270A
CN113626270A CN202110942577.4A CN202110942577A CN113626270A CN 113626270 A CN113626270 A CN 113626270A CN 202110942577 A CN202110942577 A CN 202110942577A CN 113626270 A CN113626270 A CN 113626270A
Authority
CN
China
Prior art keywords
server
tested
starting
shutdown
reached
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
CN202110942577.4A
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.)
Inspur Power Commercial Systems Co Ltd
Original Assignee
Inspur Power Commercial Systems 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 Inspur Power Commercial Systems Co Ltd filed Critical Inspur Power Commercial Systems Co Ltd
Priority to CN202110942577.4A priority Critical patent/CN113626270A/en
Publication of CN113626270A publication Critical patent/CN113626270A/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/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3612Software analysis for verifying properties of programs by runtime analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The application discloses a server switch testing method, a system, a device, a computer readable storage medium and a starting device, comprising: the method comprises the steps that a shutdown script pre-installed on a server to be tested is used for closing the server to be tested at regular time until the preset test times are reached; and the startup device connected with the server to be tested outputs a startup signal of the startup key to the server to be tested, and the server to be tested is started regularly until the test times are reached. According to the method and the device, the shutdown operation of the server to be tested is automatically completed by utilizing the shutdown script, the startup operation of the server to be tested is automatically completed by utilizing the external device through simulating the startup signal of the startup key, reasonable timing execution time is set for the shutdown script and the startup device respectively, the whole test process can be automatically completed, and the test efficiency is improved.

Description

Server switch testing method, system and device, storage medium and starting device
Technical Field
The invention relates to the field of automatic testing, in particular to a server switch testing method, a system and a device, a computer readable storage medium and a starting device.
Background
In the process of the on-off of the server, the mainboard and each part of the server can be subjected to power-on initialization and power-off processes, and some stability problems of the server, such as memory loss, network card unidentification and the like, can be exposed in the process, so that a large number of long-time on-off tests can be carried out in the research and development tests of the server, namely, the problems can be exposed and solved in the research and development processes, and the problems in the use of customers are avoided. However, the long-time on-off test of a large number of servers is troublesome to actually execute, because the power-off can be automatically executed under the OS through the script, but the power-on can only be manually executed through the power-on key of the server or remotely controlled through the BMC, a small amount of on-off test in a short time can be manually executed, and a large number of tests in a long time cannot be operated.
Therefore, how to conveniently and quickly perform the startup operation after the server is shut down is a difficult problem for testers.
Disclosure of Invention
In view of the above, the present invention provides a method, a system, and a device for testing a server switch, a computer readable storage medium, and a boot device, so as to improve testing efficiency. The specific scheme is as follows:
a server switch testing method comprises the following steps:
utilizing a shutdown script pre-installed on a server to be tested to regularly close the server to be tested until a preset test frequency is reached;
and outputting a starting signal of a starting key to the server to be tested by using a starting device connected with the server to be tested, and starting the server to be tested at regular time until the test times are reached.
Optionally, the process of starting the server to be tested at regular time by outputting a power-on signal of a power-on key to the server to be tested by using a power-on device connected to the server to be tested includes:
after the server to be tested is started, recording the starting time point of the server to be tested;
recording the shutdown time point of the shutdown script for closing the server to be tested;
obtaining delayed opening time by using the opening time point and the shutdown time point;
and starting the server to be tested at intervals of the delayed starting time until the testing times are reached by outputting a starting signal of a starting key to the server to be tested by using a starting device connected with the server to be tested.
Optionally, the process of regularly closing the server to be tested by using the shutdown script pre-installed on the server to be tested until the preset test times is reached includes:
after the server to be tested is started, running the shutdown script in the OS;
the shutdown script stores the memory data to the hard disk after waiting for the preset service waiting time;
and closing the server to be tested until the testing times are reached.
The invention also discloses a server switch test system, which comprises:
the shutdown test module is used for utilizing a shutdown script pre-installed on a server to be tested to periodically shut down the server to be tested until the preset test times are reached;
and the starting test module is used for outputting a starting signal of a starting key to the server to be tested by utilizing a starting device connected with the server to be tested and starting the server to be tested at regular time until the test times are reached.
Optionally, the starting test module includes:
the starting time recording unit is used for recording the starting time point of the server to be tested after the server to be tested is started;
the shutdown time recording unit is used for recording a shutdown time point when the shutdown script closes the server to be tested;
the delay time calculation unit is used for obtaining delay starting time by utilizing the starting time point and the shutdown time point;
and starting the server to be tested at intervals of the delayed starting time until the testing times are reached by outputting a starting signal of a starting key to the server to be tested by using a starting device connected with the server to be tested.
Optionally, the shutdown test module includes:
the script running unit is used for running the shutdown script in the OS after the server to be tested is started;
the data storage unit is used for storing the memory data to the hard disk after the shutdown script waits for the preset service waiting time;
and the closing unit is used for closing the server to be tested until the test times are reached.
The invention also discloses a starting device, comprising: the server switch testing system comprises a display, a singlechip for executing the server switch testing method, a pin header, a key and a switch;
the pin header is respectively connected with a startup and shutdown key interface of the server to be tested and the singlechip;
the display is used for displaying the test times and the delayed opening time;
the pin header is used for transmitting the signal output by the singlechip to the on-off key interface;
and the key is used for inputting the test times and the delayed opening time.
The invention also discloses a server switch testing device, which comprises:
a memory for storing a computer program;
a processor for executing the computer program to implement the server switch testing method as described above.
The invention also discloses a computer readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the server switch testing method as described above.
The invention discloses a server switch testing method, which comprises the following steps: the method comprises the steps that a shutdown script pre-installed on a server to be tested is used for closing the server to be tested at regular time until the preset test times are reached; and the startup device connected with the server to be tested outputs a startup signal of the startup key to the server to be tested, and the server to be tested is started regularly until the test times are reached.
The invention automatically completes the shutdown operation of the server to be tested by utilizing the shutdown script, automatically completes the startup operation of the server to be tested by utilizing the external device through simulating the startup signal of the startup key, and respectively sets reasonable timing execution time for the shutdown script and the startup device, thereby ensuring that the whole test process can be automatically completed and improving the test efficiency.
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 schematic flow chart of a server switch testing method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of another server switch testing method disclosed in the embodiment of the present invention;
fig. 3 is a schematic structural diagram of a server switch testing system according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a boot device according to an embodiment of the present invention.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a server switch testing method, which is shown in figure 1 and comprises the following steps:
s11: and closing the server to be tested at regular time by using a shutdown script pre-installed on the server to be tested until the preset test times are reached.
Specifically, the automatic shutdown script is installed on the server to be tested, the shutdown script can be directly operated after the server to be tested is started, automatic timing can be achieved after the shutdown script is operated, the shutdown program can be executed after each preset time, so that the server to be tested is shut down, meanwhile, the test times are set in the shutdown script, the test times can be reduced after each shutdown, and after the next startup of the server to be tested is reserved, the server to be tested can repeatedly operate the shutdown script until the preset test times are reached.
The timing closing is set to ensure that the server to be tested can complete the complete starting process each time, and enough time is reserved for the server to be tested to complete the starting.
S12: and the startup device connected with the server to be tested outputs a startup signal of the startup key to the server to be tested, and the server to be tested is started regularly until the test times are reached.
Specifically, after the server to be tested is closed, the server to be tested cannot be started by itself through internal software of the server to be tested, and therefore a starting device connected with the server to be tested outputs a starting signal of a starting key to the server to be tested so as to start the server to be tested.
Specifically, the timing start of the start-up device needs to reserve time for starting up the server to be tested, and the server to be tested needs to be ensured to complete the start-up and shutdown processes during the countdown period, so that the server to be tested can be automatically started after the countdown is finished.
It should be noted that, in the test process of the embodiment of the present invention, the server to be tested is not powered off, and the server to be tested is always connected to the power supply.
Therefore, the embodiment of the invention automatically completes the shutdown operation of the server to be tested by utilizing the shutdown script, automatically completes the startup operation of the server to be tested by utilizing the external device through simulating the startup signal of the startup key, and respectively sets reasonable timing execution time for the shutdown script and the startup device, thereby ensuring that the whole test process can be automatically completed and improving the test efficiency.
The embodiment of the invention discloses a specific server switch testing method, and compared with the previous embodiment, the technical scheme is further explained and optimized in the embodiment. Referring to fig. 2, specifically:
s21: after a server to be tested is started, a shutdown script in an OS (operating system) is operated;
s22: and the shutdown script stores the memory data to the hard disk after waiting for the preset service waiting time.
Specifically, the service waiting time should be longer than the time required for starting the server to be tested, so as to ensure that the server to be tested can complete starting, and after the server to be tested is started, in order to avoid data loss of the server to be tested, the memory data is stored in the hard disk for permanent storage.
S23: closing the server to be tested until the test times are reached;
s24: after a server to be tested is started, recording the starting time point of the server to be tested;
s25: recording a shutdown time point when the shutdown script closes the server to be tested;
s26: and obtaining the delayed opening time by using the opening time point and the shutdown time point.
Specifically, the starting time point of the server to be tested and the shutdown time point of the server to be tested are recorded, so that the total time from starting to shutdown of the server to be tested, namely the delayed starting time, can be determined, the server to be tested can be ensured to be shutdown after the delayed starting time is waited, and the server to be tested can be started at the moment.
It is understood that the setting processes of S24 to S26 for the delayed turn-on time of the power-on device can be generated by measurement in advance and not measured again after being obtained once.
S27: and starting the server to be tested at intervals of delayed starting time until the testing times are reached by outputting a starting signal of a starting key to the server to be tested by using a starting device connected with the server to be tested.
Correspondingly, the embodiment of the present invention further discloses a server switch testing system, as shown in fig. 3, the system includes:
the shutdown test module 11 is used for utilizing a shutdown script pre-installed on the server to be tested to periodically shutdown the server to be tested until a preset test frequency is reached;
and the starting test module 12 is used for outputting a starting signal of the starting key to the server to be tested by using a starting device connected with the server to be tested, and starting the server to be tested at regular time until the test times are reached.
Therefore, the embodiment of the invention automatically completes the shutdown operation of the server to be tested by utilizing the shutdown script, automatically completes the startup operation of the server to be tested by utilizing the external device through simulating the startup signal of the startup key, and respectively sets reasonable timing execution time for the shutdown script and the startup device, thereby ensuring that the whole test process can be automatically completed and improving the test efficiency.
Specifically, the start-up test module 12 includes:
the starting time recording unit is used for recording the starting time point of the server to be tested after the server to be tested is started;
the shutdown time recording unit is used for recording a shutdown time point of the shutdown script for closing the server to be tested;
the delay time calculation unit is used for obtaining delay starting time by utilizing the starting time point and the shutdown time point;
and starting the server to be tested at intervals of delayed starting time until the testing times are reached by outputting a starting signal of a starting key to the server to be tested by using a starting device connected with the server to be tested.
Specifically, the shutdown test module 11 includes:
the script running unit is used for running a shutdown script in the OS after the server to be tested is started;
the data storage unit is used for storing the memory data to the hard disk after the shutdown script waits for the preset service waiting time;
and the closing unit is used for closing the server to be tested until the test times are reached.
The embodiment of the invention also discloses a starting device, which comprises: the server switch testing system comprises a display 1, a singlechip 2 for executing the server switch testing method, a pin header 3, a key 4 and a switch 5;
the pin header 3 is respectively connected with a startup and shutdown key interface of the server to be tested and the singlechip 2;
a display 1 for displaying the number of tests and the delay opening time;
the pin header 3 is used for transmitting the signal output by the singlechip to a startup and shutdown key interface;
a key 4 for inputting the number of tests and the delay opening time;
and the switch 5 is used for switching on and off the starting device.
Therefore, the embodiment of the invention utilizes the starting device to automatically complete the starting operation of the server to be tested by simulating the starting signal of the starting button, and sets reasonable timing execution time to ensure that the whole testing process can be automatically completed, thereby improving the testing efficiency.
In addition, the embodiment of the invention also discloses a server switch testing device, which comprises:
a memory for storing a computer program;
a processor for executing a computer program to implement the server switch testing method as described above.
In addition, the embodiment of the invention also discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program is executed by a processor to realize the server switch testing method.
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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
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.
The technical content provided by the present invention is described in detail above, and the principle and the implementation of the present invention are explained in this document by applying specific examples, and the above description of the examples is only used to help understanding the method of the present invention and the core idea thereof; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (9)

1. A server switch testing method is characterized by comprising the following steps:
utilizing a shutdown script pre-installed on a server to be tested to regularly close the server to be tested until a preset test frequency is reached;
and outputting a starting signal of a starting key to the server to be tested by using a starting device connected with the server to be tested, and starting the server to be tested at regular time until the test times are reached.
2. The method for testing the server switch according to claim 1, wherein the step of starting the server to be tested for the number of times at regular time by outputting a power-on signal of a power-on key to the server to be tested by using a power-on device connected to the server to be tested comprises:
after the server to be tested is started, recording the starting time point of the server to be tested;
recording the shutdown time point of the shutdown script for closing the server to be tested;
obtaining delayed opening time by using the opening time point and the shutdown time point;
and starting the server to be tested at intervals of the delayed starting time until the testing times are reached by outputting a starting signal of a starting key to the server to be tested by using a starting device connected with the server to be tested.
3. The server switch testing method according to claim 2, wherein the process of periodically shutting down the server to be tested until a preset number of tests is reached by using a shutdown script pre-installed on the server to be tested comprises:
after the server to be tested is started, running the shutdown script in the OS;
the shutdown script stores the memory data to the hard disk after waiting for the preset service waiting time;
and closing the server to be tested until the testing times are reached.
4. A server switch test system, comprising:
the shutdown test module is used for utilizing a shutdown script pre-installed on a server to be tested to periodically shut down the server to be tested until the preset test times are reached;
and the starting test module is used for outputting a starting signal of a starting key to the server to be tested by utilizing a starting device connected with the server to be tested and starting the server to be tested at regular time until the test times are reached.
5. The server switch test system of claim 4, wherein the start test module comprises:
the starting time recording unit is used for recording the starting time point of the server to be tested after the server to be tested is started;
the shutdown time recording unit is used for recording a shutdown time point when the shutdown script closes the server to be tested;
the delay time calculation unit is used for obtaining delay starting time by utilizing the starting time point and the shutdown time point;
and starting the server to be tested at intervals of the delayed starting time until the testing times are reached by outputting a starting signal of a starting key to the server to be tested by using a starting device connected with the server to be tested.
6. The server switch test system of claim 5, wherein the shutdown test module comprises:
the script running unit is used for running the shutdown script in the OS after the server to be tested is started;
the data storage unit is used for storing the memory data to the hard disk after the shutdown script waits for the preset service waiting time;
and the closing unit is used for closing the server to be tested until the test times are reached.
7. A boot device, comprising: a display, a single chip microcomputer for executing the server switch testing method according to any one of claims 1 to 3, a pin header, a key and a switch;
the pin header is respectively connected with a startup and shutdown key interface of the server to be tested and the singlechip;
the display is used for displaying the test times and the delayed opening time;
the pin header is used for transmitting the signal output by the singlechip to the on-off key interface;
and the key is used for inputting the test times and the delayed opening time.
8. A server switch testing device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the server switch testing method of any one of claims 1 to 3.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, implements the server switch testing method according to any one of claims 1 to 3.
CN202110942577.4A 2021-08-17 2021-08-17 Server switch testing method, system and device, storage medium and starting device Pending CN113626270A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110942577.4A CN113626270A (en) 2021-08-17 2021-08-17 Server switch testing method, system and device, storage medium and starting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110942577.4A CN113626270A (en) 2021-08-17 2021-08-17 Server switch testing method, system and device, storage medium and starting device

Publications (1)

Publication Number Publication Date
CN113626270A true CN113626270A (en) 2021-11-09

Family

ID=78386001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110942577.4A Pending CN113626270A (en) 2021-08-17 2021-08-17 Server switch testing method, system and device, storage medium and starting device

Country Status (1)

Country Link
CN (1) CN113626270A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1797356A (en) * 2004-12-29 2006-07-05 佛山市顺德区顺达电脑厂有限公司 Automatic test device and process method in use for computer device
CN103309776A (en) * 2012-03-16 2013-09-18 鸿富锦精密工业(深圳)有限公司 Automatic startup and shutdown test device and test system
CN103970630A (en) * 2014-05-23 2014-08-06 浪潮电子信息产业股份有限公司 Method for testing overall stability of server
CN109582519A (en) * 2018-12-06 2019-04-05 郑州云海信息技术有限公司 A kind of server GPU equipment powercycle stability test method
WO2021022721A1 (en) * 2019-08-08 2021-02-11 苏州浪潮智能科技有限公司 Cpld-based restart test method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1797356A (en) * 2004-12-29 2006-07-05 佛山市顺德区顺达电脑厂有限公司 Automatic test device and process method in use for computer device
CN103309776A (en) * 2012-03-16 2013-09-18 鸿富锦精密工业(深圳)有限公司 Automatic startup and shutdown test device and test system
CN103970630A (en) * 2014-05-23 2014-08-06 浪潮电子信息产业股份有限公司 Method for testing overall stability of server
CN109582519A (en) * 2018-12-06 2019-04-05 郑州云海信息技术有限公司 A kind of server GPU equipment powercycle stability test method
WO2021022721A1 (en) * 2019-08-08 2021-02-11 苏州浪潮智能科技有限公司 Cpld-based restart test method

Similar Documents

Publication Publication Date Title
CN108304326B (en) Automatic testing system and method for android intelligent terminal
CN109254783A (en) A kind of server system installation method, device, equipment and readable storage medium storing program for executing
WO2016115801A1 (en) Method and device for replaying user operation
CN109445994A (en) Starting processing method, device, terminal device and storage medium
CN108008962A (en) The collocation method and system of PXE server under a kind of linux system
CN112256505A (en) Server stability testing method and device and related components
CN106909479A (en) A kind of test device for computer opening/closing
CN101287264B (en) Method, system and control device for measuring standby/call current of mobile phone
CN113703792A (en) Firmware remote upgrade test method, device, server and medium
CN106055440A (en) Testing method and system for realizing abnormal power failure of server through BMC
CN102467427A (en) Method for entering basic output and input system setting
CN111176736B (en) Server mainboard power-on and power-off test method and system
CN103634668A (en) System upgrading method and device in smart television
CN107168714A (en) Method, mobile terminal and the storage device of system update
US20070118779A1 (en) Intelligent Test System and Related Method for Testing an Electronic Product
CN113626270A (en) Server switch testing method, system and device, storage medium and starting device
CN111475353B (en) Method and system for detecting NVDIMM memory of production line
CN109656761A (en) Server HT automatic test approach and system based on Linux system
CN117608674A (en) Operating system access method, device, equipment and storage medium
CN109086154B (en) Device and method for detecting countdown of BIOS watchdog function
CN113495817A (en) Power consumption testing method and device, server and storage medium
CN111128139A (en) Non-invasive voice test method and device
CN115437865A (en) Method, device, equipment and medium for testing abnormal power failure of hard disk
TW201222240A (en) Testing method for automatically rebooting a motherboard and recording related debug information and rebooting device thereof
CN111142954B (en) Startup control method and device and computer readable 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20211109