CN112463508B - Server dormancy state testing method, system, terminal and storage medium - Google Patents

Server dormancy state testing method, system, terminal and storage medium Download PDF

Info

Publication number
CN112463508B
CN112463508B CN202011266042.1A CN202011266042A CN112463508B CN 112463508 B CN112463508 B CN 112463508B CN 202011266042 A CN202011266042 A CN 202011266042A CN 112463508 B CN112463508 B CN 112463508B
Authority
CN
China
Prior art keywords
state
server
check
text
tested
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
CN202011266042.1A
Other languages
Chinese (zh)
Other versions
CN112463508A (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 CN202011266042.1A priority Critical patent/CN112463508B/en
Publication of CN112463508A publication Critical patent/CN112463508A/en
Application granted granted Critical
Publication of CN112463508B publication Critical patent/CN112463508B/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/26Functional testing

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method, a system, a terminal and a storage medium for testing a dormant state of a server, wherein the method comprises the following steps: creating a check text in an operating system of a server to be tested and opening the check text; circularly switching the dormant state and the awakening state of the server to be tested; writing preset check characters into the check text after the server to be tested enters the awakening state each time; and judging whether the number of the check characters of the check text is consistent with the cycle number, and if so, judging that the test is passed. The stability of the server in the dormant state is judged according to the physical characteristics of the server in the dormant state, so that the stability test accuracy of the server in the dormant state is improved.

Description

Server dormancy state testing method, system, terminal and storage medium
Technical Field
The invention relates to the technical field of server testing, in particular to a method, a system, a terminal and a storage medium for testing a server dormancy state.
Background
In server testing, in order to verify the stability of a server, stability testing operations in various states, such as cycle restart, cycle power down, and the like, are often required to be performed on the server. The sleeping state of the server is rarely tested, and because the phenomena of the sleeping state and the shutdown state are similar, the sleeping state and the shutdown state can be distinguished only by monitoring and judging through the BMC log, if S4 appears in the BMC log, the sleeping state of the machine is represented, and if S5 appears in the BMC log, the machine enters the shutdown state. However, in the process of testing S4 for a long time, the server is always tested in a loop according to the state of S4, and further determination and verification are required if the relevant device is powered off. Particularly, in the research and development test process, due to more problems of firmware bmc, bios and the like, log abnormity, inaccurate storage and the like may occur. Therefore, log false alarm occurs, and the shutdown S5 state false alarm is the log of S4 dormancy, which sometimes occurs. In order to improve the problem, the patent excavates a new judgment method from the aspect of the physical characteristics of S4 dormancy to judge whether the server has power failure S5 operation in the S4 dormancy cycle test.
The method for testing the stability of the server sleep state is realized by adopting a BMC log monitoring keyword S4, and by fishing the BMC log and combining the times set by testing, whether the times of S4 appearing in the BMC log are consistent or not is judged, and whether the result is pass or not is finally judged.
And judging whether the machine enters S4 dormancy according to the log, if the bmc has a problem, causing the problem when the log is extracted, and causing inaccurate judgment due to the fact that the machine enters S4 but the bmc does not record.
Disclosure of Invention
In view of the above-mentioned deficiencies of the prior art, the present invention provides a method, a system, a terminal and a storage medium for testing a server sleep state, so as to solve the above-mentioned technical problems.
In a first aspect, the present invention provides a method for testing a sleep state of a server, including:
creating a check text in an operating system of a server to be tested and opening the check text;
circularly switching the dormant state and the awakening state of the server to be tested;
writing preset check characters into the check text after the server to be tested enters the awakening state each time;
and judging whether the number of the check characters of the check text is consistent with the cycle number, and if so, judging that the test is passed.
Further, the circularly switching the sleep state and the wake state of the server to be tested includes:
setting cycle times, duration of a dormant state and duration of a wake-up state;
circularly switching the dormant state and the awakening state of the server to be tested according to the dormant state duration and the awakening state duration;
and recording the state switching times, and stopping the operation of switching the state of the server to be tested if the switching times reach the cycle times.
Further, writing preset check characters into the check text after the server to be tested enters the wake-up state each time, including:
after the server to be tested enters the awakening state, judging whether the check text is in an open state:
if yes, writing check characters in the check text;
if not, stopping the test and outputting a test failure prompt.
Further, writing preset check characters into the check text after the server to be tested enters the wake-up state each time, including:
and setting a single character as the check character.
In a second aspect, the present invention provides a server sleep state testing system, including:
the system comprises a text creating unit, a verification unit and a verification unit, wherein the text creating unit is configured to create a verification text in an operating system of a server to be tested and open the verification text;
the state switching unit is configured to circularly switch the dormant state and the awakening state of the server to be tested;
the character writing unit is configured to write preset check characters into the check text after the server to be tested enters the awakening state each time;
and the result judging unit is configured to judge whether the number of the check characters of the check text is consistent with the cycle number, and if so, the test is judged to be passed.
Further, the state switching unit includes:
the parameter setting module is configured for setting cycle times, sleeping state duration and awakening state duration;
the cyclic switching module is configured to cyclically switch the dormant state and the awakening state of the server to be tested according to the dormant state duration and the awakening state duration;
and the cycle stop module is configured to record state switching times, and stop the operation of switching the state of the server to be tested if the switching times reach the cycle times.
Further, the character writing unit includes:
the text checking module is configured to judge whether the checking text is in an open state or not after the server to be tested enters the awakening state;
the character writing module is configured to write a check character into the check text if the check text is in an open state;
and the failure output module is configured to stop the test and output a test failure prompt if the verification text is not in an open state.
Further, the character writing unit includes:
and the check setting module is configured to set a single character as the check character.
In a third aspect, a terminal is provided, which includes:
a processor, a memory, wherein,
the memory is used for storing a computer program which,
the processor is configured to call and run the computer program from the memory, so that the terminal performs the method of the terminal described above.
In a fourth aspect, a computer storage medium is provided, having stored therein instructions that, when executed on a computer, cause the computer to perform the method of the above aspects.
The beneficial effect of the invention is that,
according to the server sleep state testing method, system, terminal and storage medium provided by the invention, a text is established before the test is executed, and certain characters are written into the text through a script after S4 is awakened each time. And after a certain number of times of execution, stopping testing, checking whether the content of the text has character loss or not, and further judging whether the machine has an S4 missing state or not. The stability of the server in the dormant state is judged according to the physical characteristics of the server in the dormant state, so that the stability test accuracy of the server in the dormant state is improved.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the present invention.
FIG. 2 is another schematic flow diagram of a method of one embodiment of the invention.
FIG. 3 is a schematic block diagram of a system of one embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. 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, shall fall within the protection scope of the present invention.
The following explains key terms appearing in the present invention.
S5 (shutdown): in this state, all programs in the machine system stop running, and after the machine system is started again, the programs need to be opened again for running;
s4 (sleep): in this state, the hard disk protects the current state of the operating system, including all applications, open documents, etc., which means that the user can be restored to the original working state after resuming booting from S4.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention. The execution subject in fig. 1 may be a server sleep state testing system.
As shown in fig. 1, the method includes:
step 110, creating a check text in an operating system of a server to be tested and opening the check text;
step 120, circularly switching the dormant state and the awakening state of the server to be tested;
step 130, writing preset check characters into the check text after the server to be tested enters the awakening state each time;
and 140, judging whether the number of the check characters of the check text is consistent with the cycle number, and if so, judging that the test is passed.
Specifically, as shown in fig. 2, the method for testing the sleep state of the server includes:
1) And creating a blank text as a check text under the operating system of the server to be tested, and opening the text.
2) The duration time of the S4 state and the duration time of the awakening state are both set to be 60S in advance, and the cycle number is set to be 10. The server is first set to the S4 state.
3) And waiting for 60 seconds, switching the server from the S4 state to the awakening state, re-entering the OS, checking whether the text is in the open state or not, writing characters if the text is in the open state, for example, a, stopping exiting the test if the text is in the closed state, and testing fail.
4) After the wake-up state lasts 60S, the control server enters the S4 state again, waits 60 seconds later for wake-up, checks whether the text is in an open state or not, if the text is in an open state and writes characters, for example, a, if the text is in a closed state, stops exiting the test, and tests fail.
5) And (4) repeating the steps 2, 3 and 4 all the time, stopping testing after the set times (10 times) are executed, checking the content in the text, judging whether the content is consistent with the set times, if the content is consistent with the set times, judging whether 10 characters a exist in the text, and if the content is consistent with the set times, otherwise failing.
As shown in fig. 3, the system 300 includes:
a text creating unit 310 configured to create a check text in an operating system of a server to be tested and open the check text;
a state switching unit 320 configured to cyclically switch the sleep state and the wake state of the server to be tested;
a character writing unit 330, configured to write a preset check character into the check text after the server to be tested enters the wake-up state each time;
and the result judging unit 340 is configured to judge whether the number of the check characters of the check text is consistent with the cycle number, and if so, judge that the test is passed.
Optionally, as an embodiment of the present invention, the state switching unit includes:
the parameter setting module is configured to set cycle times, duration time of a dormant state and duration time of a wakeup state;
the cyclic switching module is configured to cyclically switch the dormant state and the awakening state of the server to be tested according to the dormant state duration and the awakening state duration;
and the circulation stopping module is configured to record state switching times, and stop the operation of switching the state of the server to be tested if the switching times reach the circulation times.
Optionally, as an embodiment of the present invention, the character writing unit includes:
the text checking module is configured to judge whether the check text is in an open state or not after the server to be tested enters the awakening state;
the character writing module is configured to write a check character in the check text if the check text is in an open state;
and the failure output module is configured to stop the test and output a test failure prompt if the verification text is not in an open state.
Optionally, as an embodiment of the present invention, the character writing unit includes:
and the check setting module is configured to set a single character as the check character.
Fig. 4 is a schematic structural diagram of a terminal 400 according to an embodiment of the present invention, where the terminal 400 may be configured to execute the server sleep state testing method according to the embodiment of the present invention.
Among them, the terminal 400 may include: a processor 410, a memory 420, and a communication unit 430. The components communicate via one or more buses, and those skilled in the art will appreciate that the architecture of the servers shown in the figures is not intended to be limiting, and may be a bus architecture, a star architecture, a combination of more or less components than those shown, or a different arrangement of components.
The memory 420 may be used for storing instructions executed by the processor 410, and the memory 420 may be implemented by any type of volatile or non-volatile storage terminal or combination thereof, such as a Static Random Access Memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk, or an optical disk. The executable instructions in memory 420, when executed by processor 410, enable terminal 400 to perform some or all of the steps in the method embodiments described below.
The processor 410 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by operating or executing software programs and/or modules stored in the memory 420 and calling data stored in the memory. The processor may be composed of an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs connected with the same or different functions. For example, the processor 410 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
A communication unit 430, configured to establish a communication channel so that the storage terminal can communicate with other terminals. And receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
Therefore, before the test is executed, a text is established, and certain characters are written into the text through the script after S4 is awakened each time. And after a certain number of times of execution, stopping testing, checking whether the content of the text has character loss or not, and further judging whether the machine has an S4 missing state or not. The stability of the server in the sleep state is judged through the physical characteristics of the server in the sleep state, so that the accuracy of the stability test of the server in the sleep state is improved.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be substantially or partially embodied in the form of a software product, the computer software product is stored in a storage medium, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various media capable of storing program codes include several instructions for enabling a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the method in the embodiments of the present invention.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.
In the embodiments provided in the present invention, it should be understood that the disclosed 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 coupling or direct coupling or communication connection between each other may be through some interfaces, indirect coupling or communication connection of 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 units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. A server dormancy state testing method is characterized by comprising the following steps:
creating a check text in an operating system of a server to be tested and opening the check text;
circularly switching the dormant state and the awakening state of the server to be tested;
writing preset check characters into the check text after the server to be tested enters the awakening state each time;
judging whether the number of the check characters of the check text is consistent with the cycle number, and if so, judging that the test is passed;
after the server to be tested enters the awakening state each time, writing preset check characters into the check text, including:
after the server to be tested enters the awakening state, judging whether the check text is in an open state:
if yes, writing check characters in the check text;
if not, stopping the test and outputting a test failure prompt;
after the server to be tested enters the awakening state each time, writing preset check characters into the check text, including:
and setting a single character as the check character.
2. The method of claim 1, wherein the cyclically switching between the sleep state and the awake state of the server under test comprises:
setting cycle times, duration time of a dormant state and duration time of an awakening state;
circularly switching the dormant state and the awakening state of the server to be tested according to the dormant state duration and the awakening state duration;
and recording the state switching times, and stopping switching the state of the server to be tested if the switching times reach the cycle times.
3. A server sleep state test system, comprising:
the system comprises a text creating unit, a verification unit and a verification unit, wherein the text creating unit is configured to create a verification text in an operating system of a server to be tested and open the verification text;
the state switching unit is configured to circularly switch the dormant state and the awakening state of the server to be tested;
the character writing unit is configured to write preset check characters into the check text after the server to be tested enters the awakening state each time;
the result judging unit is configured to judge whether the number of the check characters of the check text is consistent with the cycle number, and if so, the test is judged to be passed;
the character writing unit includes:
the text checking module is configured to judge whether the check text is in an open state or not after the server to be tested enters the awakening state;
the character writing module is configured to write a check character in the check text if the check text is in an open state;
the failure output module is configured to stop the test and output a test failure prompt if the verification text is not in an open state;
the character writing unit includes:
and the check setting module is configured to set a single character as the check character.
4. The system of claim 3, wherein the state switching unit comprises:
the parameter setting module is configured for setting cycle times, sleeping state duration and awakening state duration;
the cyclic switching module is configured to cyclically switch the dormant state and the awakening state of the server to be tested according to the dormant state duration and the awakening state duration;
and the circulation stopping module is configured to record state switching times, and stop the operation of switching the state of the server to be tested if the switching times reach the circulation times.
5. A terminal, comprising:
a processor;
a memory for storing instructions for execution by the processor;
wherein the processor is configured to perform the method of any of claims 1-2.
6. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-2.
CN202011266042.1A 2020-11-13 2020-11-13 Server dormancy state testing method, system, terminal and storage medium Active CN112463508B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011266042.1A CN112463508B (en) 2020-11-13 2020-11-13 Server dormancy state testing method, system, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011266042.1A CN112463508B (en) 2020-11-13 2020-11-13 Server dormancy state testing method, system, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN112463508A CN112463508A (en) 2021-03-09
CN112463508B true CN112463508B (en) 2023-01-10

Family

ID=74826808

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011266042.1A Active CN112463508B (en) 2020-11-13 2020-11-13 Server dormancy state testing method, system, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112463508B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113391936A (en) * 2021-06-15 2021-09-14 西安联乘智能科技有限公司 Reliability test method and system for vehicle-mounted intelligent antenna equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102594575A (en) * 2011-01-18 2012-07-18 鸿富锦精密工业(深圳)有限公司 System and method of controlling sleep and awakening of server
CN107708189A (en) * 2017-09-29 2018-02-16 深圳市盛路物联通讯技术有限公司 A kind of device sleeps awakening method and system
CN111367743A (en) * 2020-03-04 2020-07-03 苏州浪潮智能科技有限公司 Method and system for diagnosing power failure of server in cycle restart test process

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102594575A (en) * 2011-01-18 2012-07-18 鸿富锦精密工业(深圳)有限公司 System and method of controlling sleep and awakening of server
CN107708189A (en) * 2017-09-29 2018-02-16 深圳市盛路物联通讯技术有限公司 A kind of device sleeps awakening method and system
CN111367743A (en) * 2020-03-04 2020-07-03 苏州浪潮智能科技有限公司 Method and system for diagnosing power failure of server in cycle restart test process

Also Published As

Publication number Publication date
CN112463508A (en) 2021-03-09

Similar Documents

Publication Publication Date Title
US20240086269A1 (en) Method, Apparatus and System for Locating Fault of Server, and Computer-readable Storage Medium
CN111913836B (en) Solid state disk low power consumption mode data recovery method and device, computer equipment and storage medium
CN112506745B (en) Memory temperature reading method and device and computer readable storage medium
CN109257249A (en) A kind of network interface card stability test method, apparatus, terminal and storage medium
CN112463508B (en) Server dormancy state testing method, system, terminal and storage medium
CN111782446A (en) Method and device for testing normal power failure of SSD, computer equipment and storage medium
CN111966380A (en) BMC (baseboard management controller) firmware upgrading method, system, terminal and storage medium
CN107066361A (en) The method and apparatus that a kind of utilization BMC disables corrupted internal memory
CN115061871A (en) Computer performance test method, device and medium
US10691569B2 (en) System and method for testing a data storage device
CN111475353B (en) Method and system for detecting NVDIMM memory of production line
CN105630523A (en) Computer BIOS data recovery system and method
CN114461142B (en) Method, system, device and medium for reading and writing Flash data
CN112230753B (en) ARM server power key shutdown method, system, terminal and storage medium
CN115525349A (en) Method, system, device and medium for setting synchronous BMC (baseboard management controller) of BIOS (basic input/output system) interface
CN109189638A (en) A kind of GPU driving detection method, device, terminal and storage medium
CN115391112A (en) Memory bank testing method, device, equipment and medium based on domestic platform
CN112231170B (en) Data interaction card supervision method, system, terminal and storage medium
CN114816852A (en) Method, device and medium for recovering user configuration data
CN115204081A (en) Chip simulation method, chip simulation platform, chip simulation system, and computer-readable storage medium
CN111124780A (en) UPI Link speed reduction test method, system, terminal and storage medium
CN114385379B (en) Method, system, terminal and storage medium for detecting on-board information refreshing
CN113986635B (en) BIOS testing method, system, storage medium and device
CN110618921A (en) TPM module testing method, system, terminal and storage medium based on Linux system
CN114443446B (en) Hard disk indicator lamp control method, system, terminal 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