Server testing method, device, equipment, storage medium and program product
By conducting stability testing and updating of servers in multiple disk array modes, the problem of inability to comprehensively assess server stability in existing technology is solved, and accurate testing and automated assessment of the overall stability of the server is achieved, reducing costs and Human input.
Patent Information
- Application Number
- CN202211606220.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-12
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-12-12
AI Technical Summary
The existing technology cannot conduct a comprehensive stability test on the server, especially in multiple disk array modes, resulting in the inability to accurately evaluate the overall stability of the server.
By determining the disk array mode to be tested, perform a stability test on the server, update the disk array mode after the test, and repeat the test to ensure a comprehensive evaluation in multiple modes. This method includes obtaining test information, judging hardware and link layer error information, determining server status, outputting abnormal information when necessary, and automating the test process to reduce manpower and costs.
It achieves accurate testing of the overall stability of the server, covering multiple disk array modes, improving the accuracy and practicality of the test, and reducing manpower, material resources and cost investment.
Smart Images

Figure CN116166485B
Abstract
Description
Technical Field
[0001] The present application relates to the field of testing technology, and in particular to a server testing method, device, equipment, storage medium and program product. Background Art
[0002] With the rapid development of data centers and cloud computing industries, the rapid increase in data center cabinets and the improvement of computing power in the cloud computing industry have led to higher and higher performance requirements for servers. In order to ensure the normal operation of the server for a long time, it is necessary to test the stability of the server.
[0003] When testing a server, the prior art cannot accurately test the overall stability of the server. Summary of the invention
[0004] Based on this, it is necessary to provide a server testing method, device, equipment, storage medium and program product that can accurately test the overall stability of the server and ensure the overall stability of the server in response to the above technical problems.
[0005] In a first aspect, the present application provides a server testing method, the method comprising:
[0006] Determine the disk array mode to be tested;
[0007] After the server is powered off and restarted, a stability test is performed on the server in the disk array mode to be tested to determine whether the server is in a normal working state;
[0008] If it is determined that the server is in a normal working state, the disk array mode to be tested is updated, and a stability test is performed on the server under the updated disk array mode.
[0009] In the above embodiment, after the stability test of the server is performed under the disk array mode to be tested, and when it is determined that the server is in a normal working state, the disk array mode to be tested is updated, and the stability test of the server is performed again under the updated disk array mode. Compared with the stability test for a single disk array mode in the prior art, the stability of the server can be tested under two disk array modes, which can better meet the actual application scenario, so that the overall stability of the server can be accurately tested to ensure the overall stability of the server. In addition, the server testing method provided in this embodiment can realize the automated testing of the overall stability of the server, which can reduce the investment of manpower, material resources, and costs, and has high practicality.
[0010] In one embodiment, performing a stability test on a server in a disk array mode to be tested to determine whether the server is in a normal working state includes:
[0011] Obtain test information of the disk array mode to be tested;
[0012] Determine whether the server is in normal working condition based on the test information.
[0013] In the above embodiment, by obtaining the test information of the server in the disk array mode to be tested, whether the server is in a normal working state is directly determined according to the test information. Such a determination method is fast, simple, and easy to implement.
[0014] In one embodiment, the test information includes link layer error information and hardware information, and determining whether the server is in a normal working state according to the test information includes:
[0015] In the case that the error information does not include a preset abnormal value, determining whether the hardware information is consistent with the corresponding hardware parameters;
[0016] If they are consistent, it is determined that the server is in normal working condition;
[0017] If they are inconsistent, it is determined that the server is not in a normal working state.
[0018] In the above embodiment, when the test information includes link layer error information and hardware information, it is first determined whether the error information contains a preset abnormal value. If the error information does not contain the preset abnormal value, the hardware information is compared with the corresponding hardware parameters to determine whether the server is in a normal working state. In this way, when the error information includes a preset abnormal value, there is no need to compare the hardware information, which can improve the determination efficiency. In addition, the method of determining whether the server is in a normal working state through error information and hardware information in this embodiment is simple, fast, and easy to implement.
[0019] In one embodiment, the method further comprises:
[0020] When the error message contains a preset abnormal value, output the error message corresponding to the preset abnormal value;
[0021] Alternatively, when the hardware information is inconsistent with the corresponding hardware parameters, the hardware information of the current test is output.
[0022] In the above embodiment, when the server determines that the error information contains preset abnormal data, or determines that the hardware information is inconsistent with the corresponding hardware parameters, the specific information that causes the server to not be in a working state will be located and output to an external terminal, so that the staff can repair or debug the server according to the test results, which can improve the practicality of the server testing method.
[0023] In one embodiment, before updating the disk array mode to be tested, the method further includes:
[0024] Determine whether the number of tests reaches the target number;
[0025] If not, return to the step of performing a stability test on the server in the disk array mode to be tested after the server is powered off and restarted to determine whether the server is in a normal working state;
[0026] If reached, continue to execute the step of updating the disk array mode to be tested.
[0027] In the above embodiment, after a stability test is performed on the server in the disk array mode currently to be tested, before the disk array mode currently to be tested is updated, the current test times are first judged, and if the test times reach the target times, the disk array mode currently to be tested is updated; if the test times do not reach the target times, the stability test is continued in the disk array mode currently to be tested. In this way, it is possible to ensure that multiple stability tests are performed on the server in the same disk array mode, and test errors can be avoided, thereby improving the accuracy of the stability test on the server.
[0028] In one embodiment, after performing a stability test on the server in the updated disk array mode, the method further includes:
[0029] Determine whether the server is in normal working condition, and if the server is in normal working condition, determine whether the server has completed stability testing in all disk array modes;
[0030] If not, returning to the step of updating the disk array mode to be tested;
[0031] If yes, stop the test.
[0032] In the above embodiment, after the stability test is performed on the server in the updated disk array mode, and when it is determined that the server is in a normal working state, it is first determined whether the stability test is completed in all disk array modes. If so, it means that the stability test of the server in all disk array modes has been completed. If not, the disk array mode is continuously updated and the stability test is performed in the updated disk array mode. In this way, it can be ensured that the stability test of the server is completed in all disk array modes supported by the server, so that the stability test of the server as a whole can be implemented, and the overall stability of the server can be ensured.
[0033] In a second aspect, an embodiment of the present application provides a server testing device, the device comprising:
[0034] A determination module, used for determining the disk array mode to be tested;
[0035] The test module is used to perform a stability test on the server in the disk array mode to be tested after the server is powered off and restarted, to determine whether the server is in a normal working state;
[0036] The update module is used to update the disk array mode to be tested if it is determined that the server is in a normal working state, and perform a stability test on the server under the updated disk array mode.
[0037] In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method provided in the first aspect are implemented.
[0038] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method provided in the first aspect above are implemented.
[0039] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program, which implements the steps of the method provided in the first aspect when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 An application environment diagram of a server testing method in an embodiment;
[0041] Figure 2 A schematic diagram of a process flow of a server testing method in one embodiment;
[0042] Figure 3 A schematic diagram of a process flow of a server testing method in another embodiment;
[0043] Figure 4 A schematic flow chart of the steps of a server testing method in another embodiment;
[0044] Figure 5 A schematic flow chart of the steps of a server testing method in another embodiment;
[0045] Figure 6 A schematic flow chart of the steps of a server testing method in another embodiment;
[0046] Figure 7 A schematic flow chart of the steps of a server testing method in another embodiment;
[0047] Figure 8 A schematic flow chart of the steps of a server testing method in another embodiment;
[0048] Fig. 9 FIG. 4 is a schematic diagram of the structure of a server testing device in an embodiment. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0050] Before specifically introducing the technical solutions of the embodiments of the present application, the technical background or technical evolution context on which the embodiments of the present application are based is first introduced. With the rapid development of industries such as data centers and cloud computing, the rapid increase in data center cabinets, and the increasing pursuit of computing power in the computing industry, the performance requirements for servers are also getting higher and higher. In order to ensure that the server can operate normally for a long time, it is necessary to test the stability of the server. In traditional technology, when testing a server, only a stability test is performed on a single disk array mode, which will not cover all array modes supported by the disk array card. In this regard, the present application provides a server testing method that can perform stability tests on servers under multiple disk array modes supported by disk array cards.
[0051] The server testing method provided in the embodiment of the present application can be applied in the server. Before using the server testing method provided in the present application to test the stability of the server, the server system needs to be installed. After the server starts and enters the BIOS (Basic Input Output System), the disk array mode of the disk array card to be tested is determined, and the operating system is installed on the server to be tested through PXE (preboot execute environment) under the disk array card; then the system environment in the server is installed, that is, the driver and firmware of the network card, and the driver and firmware of the disk array card; and then the pre-set test script is configured in the server. The internal structure diagram of the server can be shown as follows: Figure 1 As shown. The server includes a processor, a memory, a communication interface, a display screen and an input device connected by a system bus. Among them, the processor of the server is used to provide computing and control capabilities. The memory of the server includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the server is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a server testing method is implemented.
[0052] See also Figure 2 An embodiment of the present application provides a server testing method, and the present embodiment applies the method to Figure 1 In this embodiment, the server testing method includes the following steps:
[0053] Step 200: Determine the disk array mode to be tested.
[0054] Redundant Arrays of Independent Disks (RAID) modes include RAID0, RAID1 to RAID7, and RAID0+1. Generally, the most commonly used disk array modes are RAID0, RAID1, RAID5, and RAID10.
[0055] After the operating system and system environment are installed in the server, the disk array mode to be tested in the disk array card in the current server can be determined. The disk array mode to be tested can be any one of the multiple disk array modes supported by the disk array card. Optionally, the disk array mode to be tested is a disk array mode commonly used by staff.
[0056] Step 210: After the server is powered off and restarted, a stability test is performed on the server in the disk array mode to be tested to determine whether the server is in a normal working state.
[0057] After determining the disk array mode to be tested, the current server is powered off and restarted. After the power-off and restart, the server executes the internally configured test script and performs a stability test on the server in the disk array mode to be tested to determine whether the server is in a normal working state. In other words, after the server is powered off and restarted, it is determined that various hardware or software in the server can work normally.
[0058] The stability test of the server may be to capture the hardware information on the server for comparison, or to capture the hard disk error information on the server for testing. This embodiment does not limit the specific process of the stability test, as long as its function can be achieved.
[0059] Step 220: If it is determined that the server is in a normal working state, the disk array mode to be tested is updated, and a stability test is performed on the server under the updated disk array mode.
[0060] If the server is determined to be in a normal working state through a stability test under the disk array mode to be tested, the disk array mode to be tested is updated, that is, any one of the disk array modes supported by the disk array except the disk array mode to be tested is used as a new disk array mode to be tested. After updating the disk array mode, the server executes the test script again and performs a stability test on the server under the updated disk array mode. The specific process of performing the stability test on the server this time can be the same as the process of performing the stability test for the first time, and will not be repeated here.
[0061] If the server is determined to be not in normal working condition through stability testing in the disk array mode to be tested, the test is stopped and the hardware in the server that is not in normal working condition is located based on the information obtained from the test, so that corresponding measures can be taken later for maintenance or debugging.
[0062] In an optional embodiment, after updating the disk array mode, it is necessary to install the operating system and system environment through PXE under the disk array card corresponding to the disk array mode. After installation, the stability of the server is tested under the disk array mode.
[0063] The server testing method provided in the embodiment of the present application includes determining the disk array mode to be tested; after the server is powered off and restarted, the server is tested for stability in the disk array mode to be tested to determine whether the server is in a normal working state; if it is determined that the server is in a normal working state, the disk array mode to be tested is updated, and the server is tested for stability in the updated disk array mode. After the server testing method provided in the embodiment performs a stability test on the server in the disk array mode to be tested and determines that the server is in a normal working state, the disk array mode to be tested is updated, and the server is tested for stability again in the updated disk array mode. Compared with the stability test for a single disk array mode in the prior art, the stability of the server can be tested in two disk array modes, which can better meet the actual application scenario, so that the overall stability of the server can be accurately tested to ensure the overall stability of the server. In addition, the server testing method provided in the embodiment can realize the automatic testing of the overall stability of the server, which can reduce the investment of manpower, material resources, and cost, and has high practicality.
[0064] See also Figure 3 In one embodiment, a method for performing a stability test on a server in a disk array mode to be tested to determine whether the server is in a normal working state involves the following steps:
[0065] Step 300: Acquire test information in the disk array mode to be tested.
[0066] When the server is tested in the disk array mode to be tested, the test information in the disk array mode to be tested is obtained by executing the corresponding test script. The test information is information that can be used to characterize whether various hardware in the server is in a normal working state. This embodiment does not limit the specific content of the test information.
[0067] Optionally, the test information includes sensor information of various hardware on the server, and error information of the physical link layer of the server, etc. For example: temperature information and voltage information of the network card, temperature information and voltage information of the hard disk, temperature information and voltage information of the backplane, redundant error information of the server, etc.
[0068] Step 310: Determine whether the server is in a normal working state according to the test information.
[0069] After the server obtains the test information through the test script, it processes the obtained test information to determine whether the hardware corresponding to the test information is in a normal working state, thereby determining whether the server is in a normal working state. Different test information has different methods for determining whether the corresponding hardware is in a normal working state according to the test information, and this embodiment does not limit this.
[0070] In this embodiment, by acquiring the test information of the server in the disk array mode to be tested, whether the server is in a normal working state is directly determined according to the test information. Such a determination method is fast, simple, and easy to implement.
[0071] In one embodiment, the test information in the disk array mode to be tested acquired by the server includes link layer error information and hardware information.
[0072] The error information of the link layer includes the error information of the disk array (RAID) card, the error information of the hard disk and the error information of the backplane.
[0073] The server sends an error information acquisition instruction to the storcli tool by executing the test script, and the storcli tool acquires the link layer error information according to the received instruction. Specifically, the link layer error information is stored in the log, and the server uses the storcli tool to capture the relevant error information in the log.
[0074] Hardware information includes component information and high-speed serial computer expansion bus standard information. Component information includes sensor information, power consumption, network card information, hard disk information and RAID card information. Sensor information includes temperature information and voltage information, etc.; hard disk information includes hard disk capacity, hard disk firmware version and whether the hard disk can be identified, etc.; network card information includes network card firmware version and whether the network card can be identified, etc.; RAID card information includes RAID card name, RAID card firmware version, and the hard disk connected to the RAID card, etc. High-speed serial computer expansion bus standard information includes speed, bit width and cache size, etc.
[0075] The server obtains the high-speed serial computer expansion bus standard information of the network card and the RAID card by executing the lspci command in the test script; and obtains the high-speed serial computer expansion bus standard information of the CPU in the server by executing the lscpu command in the test script. The test information may also include frequency, and the operating frequency of the CPU may also be obtained by executing the lscpu command in the test script.
[0076] The server executes the test script and sends a command to obtain sensor information to the ipmitool tool. The ipmitool tool obtains sensor information based on the received command. The server executes the test script and sends a command to obtain hard disk information to the smarctl tool. The smarctl tool obtains hard disk information based on the received command. The server executes the test script and sends a command to obtain network card information to the ethtool tool. The ethtool tool obtains network card information based on the received command. The server executes the storcli / call show all command in the test script to obtain RAID card information.
[0077] See also Figure 4 In one embodiment, a method for determining whether a server is in a normal working state according to test information is provided, and the steps of the method include:
[0078] Step 400: When the error information does not include a preset abnormal value, determine whether the hardware information is consistent with the corresponding hardware parameters.
[0079] The test information in this embodiment includes link layer error information and hardware information. The error information is represented by a numerical value, that is, if an error occurs, the value of the error information increases. For example: when an error occurs in a RAID card, the value of the error information of the RAID card increases; when an error occurs in a hard disk, the value of the error information of the hard disk increases; when an error occurs in a backplane, the value of the error information of the backplane increases.
[0080] The server judges the error information obtained and determines that the error information does not contain preset abnormal values, that is, the values of the error information of the RAID card, the error information of the hard disk, and the error information of the backplane have not increased and remain at the initial values; the server judges the hardware information obtained, that is, compares the hardware information with the corresponding hardware parameters to determine whether the hardware information is consistent with the corresponding hardware parameters.
[0081] Hardware parameters are parameters pre-stored inside the server, and each piece of hardware information has corresponding hardware parameters. For example, the server has the name of the network card installed in the server, and the server compares the obtained network card name with the name of the corresponding network card in the server to determine whether they are consistent; the server has the bit width of the network card in the server, and the server compares the obtained network card bit width with the bit width of the corresponding network card in the server to determine whether they are consistent.
[0082] The server judges the obtained error information, and if the error information contains a preset abnormal value, that is, the value of at least one of the error information of the RAID card, the error information of the hard disk, and the error information of the backplane increases, the server stops testing.
[0083] Step 410: If they are consistent, it is determined that the server is in a normal working state.
[0084] If the server compares the acquired hardware information with the corresponding hardware parameters and determines that the hardware information is consistent with the corresponding hardware parameters, it means that the link layer error information and hardware information acquired by the server are both normal, and it can be determined that the server is in a normal working state.
[0085] Step 420: If they are inconsistent, it is determined that the server is not in a normal working state.
[0086] If the server determines that the hardware information is inconsistent with the corresponding hardware parameters by comparing the acquired hardware information with the corresponding hardware parameters, that is, at least one information in the hardware information is inconsistent with its corresponding parameters, indicating that there is an error in the hardware information in the server, it can be determined that the server is not in a normal working state.
[0087] In this embodiment, when the test information includes link layer error information and hardware information, it is first determined whether the error information contains a preset abnormal value. If the error information does not contain the preset abnormal value, the hardware information is compared with the corresponding hardware parameters to determine whether the server is in a normal working state. In this way, when the error information includes a preset abnormal value, there is no need to compare the hardware information, which can improve the determination efficiency. In addition, the method of determining whether the server is in a normal working state through error information and hardware information in this embodiment is simple, fast, and easy to implement.
[0088] See also Figure 5 In one embodiment, the server testing method further comprises:
[0089] Step 500: When the error information includes a preset abnormal value, output the error information corresponding to the preset abnormal value.
[0090] When the server determines that the error information contains a preset abnormal value, the server will determine the error information corresponding to the preset abnormal value while stopping the test, that is, the error information can be located. After the server determines the error information corresponding to the preset abnormal value, it will transmit the error information to an external terminal through the external network so that the staff can determine the test result of the server.
[0091] Step 510: When the hardware information is inconsistent with the corresponding hardware parameters, output the hardware information of the current test.
[0092] When the server determines that the hardware information is inconsistent with the corresponding hardware parameters, it will stop the test and determine the hardware information that is inconsistent with the hardware parameters, that is, the hardware information currently being tested, so that the inconsistent hardware information can be located. After the server determines the hardware information currently being tested, it will transmit the error information to the external terminal through the external network so that the staff can determine the test results of the server.
[0093] In this embodiment, when the server determines that the error information contains a preset abnormal value, or determines that the hardware information is inconsistent with the corresponding hardware parameters, the specific information that causes the server to not be in a working state will be located and output to an external terminal, so that the staff can repair or debug the server according to the test results, thereby improving the practicality of the server testing method.
[0094] See also Figure 6 In one embodiment, before updating the disk array mode to be tested, the server testing method further includes:
[0095] Step 600: Determine whether the number of tests reaches the target number.
[0096] The target number of times is a value pre-set in the test script. After the server executes the test script to perform a stability test on the server in the disk array mode to be tested and determines that the server is in a normal working state, before updating the disk array mode to be tested, the server determines whether the number of tests for the stability test of the server in the disk array mode to be tested has reached the target number of times. In other words, the server is tested for stability multiple times in the disk array mode to be tested, and the value of the number of tests is increased by 1 each time.
[0097] Optionally, there is an accumulation script in the test script, that is, the initial value of the test number is zero, and each time a stability test is performed, the value of the test number is increased by 1. When determining whether the test number reaches the target number, the value of the test number at this time is compared with the target number.
[0098] If not, the step returns to executing the step of performing a stability test on the server in the disk array mode to be tested after the server is powered off and restarted to determine whether the server is in a normal working state.
[0099] If the server determines that the current number of tests has not reached the target number, that is, the number of stability tests on the server under the disk array mode to be tested is less than the target number, then the process returns to step 210 and step 220, and step 600 is executed before the step of updating the disk array mode to be tested in step 220.
[0100] If reached, continue to execute the step of updating the disk array mode to be tested.
[0101] If the server determines that the current test times reach the target times, that is, the number of stability tests on the server under the disk array mode to be tested is equal to the target times, then the step of updating the disk array mode to be tested in step 220 is continued.
[0102] In this embodiment, after a stability test is performed on the server in the disk array mode currently to be tested, before the disk array mode currently to be tested is updated, the current test times are first determined, and if the test times reach the target times, the disk array mode currently to be tested is updated; if the test times do not reach the target times, the stability test is continued in the disk array mode currently to be tested. In this way, multiple stability tests can be performed on the server in the same disk array mode, and test errors can be avoided, thereby improving the accuracy of the stability test on the server.
[0103] See also Figure 7 In one embodiment, after the stability test is performed on the server in the updated disk array mode, the server testing method further includes:
[0104] Step 700: Determine whether the server is in a normal working state, and if the server is in a normal working state, determine whether the server completes stability testing in all disk array modes.
[0105] There are multiple disk array modes supported by the disk array. After performing a stability test on the server under the updated disk array mode and determining that the server is in a normal working state, determine whether the server has completed stability tests under all disk array modes supported by the disk array, that is, determine whether the disk array mode that was tested for stability before the disk array mode was updated and the disk array mode that was tested for stability after the disk array mode was updated are all disk array modes supported by the disk array of the server.
[0106] If not, return to the step of updating the disk array mode to be tested.
[0107] If the server determines that the server has not completed the stability test in all disk array modes, that is, there is a situation where the stability of the server has not been tested in at least one disk array mode supported by the disk array, then the step of updating the disk array mode to be tested in step 220 is executed, and the stability test of the server is performed in the updated disk array mode, so that the server completes the stability test in all disk array modes supported by the disk array.
[0108] Step 710: If yes, stop the test.
[0109] If the server determines that the server has completed the stability test in all disk array modes, it means that the entire test process of the stability test on the server is completed, and the test is stopped.
[0110] In an optional embodiment, after stopping the test, the server will send the test result and related information during the test to an external terminal via an external network, so that the staff can know the test result and test process of the test.
[0111] In this embodiment, after the stability test is performed on the server in the updated disk array mode, and when it is determined that the server is in a normal working state, it is first determined whether the stability test is completed in all disk array modes. If so, it means that the stability test of the server in all disk array modes has been completed. If not, the disk array mode is continuously updated and the stability test is performed in the updated disk array mode. In this way, it can be ensured that the stability test of the server is completed in all disk array modes supported by the server, so that the stability test of the server as a whole can be implemented, and the overall stability of the server can be ensured.
[0112] See also Figure 8 An embodiment of the present application provides a server testing method, the steps of which include:
[0113] Step 800: Install the operating system and system environment on the server;
[0114] Step 810: determine the disk array mode to be tested;
[0115] Step 820: After the server is powered off and restarted, test information in the disk array mode to be tested is obtained; wherein the test information includes link layer error information and hardware information;
[0116] Step 830: If the error information does not contain a preset abnormal value, determine whether the hardware information is consistent with the corresponding hardware parameters;
[0117] Step 840: If they are consistent, it is determined that the server is in a normal working state;
[0118] Step 850: If they are inconsistent, it is determined that the server is not in a normal working state, and when the hardware information is inconsistent with the corresponding hardware parameters, the hardware information of the current test is output.
[0119] Step 860: When it is determined that the server is in a normal working state, determine whether the number of tests reaches the target number; if not, return to execute steps 820 to 860;
[0120] Step 870: If the condition is met, the disk array mode to be tested is updated, and a stability test is performed on the server under the updated disk array mode to determine whether the server is in a normal working state.
[0121] Step 880: When the server is in a normal working state, determine whether the server has completed the stability test in all disk array modes; if not, return to execute steps 860 to 880;
[0122] Step 890: If yes, stop testing.
[0123] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0124] Based on the same inventive concept, the embodiment of the present application also provides a server testing device for implementing the server testing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more server testing device embodiments provided below can refer to the limitations on the server testing method above, and will not be repeated here.
[0125] In one embodiment, Fig. 9 As shown, a server testing device 10 is provided, comprising: a determination module 11, a testing module 12 and an updating module 13, wherein:
[0126] The determination module 11 is used to determine the disk array mode to be tested.
[0127] The testing module 12 is used to perform a stability test on the server in the disk array mode to be tested after the server is powered off and restarted, to determine whether the server is in a normal working state.
[0128] The updating module 13 is used to update the disk array mode to be tested if it is determined that the server is in a normal working state, and perform a stability test on the server under the updated disk array mode.
[0129] In one embodiment, the test module 12 includes an acquisition unit and a determination unit, wherein the acquisition unit is used to acquire the test information of the disk array mode to be tested; and the determination unit is used to determine whether the server is in a normal working state according to the test information.
[0130] In one embodiment, the determination unit is specifically used to determine whether the hardware information is consistent with the corresponding hardware parameters when the error information does not contain a preset abnormal value; if consistent, it is determined that the server is in a normal working state; if inconsistent, it is determined that the server is not in a normal working state.
[0131] In one embodiment, the server testing device 10 also includes an output module, which is used to output error information corresponding to a preset abnormal value when the error information contains a preset abnormal value; or, when the hardware information is inconsistent with the corresponding hardware parameters, output the hardware information of the current test.
[0132] In one embodiment, the determination module 11 is also used to determine whether the number of tests reaches the target number; if not, the step of returning to execute, after the server is powered off and restarted, a stability test of the server under the disk array mode to be tested to determine whether the server is in a normal working state; if reached, the step of updating the disk array mode to be tested is continued.
[0133] In one embodiment, the determination module 11 is also used to determine whether the server is in a normal working state, and when the server is in a normal working state, determine whether the server has completed the stability test in all disk array modes; if not, return to the step of updating the disk array mode to be tested; if so, stop the test.
[0134] Each module in the above server testing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0135] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 1 shown.
[0136] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0137] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0138] Determine the disk array mode to be tested;
[0139] After the server is powered off and restarted, a stability test is performed on the server in the disk array mode to be tested to determine whether the server is in a normal working state;
[0140] If it is determined that the server is in a normal working state, the disk array mode to be tested is updated, and a stability test is performed on the server under the updated disk array mode.
[0141] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining test information in the disk array mode to be tested; and determining whether the server is in a normal working state according to the test information.
[0142] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the error information does not contain a preset abnormal value, determining whether the hardware information is consistent with the corresponding hardware parameters; if consistent, determining that the server is in a normal working state; if inconsistent, determining that the server is not in a normal working state.
[0143] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the error information contains a preset abnormal value, the error information corresponding to the preset abnormal value is output; or when the hardware information is inconsistent with the corresponding hardware parameters, the hardware information of the current test is output.
[0144] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining whether the number of tests reaches the target number; if not, returning to execute the step of performing a stability test on the server in the disk array mode to be tested after the server is powered off and restarted to determine whether the server is in a normal working state; if reached, continuing to execute the step of updating the disk array mode to be tested.
[0145] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining whether the server is in a normal working state, and if the server is in a normal working state, determining whether the server has completed the stability test in all disk array modes; if not, returning to execute the step of updating the disk array mode to be tested; if so, stopping the test.
[0146] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0147] Determine the disk array mode to be tested;
[0148] After the server is powered off and restarted, a stability test is performed on the server in the disk array mode to be tested to determine whether the server is in a normal working state;
[0149] If it is determined that the server is in a normal working state, the disk array mode to be tested is updated, and a stability test is performed on the server under the updated disk array mode.
[0150] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining test information under the disk array mode to be tested; and determining whether the server is in a normal working state according to the test information.
[0151] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the error information does not contain a preset abnormal value, determine whether the hardware information is consistent with the corresponding hardware parameters; if consistent, determine that the server is in a normal working state; if inconsistent, determine that the server is not in a normal working state.
[0152] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the error information contains a preset abnormal value, the error information corresponding to the preset abnormal value is output; or when the hardware information is inconsistent with the corresponding hardware parameters, the hardware information of the current test is output.
[0153] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining whether the number of tests reaches the target number; if not, returning to execute the step of performing a stability test on the server under the disk array mode to be tested after the server is powered off and restarted to determine whether the server is in a normal working state; if reached, continuing to execute the step of updating the disk array mode to be tested.
[0154] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining whether the server is in a normal working state, and if the server is in a normal working state, determining whether the server has completed the stability test in all disk array modes; if not, returning to the step of updating the disk array mode to be tested; if so, stopping the test.
[0155] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0156] Determine the disk array mode to be tested;
[0157] After the server is powered off and restarted, a stability test is performed on the server in the disk array mode to be tested to determine whether the server is in a normal working state;
[0158] If it is determined that the server is in a normal working state, the disk array mode to be tested is updated, and a stability test is performed on the server under the updated disk array mode.
[0159] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining test information under the disk array mode to be tested; and determining whether the server is in a normal working state according to the test information.
[0160] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the error information does not contain a preset abnormal value, determine whether the hardware information is consistent with the corresponding hardware parameters; if consistent, determine that the server is in a normal working state; if inconsistent, determine that the server is not in a normal working state.
[0161] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the error information contains a preset abnormal value, the error information corresponding to the preset abnormal value is output; or when the hardware information is inconsistent with the corresponding hardware parameters, the hardware information of the current test is output.
[0162] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining whether the number of tests reaches the target number; if not, returning to the step of performing a stability test on the server in the disk array mode to be tested after the server is powered off and restarted, and determining whether the server is in a normal working state; if so, continuing to execute the step of updating the disk array mode to be tested. In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining whether the server is in a normal working state, and if the server is in a normal working state, determining whether the server has completed the stability test in all disk array modes; if not, returning to the step of updating the disk array mode to be tested; if so, stopping the test.
[0163] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0164] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0165] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A server testing method, characterized in that: The method comprises: Determine the disk array mode to be tested; After the server is powered off and restarted, a stability test is performed on the server in the disk array mode to be tested to determine whether the server is in a normal working state; If it is determined that the server is in a normal working state, updating the disk array mode to be tested, and performing the stability test on the server under the updated disk array mode; The step of performing a stability test on the server in the disk array mode to be tested to determine whether the server is in a normal working state includes: Acquire test information of the disk array mode to be tested; Determine whether the server is in a normal working state according to the test information.
2. The method according to claim 1, characterized in that The test information includes link layer error information and hardware information, and determining whether the server is in a normal working state according to the test information includes: In the case that the error information does not include a preset abnormal value, determining whether the hardware information is consistent with the corresponding hardware parameters; If they are consistent, it is determined that the server is in a normal working state; If they are inconsistent, it is determined that the server is not in a normal working state.
3. The method according to claim 2, characterized in that The method further comprises: When the error information includes a preset abnormal value, outputting error information corresponding to the preset abnormal value; Alternatively, when the hardware information is inconsistent with the corresponding hardware parameters, the hardware information of the current test is output.
4. The method according to any one of claims 1 to 3, characterized in that: Before updating the disk array mode to be tested, the method further includes: Determine whether the number of tests reaches the target number; If not, returning to the step of performing a stability test on the server in the disk array mode to be tested after the server is powered off and restarted to determine whether the server is in a normal working state; If it is reached, then continue to execute the step of updating the disk array mode to be tested.
5. The method according to any one of claims 1 to 3, characterized in that: After performing the stability test on the server in the updated disk array mode, the method further includes: Determining whether the server is in a normal working state, and if the server is in a normal working state, determining whether the server completes the stability test in all disk array modes; If not, returning to the step of updating the disk array mode to be tested; If yes, stop the test.
6. A server testing device, characterized in that: The device comprises: A determination module, used for determining the disk array mode to be tested; A testing module, used for performing a stability test on the server in the disk array mode to be tested after the server is powered off and restarted, to determine whether the server is in a normal working state; An updating module, configured to update the disk array mode to be tested if it is determined that the server is in a normal working state, and perform the stability test on the server under the updated disk array mode; The test module includes an acquisition unit and a determination unit; The acquisition unit is used to acquire the test information in the disk array mode to be tested; The determining unit is used to determine whether the server is in a normal working state according to the test information.
7. The device according to claim 6, characterized in that The test information includes link layer error information and hardware information; the determination unit is specifically used to determine whether the hardware information is consistent with the corresponding hardware parameters when the error information does not contain a preset abnormal value; If they are consistent, it is determined that the server is in a normal working state; If they are inconsistent, it is determined that the server is not in a normal working state.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
