Disclosure of Invention
The invention provides a server stability testing method and a server, which are used for solving the problem that in the prior art, an assembled server cannot meet the requirement of stability because a complete machine assembler cannot perform stability testing on the assembled server.
The first aspect of the present invention provides a method for testing server stability, where the method includes:
the server runs a test set; the test set includes: the system comprises a test instruction set for testing the stability of server hardware and a test instruction set for testing the stability of server operating system software; the test instruction set for testing the stability of the server hardware is used for testing the operation stability of the server hardware under the hardware drive of the server operating system and the operation stability of the hardware drive of the server operating system;
the server obtains a test result obtained by running the test set; the test results include: the stability test result of server hardware and the stability test result of server operating system software.
As described above, after the server obtains the test result obtained by running the test set, the method further includes:
and when the stability test result of the server hardware meets the preset hardware stability requirement and the stability test result of the server operating system software meets the preset operating system software stability requirement, the server is determined to meet the stability requirement.
As described above, before the server runs the test set, the method further includes:
the server receives a test set sent by the terminal equipment and a test request; the test request is used to instruct the server to run the test set.
As described above, after the server obtains the test result obtained by running the test set, the method further includes:
and the server sends the test result to the terminal equipment.
As mentioned above, the test instruction set for testing the hardware stability of the server includes one or more of the following items:
the system comprises a test instruction subset for testing the stability of a Universal Serial Bus (USB) interface of a server, a test instruction subset for testing the stability of a network card of the server, a test instruction subset for testing the stability of a display card and a display of the server, a test instruction subset for testing the stability of a hard disk of the server and a test instruction subset for testing the stability of a Central Processing Unit (CPU) of the server;
the test instruction set for testing the software stability of the operating system of the server comprises one or more of the following items:
the test instruction subset is used for testing the software running stability of the server operating system, and the test instruction subset is used for testing the Java environment running stability of the server operating system.
A second aspect of the present invention provides a server, comprising:
the processing module is used for operating the test set; the test set includes: the system comprises a test instruction set for testing the stability of server hardware and a test instruction set for testing the stability of server operating system software; the test instruction set for testing the stability of the server hardware is used for testing the operation stability of the server hardware under the hardware drive of the server operating system and the operation stability of the hardware drive of the server operating system;
the acquisition module is used for acquiring a test result obtained by running the test set; the test results include: the stability test result of server hardware and the stability test result of server operating system software.
As described above, the server further includes:
and the determining module is used for determining that the server meets the stability requirement when the stability test result of the server hardware meets the preset hardware stability requirement and the stability test result of the server operating system software meets the preset operating system software stability requirement after the obtaining module obtains the test result obtained by operating the test set.
As described above, the server further includes:
the receiving module is used for receiving the test set sent by the terminal equipment and the test request before the processing module runs the test set; the test request is used to instruct the server to run the test set.
As described above, the server further includes:
and the sending module is used for sending the test result to the terminal equipment after the obtaining module obtains the test result obtained by operating the test set.
As mentioned above, the test instruction set for testing the hardware stability of the server includes one or more of the following items:
the system comprises a test instruction subset for testing the stability of a Universal Serial Bus (USB) interface of a server, a test instruction subset for testing the stability of a network card of the server, a test instruction subset for testing the stability of a display card and a display of the server, a test instruction subset for testing the stability of a hard disk of the server and a test instruction subset for testing the stability of a Central Processing Unit (CPU) of the server;
the test instruction set for testing the software stability of the operating system of the server comprises one or more of the following items:
the test instruction subset is used for testing the software running stability of the server operating system, and the test instruction subset is used for testing the Java environment running stability of the server operating system.
According to the server stability testing method and the server, before the server leaves a factory, the server is provided with the test set for testing the stability of the server, so that the server can test the stability of the server by automatically operating the test set, the server which is put into the market to meet the stability requirement is ensured, and the user experience is improved.
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 invention provides a server stability testing method and a server, and aims to solve the problem that in the prior art, an assembled server cannot meet the requirement of stability because a complete machine assembly manufacturer cannot perform stability testing on the assembled and integrated server.
The technical means of the present invention will be described in detail with reference to specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 1 is a schematic flowchart of a first embodiment of a server stability testing method provided by the present invention. The embodiment relates to a process of performing stability test on own hardware and an operating system by a server through running a test set. As shown in fig. 1, the method may include:
s101, operating a test set by a server; the test set includes: the system comprises a test instruction set for testing the stability of server hardware and a test instruction set for testing the stability of server operating system software; the test instruction set for testing the stability of the server hardware is used for testing the operation stability of the server hardware under the hardware drive of the server operating system and the operation stability of the hardware drive of the server operating system.
Specifically, the method of the present embodiment is applicable to a server including hardware and an operating system. The hardware referred to herein may include, for example, one or more of the following: a Central Processing Unit (CPU), a network card, a display, a Universal Serial Bus (USB) interface, a hard disk, and a memory. The operating system referred to herein may be any of the following: windows-like operating systems, unix-like operating systems, linux-like operating systems, and the like.
It is emphasized that the hardware and operating system described above may be manufactured by the same manufacturer and assembled by the manufacturer into a complete server. The hardware and the operating system can be produced by different manufacturers, and the hardware and the operating system are assembled into a complete server by a whole machine assembler.
In actual production, due to design defects or production defects, the hardware and/or operating system produced by the manufacturer of the production hardware and operating system may have unstable operation. Therefore, in order to ensure that the server assembled and integrated can meet the requirement of stability, the stability test needs to be performed on the hardware and the operating system of the server assembled and integrated. That is, whether the stability of the server meets the requirement is tested by assembling the hardware of the integrated server and the time that the operating system normally works under a certain strength.
In this embodiment, the server is provided with a test set for testing the stability of the server. The test set comprises a test instruction set for testing the stability of the hardware of the server and a test instruction set for testing the stability of the software of the operating system of the server. Therefore, the server can test the operation stability of the hardware of the server under the hardware drive of the server operating system by running a test instruction set for testing the hardware stability of the server. The server can test the operation stability of the server operating system software by operating a test instruction set for testing the stability of the server operating system software. That is, by running the test set, the stability of the server can be tested by combining the server hardware and the server operating system, thereby ensuring the accuracy of the stability test.
Optionally, the tester may automatically run the test set by manually starting the test set on the server. Alternatively, the server automatically runs the test set after initial startup. Or, the server automatically runs the test set at a preset time point, and the like, which can be specifically set according to the requirements of the user.
The test instruction subset included in the test instruction set for testing the hardware stability of the server may be determined according to the hardware configuration of the server. For example, the test instruction set for testing the hardware stability of the server may include one or more of the following test instruction subsets: the system comprises a test instruction subset for testing the stability of a Universal Serial Bus (USB) interface of a server, a test instruction subset for testing the stability of a network card of the server, a test instruction subset for testing the stability of a display card and a display of the server, a test instruction subset for testing the stability of a hard disk of the server and a test instruction subset for testing the stability of a Central Processing Unit (CPU) of the server.
The test instruction subset included in the test instruction set for testing the stability of the server operating system software may be determined according to the operating system installed on the server and the operating environment of the software installed on the server. For example, the test instruction set for testing the stability of the operating system software of the server may include one or more of the following test instruction subsets: the test instruction subset is used for testing the software running stability of the server operating system, and the test instruction subset is used for testing the Java environment running stability of the server operating system.
S102, a server obtains a test result obtained by running a test set; the test results include: the stability test result of server hardware and the stability test result of server operating system software.
Specifically, after the server tests the operation stability of the hardware of the server under the hardware drive of the server operating system by running the test instruction set for testing the hardware stability of the server, the server may obtain the stability test result of the hardware of the server. The stability test result of the server hardware can reflect the stability of the hardware drive of the server hardware and the hardware drive of the server operating system. Meanwhile, after the server tests the running stability of the server operating system software by running a test instruction set for testing the stability of the server operating system software, the stability test result of the server operating system software can be obtained. The stability test result of the server operating system software can reflect the stability of the server operating system software.
Therefore, the server can know whether the server meets the stability requirement or not according to the stability test result of the server hardware and the stability test result of the server operating system software. Or, the tester obtains the stability test result of the server hardware and the stability test result of the server operating system software through the server to know whether the server meets the stability requirement.
In the prior art, most of the hardware and the operating systems forming the server are produced by different manufacturers, and finally, the hardware and the operating systems are assembled by a whole machine assembly manufacturer to form a complete server. Because the complete machine assembly manufacturer does not have the professional knowledge of the hardware or the operating system, the complete machine assembly manufacturer cannot test the stability of the server after the integrated server is assembled by using the hardware and the operating system, so that the assembled server may not meet the requirement of the stability, and the user experience is low.
By the method provided by the embodiment, a complete machine assembly manufacturer can automatically run the test set by setting the test set on the server before the server leaves a factory, so that the server can automatically test the stability of the server by running the test set. Like this, complete machine assembly manufacturer can be when the stability of server satisfies the requirement, with the server of assembling put into the market to ensure that the server of selling satisfies the stability requirement, improved user experience.
According to the server stability testing method provided by the invention, before the server leaves a factory, the server is provided with the test set for testing the stability of the server, so that the server can test the stability of the server by automatically running the test set, the server which is put into the market to meet the stability requirement is ensured, and the user experience is improved.
Fig. 2 is a schematic flow chart of a second embodiment of a server stability testing method provided by the present invention. In this embodiment, the hardware stability requirement and the operating system software stability requirement are preset in the server. The embodiment relates to a process of determining whether the server meets the stability requirement according to the acquired test result. As shown in fig. 2, after the above S102, the method may further include:
s103, when the stability test result of the server hardware meets the preset hardware stability requirement and the stability test result of the server operating system software meets the preset operating system software stability requirement, the server is determined to meet the stability requirement.
The preset hardware stability requirement is related to a test instruction subset included in the test instruction set for testing the hardware stability of the server, and the test strength of each test instruction subset. The preset requirement for the stability of the operating system software is related to the test instruction included in each test instruction subset in the test instruction set for testing the stability of the operating system software of the server, and the test strength of each test instruction subset. The test strength of each test instruction subset is used to characterize the number of loop runs or the number of days of each test instruction subset.
When the test instruction set for testing the stability of the server hardware included in the test set includes one or more test subsets, the test result of the stability of the server hardware may include the test result of the one or more test subsets. Accordingly, the predetermined hardware stability requirement may include the stability requirement of the one or more test subsets. Wherein, the test result of each test subset can be characterized by: the hardware tested by the test subset and the number of days or times of normal operation of the hardware driver, the stability requirement of each test subset can be characterized as follows: the hardware and hardware drivers tested by the test subset require a number of days or times to operate properly when they meet the stability requirements.
When the test instruction set for testing the stability of the server operating system software included in the test set includes one or more test subsets, the test result of the stability of the server operating system software may include the test result of the one or more test subsets. Accordingly, the predetermined operating system software stability requirement may include the stability requirement of the one or more test subsets. Wherein, the test result of each test subset can be characterized by: the number of days or times that the software of the operating system tested by the test subset normally runs, the stability requirement of each test subset can be characterized by: the operating system software tested by the test subset requires a number of days or times to run normally when the stability requirement is met.
Therefore, the server may determine that the stability test result of the server hardware meets the preset hardware stability requirement when the test results of all the test subsets in the stability test result of the server hardware meet the stability requirement according to the test result of each test subset in the stability test result of the server hardware and the stability requirement of the test subset in the preset hardware stability requirement. Correspondingly, the server may determine that the stability test result of the server operating system software meets the preset stability requirement of the operating system software when the test results of all the test subsets in the stability test result of the server operating system software meet the stability requirement according to the test result of each test subset in the stability test result of the server operating system software and the stability requirement of the test subset in the stability requirement of the operating system software. Therefore, when the stability test result of the server hardware meets the preset hardware stability requirement and the stability test result of the server operating system software meets the preset operating system software stability requirement, the server can be determined to meet the stability requirement.
According to the server stability testing method provided by the invention, after the server obtains the testing result representing the stability of the server through the automatic operation testing set, the server can automatically determine whether the server meets the stability requirement or not based on the testing result, so that the efficiency of the server stability testing is improved.
Fig. 3 is a schematic flowchart of a third embodiment of a server stability testing method provided by the present invention. The embodiment relates to a process of performing stability test on own hardware and an operating system by a server according to a test set sent by a terminal device and a test request. As shown in fig. 3, after the above S101, the method may further include: the method can comprise the following steps:
s104, the server receives a test set sent by the terminal equipment and a test request; wherein the test request is used for instructing the server to run the test set.
Specifically, in this embodiment, the terminal device at the control end may send a test set and a test request to the server, so as to instruct the server to run the received test set through the test request, so that the server may automatically run the test set after receiving the test set and the test request. The test set and the test request may be sent to the server by the terminal device at the same time, or may be sent to the server by the terminal device at different times. When the test set and the test request are sent to the server by the terminal device at different times, the sending time of the test set may be earlier than the sending time of the test request.
By the method, the test set and the test request can be remotely sent to one or more servers to be tested by controlling the terminal equipment, so that the server can be remotely controlled to test the stability of the server, and the efficiency of the stability test of the server is further improved.
In this implementation manner, after the server obtains the test result obtained by running the test set, the server may send the obtained test result to the terminal device, so that the terminal device determines whether the server meets the stability requirement according to the test result, and the preset hardware stability requirement and the preset operating system software stability requirement. Or, the server may determine whether the server meets the stability requirement according to the obtained test result, and the preset hardware stability requirement and the preset operating system software stability requirement, and then send the stability result of the server to the terminal device.
Through the two modes, a tester can directly obtain the stability result of the server through the terminal equipment, and the stability testing efficiency of the server is further improved.
According to the server stability testing method provided by the invention, before the server leaves a factory, the server receives the test set which is sent by the terminal equipment and used for testing the stability of the server, and the server is instructed to run the test request of the test set, so that the server can automatically run the test set to test the stability of the server, the server which is put into the market and sold can meet the stability requirement is ensured, and the user experience is improved.
As described in the foregoing embodiment, the test set includes a test instruction set for testing the stability of the server hardware, and is used to test the operational stability of the server hardware under the hardware driver of the server operating system and the operational stability of the hardware driver of the server operating system. The test instruction subset included in the test instruction set for testing the hardware stability of the server may be determined according to the hardware configuration of the server. The test intensity (i.e. the number of test days or test times) of each test instruction subset can be specifically set according to the needs of the user.
For example, the test instruction set for testing the hardware stability of the server may include the following test instruction subsets shown in table 1, specifically:
TABLE 1
The large file involved in the test instruction for testing the stability of the large file decompressed from the usb disk to the hard disk may be, for example, a file greater than or equal to 1 giga (Gillion, G). The file format is not limited in this embodiment.
The test instruction for testing the network connection stability may be a ping instruction, for example. The test instruction of the test display interface display text may be an Is-R instruction, for example. The test command for the test display interface display graphics may be, for example, an x11perf command. The graphics referred to herein may be, for example, 2D graphics and/or 3D graphics.
The test instruction for testing the stability of the input/output pressure of the hard disk may include one or more of the following instructions: the test instructions include a test instruction for copying a large file on a hard disk, a test instruction for compressing a large file on a hard disk, a test instruction for decompressing a large file on a hard disk, and the like. For example: the test instruction for testing the stability of the input/output pressure of the hard disk may include: iozone instructions and netperf instructions, etc.
The test instruction for testing the CPU operation stability may be, for example, a Speccpu2006 instruction.
With continued reference to table 1, when the test instruction set for testing the stability of the server hardware includes the test instruction subset shown in table 1, the stability test result of the server hardware and the preset hardware stability requirement may be shown in table 2 below, for example:
TABLE 2
The first preset number, the second preset number, and the third preset number referred to in table 2 may be less than or equal to 1000, and may be specifically set according to the requirement of the user. The first preset number of days, the second preset number of days, the third preset number of days, the fourth preset number of days, and the fifth preset number of days referred to in table 2 may be less than or equal to 30 days, and may be specifically set according to the needs of the user.
The test strengths of the test instruction subsets referred to in table 1 above, and the predetermined hardware stability requirements referred to in table 2 above, are merely examples. The test intensity of the test instruction subset referred to in table 1 above may be specifically set and adjusted according to the needs of the user. The preset hardware stability requirement referred to in table 2 may be adjusted according to the test strength of the test instruction subset referred to in table 1, which is not described again.
As described in the above embodiment, the test set includes a test instruction set for testing the stability of the server operating system software, and is used to test the operation stability of the server operating system software. The test instruction subset included in the test instruction set for testing the stability of the server operating system software may be determined according to the operating system installed on the server and the operating environment of the software installed on the server. The test intensity (i.e. the number of test days or test times) of each test instruction subset can be specifically set according to the needs of the user.
For example, the test instruction set for testing the software stability of the operating system of the server may include the following test instruction subsets shown in table 3, specifically:
TABLE 3
The test instruction for testing the stability of the operating system may be specifically determined according to the type of the operating system used by the server. Taking the Linux-like os as an example, the Test command for testing the stability of the os may be a Linux Test Project (LTP) command, for example.
The test instruction for testing the stability of the Java environment may be, for example, a SpecJVM 2008 instruction.
With continued reference to table 3, when the test instruction set for testing the stability of the server operating system software includes the test instruction subset shown in table 3, the stability test result of the server operating system software and the preset stability requirement of the operating system software may be shown in table 4 below, for example:
TABLE 4
The sixth preset number of days and the seventh preset number of days referred to in table 4 above may be less than or equal to 30 days, and may be specifically set according to the needs of the user.
The test strengths of the test instruction subsets referred to in table 3 above, and the predetermined operating system software stability requirements referred to in table 4 above, are merely examples. The test intensity of the test instruction subset referred to in table 3 above can be specifically set and adjusted according to the needs of the user. The preset stability requirement of the operating system software referred to in table 4 may be adjusted according to the test strength of the test instruction subset referred to in table 3, which is not described again.
It should be noted that, when the server stability testing method provided by the present invention is actually applied, for a server assembled by using hardware produced in a certain batch and software produced in a certain batch, whether the stability of the batch of servers meets the requirement may be evaluated by performing the above-mentioned embodiment on some servers to be tested in the batch of servers. The number of the servers may be, for example, 10 servers, which may be determined according to the user's requirement, the production cycle of the server, and the test cost of the server. Optionally, in order to speed up the progress of the stability test, for servers assembled by using hardware produced in a certain batch and software produced in a certain batch, the servers to be tested may be further classified, so that each server to be tested executes a part of test subsets in the test set, and the stability of the batch of servers is evaluated by summarizing test results of all servers to be tested.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Fig. 4 is a schematic structural diagram of a first embodiment of a server according to the present invention. As shown in fig. 4, the server may include: a processing module 11 and an acquisition module 12; wherein,
and the processing module 11 is used for running the test set. The test set includes: the system comprises a test instruction set for testing the stability of server hardware and a test instruction set for testing the stability of server operating system software. The test instruction set for testing the stability of the server hardware is used for testing the operation stability of the server hardware under the hardware drive of the server operating system and the operation stability of the hardware drive of the server operating system. For example, the test instruction set for testing the hardware stability of the server may include one or more of the following: the system comprises a test instruction subset for testing the stability of a Universal Serial Bus (USB) interface of a server, a test instruction subset for testing the stability of a network card of the server, a test instruction subset for testing the stability of a display card and a display of the server, a test instruction subset for testing the stability of a hard disk of the server, a test instruction subset for testing the stability of a Central Processing Unit (CPU) of the server and the like; the set of test instructions to test the stability of the server operating system software may include, for example, one or more of: the test instruction subset is used for testing the software running stability of the server operating system, and the test instruction subset is used for testing the Java environment running stability of the server operating system.
An obtaining module 12, configured to obtain a test result obtained by running the test set; the test results include: the stability test result of server hardware and the stability test result of server operating system software.
The server provided by the present invention can execute the above method embodiments, and the implementation principle and technical effect are similar, which are not described herein again.
Fig. 5 is a schematic structural diagram of a second server according to an embodiment of the present invention. As shown in fig. 5, on the basis of the block diagram shown in fig. 4, the server may further include: a determination module 13. Wherein,
the determining module 13 is configured to determine that the server meets the stability requirement when the stability test result of the server hardware meets the preset hardware stability requirement and the stability test result of the server operating system software meets the preset operating system software stability requirement after the obtaining module 12 obtains the test result obtained by running the test set.
The server provided by the invention can execute the method embodiment, the realization principle and the technical effect are similar, and the description is omitted.
Fig. 6 is a schematic structural diagram of a third embodiment of a server provided by the present invention, and as shown in fig. 6, on the basis of the block diagram shown in fig. 4, the server may further include: a receiving module 14. Wherein,
a receiving module 14, configured to receive the test set sent by the terminal device and the test request before the processing module 11 runs the test set; the test request is used to instruct the server to run the test set.
With continued reference to fig. 5, in this implementation, the server may further include:
and a sending module 15, configured to send the test result to the terminal device after the obtaining module 12 obtains the test result obtained by running the test set.
The server provided by the invention can execute the method embodiment, the realization principle and the technical effect are similar, and the description is omitted.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.