Methods and related devices for batch testing server stability
By configuring the server to send configuration files to multiple servers under test and analyzing hardware utilization, the problem of low efficiency in single-server stability testing in existing technologies is solved, and efficient and accurate stability testing of batch servers is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-19
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies are inefficient and produce inaccurate results when performing stability tests on a single server, making them unsuitable for stability testing of large numbers of servers.
The configuration server continuously sends configuration files to multiple servers under test, receives hardware utilization saturation, and stops sending configuration files when the conditions are met, thus entering the stability test run phase, receiving and analyzing stability parameters to determine the test results.
It improves the efficiency and accuracy of stability testing for the servers under test, reduces manual intervention, and realizes automated stability testing of batch servers.
Smart Images

Figure CN115665010B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of stability testing, and more specifically, to a method and related apparatus for batch testing the stability of servers. Background Technology
[0002] With the development and popularization of network technology, the application of various network technologies has long been deeply integrated into people's production and life. However, this has also brought about network failures such as network latency and network instability.
[0003] To address these network failures, network traffic analysis servers have emerged. These servers analyze network data packets to help network administrators quickly pinpoint the source of the problem. With their rapid development, network traffic analysis servers are widely used in critical industries such as network operators, finance, energy, and transportation to continuously monitor and analyze network data, ensuring the smooth operation of business operations and enabling rapid troubleshooting and restoration of network functionality.
[0004] Because network traffic analysis servers need to continuously record and analyze user network traffic, their stability is crucial. Insufficient server stability not only prevents timely and accurate identification of network problems but also hinders long-term stable monitoring of network operation. Consequently, when users experience slow network speeds or network inaccessibility, the server cannot provide timely assistance, leading to wasted user time and potentially significant financial losses. Therefore, to ensure network traffic analysis servers meet the application requirements of their respective scenarios, pre-testing of server stability is necessary before shipment.
[0005] Currently, most stability testing methods involve testing a single server by manually constructing traffic and configuration files, and then manually recording and analyzing the final test results. However, this approach is not easily reusable, constructing the test environment is time-consuming, and manual recording and analysis are prone to errors, making it unsuitable for stability testing of large-scale server products. Summary of the Invention
[0006] The purpose of this invention is to provide a method and related apparatus for batch testing server stability. The configuration server can distribute configuration files to multiple servers under test for unified stability testing. After the test is completed, it receives stability parameters returned by the servers under test for stability judgment, thereby improving the efficiency of stability testing of the servers under test and improving the accuracy of test result recording.
[0007] The embodiments of the present invention can be implemented as follows:
[0008] In a first aspect, the present invention provides a method for batch testing server stability, applied to a configuration server, wherein the configuration server is communicatively connected to multiple servers under test; the method includes:
[0009] For each of the servers under test, a configuration file is continuously sent to the server under test based on the test command, so that the server under test can perform real-time network traffic analysis based on the configuration file;
[0010] Receive the hardware utilization saturation reported periodically by the server under test;
[0011] When the hardware utilization saturation meets the first preset condition, stop issuing the configuration file so that the server under test can enter the stability test run phase.
[0012] Receive stability parameters fed back by the server under test after the stability test operation phase ends;
[0013] Based on the stability parameters and preset stability conditions, the stability test results of the server under test are determined.
[0014] In an optional implementation, the configuration server is also communicatively connected to a control device; prior to the step of continuously sending configuration files to each server under test based on test instructions, the method further includes:
[0015] When a packet sending instruction is received, a first test traffic is continuously sent to each of the servers under test; the transmission rate of the first test traffic increases periodically.
[0016] Receive the real-time traffic saturation feedback from each of the tested servers;
[0017] The control device receives the test command sent by the control device. The test command is generated by the control device in response to the user's test start operation after the traffic saturation of each of the tested servers meets the second preset condition.
[0018] In an optional implementation, after the step of receiving the real-time traffic saturation feedback from each of the tested servers, the method further includes:
[0019] For each of the servers under test, when the traffic saturation reaches the processing speed limit of the server under test, a second test traffic is continuously sent to the server under test until the stability test operation phase ends; wherein, the transmission rate of the second test traffic matches the processing speed limit.
[0020] In an optional implementation, the hardware utilization saturation includes at least one of CPU utilization, memory utilization, disk I / O utilization, and network bandwidth utilization.
[0021] Secondly, the present invention provides a method for batch testing server stability, applied to a server under test, wherein the server under test is communicatively connected to a configuration server; the method includes:
[0022] Receive configuration files continuously sent by the configuration server based on test commands, and perform real-time network traffic analysis based on the configuration files;
[0023] The configuration server periodically reports its own hardware utilization saturation to the configuration server; wherein, the configuration server stops issuing the configuration file when it detects that the hardware utilization saturation of each of the tested servers meets a first preset condition.
[0024] When the configuration file is no longer received, the stability test run phase begins.
[0025] After the stability test run phase is completed, stability parameters are sent to the configuration server so that the server under test can determine the stability test result based on the stability parameters and preset stability conditions.
[0026] In an optional implementation, the configuration server is also communicatively connected to a control device and multiple other servers under test; prior to the step of receiving configuration files continuously sent by the configuration server based on test commands, the method further includes:
[0027] The configuration server continuously sends first test traffic; the first test traffic is sent by the configuration server after receiving the packet sending instruction, and the transmission rate of the first test traffic gradually increases periodically.
[0028] The configuration server sends its own traffic saturation to the configuration server in real time; wherein, after the traffic saturation of each of the tested servers meets the second preset condition, the configuration server receives the test instruction sent by the control device, the test instruction being generated by the control device in response to the user's test start operation.
[0029] Thirdly, the present invention provides an apparatus for batch testing server stability, applied to a configuration server, wherein the configuration server is communicatively connected to multiple servers under test; the apparatus includes:
[0030] The first sending module is used to continuously send configuration files to each of the servers under test based on test instructions, so that the servers under test can perform real-time network traffic analysis based on the configuration files.
[0031] The first receiving module is used to receive the hardware utilization saturation reported periodically by the server under test.
[0032] The first sending module is further configured to stop sending the configuration file when the hardware utilization saturation meets the first preset condition, so that the server under test enters the stability test run phase;
[0033] The first receiving module is further configured to receive stability parameters fed back by the server under test after the stability test operation phase ends;
[0034] The analysis module is used to determine the stability test results of the server under test based on the stability parameters and preset stability conditions.
[0035] Fourthly, the present invention provides an apparatus for batch testing server stability, applied to a server under test, wherein the server under test is communicatively connected to a configuration server; the apparatus includes:
[0036] The second receiving module is used to receive the configuration file continuously sent by the configuration server based on the test command, and to perform real-time network traffic analysis based on the configuration file;
[0037] The second sending module is used to periodically report its own hardware utilization saturation to the configuration server; wherein, the configuration server stops sending the configuration file when it detects that the hardware utilization saturation of each of the tested servers meets the first preset condition.
[0038] The running module is used to enter the stability test running phase when the configuration file is no longer received;
[0039] The second sending module is further configured to send stability parameters to the configuration server after the stability test operation phase is completed, so that the server under test can determine the stability test result based on the stability parameters and preset stability conditions.
[0040] Fifthly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-readable instructions to implement the method as described in any of the foregoing embodiments.
[0041] In a sixth aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any of the foregoing embodiments.
[0042] Compared with existing technologies, this invention provides a method and related apparatus for batch testing server stability. It continuously sends configuration files to each server under test based on test commands, enabling the server to perform real-time network traffic analysis based on the configuration files. The method receives periodically reported hardware utilization saturation data from the servers under test, and stops sending configuration files when the hardware utilization saturation meets a first preset condition, allowing the servers under test to enter the stability test run phase. It receives stability parameters returned by the servers under test after the stability test run phase, and finally determines the stability test result of the servers under test based on the stability parameters and preset stability conditions. Its advantages are: by configuring a server to send configuration files to multiple servers under test for unified stability testing, and receiving stability parameters returned by the servers under test after the test for stability judgment, the efficiency of stability testing of servers under test is improved, and the accuracy of test result recording is increased. Attached Figure Description
[0043] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 This is a schematic diagram illustrating an application scenario of a method for batch testing server stability provided by an embodiment of the present invention.
[0045] Figure 2 This is one of the flowcharts illustrating a method for batch testing server stability provided in an embodiment of the present invention.
[0046] Figure 3 This is a second flowchart illustrating a method for batch testing server stability provided in an embodiment of the present invention.
[0047] Figure 4 This is the third flowchart illustrating a method for batch testing server stability provided in an embodiment of the present invention.
[0048] Figure 5 This is one of the structural schematic diagrams of a device for batch testing server stability provided in an embodiment of the present invention.
[0049] Figure 6 This is a second schematic diagram of a device for batch testing server stability provided in an embodiment of the present invention.
[0050] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0052] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0053] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, the terms "first," "second," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance. It should be noted that features in the embodiments of the present invention can be combined with each other unless otherwise specified.
[0054] Here, we will first introduce the application scenarios of the embodiments of the present invention. Please refer to [link to relevant documentation]. Figure 1 , Figure 1 This is a schematic diagram illustrating an application scenario of a method for batch testing server stability provided by an embodiment of the present invention.
[0055] The control device 10 is connected to the configuration server 20, and the configuration server 20 is connected to multiple servers under test 30.
[0056] Testers can use control device 10 to control configuration server 20 to uniformly construct the test environment of the server under test 30 in advance. After the test environment of all servers under test 30 is constructed, test commands are sent to configuration server 20 through control device, so that configuration server 20 continuously sends configuration files to each server under test. When the hardware utilization saturation of a certain server under test 30 is detected to meet the first preset condition, configuration server 20 stops sending configuration files so that the server under test 30 enters the stability test run phase. Finally, configuration server 20 can determine the stability test result of the server under test 30 based on the preset stability conditions and the stability parameters fed back by the server under test 30 after the stability test run phase.
[0057] It is understandable that the control device 10 can be the tester's personal computer, and the server under test 30 can be a network traffic analysis server. Figure 1 The three servers 30 shown are for illustrative purposes only; in actual applications, the number of servers 30 under test is unlimited.
[0058] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating a method for batch testing server stability according to an embodiment of the present invention. The execution entity of this method is the aforementioned configuration server, which is communicatively connected to multiple servers under test. The method includes the following steps S150 to S190:
[0059] S150. For each server under test, continuously send configuration files to the server under test based on test commands, so that the server under test can perform real-time network traffic analysis based on the configuration files.
[0060] In this embodiment, the server under test can be a network traffic analysis server. The configuration file can include a set of user-preconfigured custom rules to limit the network traffic that the server under test needs to analyze. Custom rules can include, but are not limited to, user-defined network segments, alarms, applications, transactions, etc. Once the test environment of the server under test is constructed (i.e., the network traffic of the server under test meets the standards), the server under test can start network traffic analysis after receiving the configuration file, such as performing network segment statistics, application statistics, alarm logs, etc.
[0061] In optional examples, the configuration file can include: a user-defined network segment (name: Company A, custom IP address range: 192.168.1.1-192.168.5.255), where packets with the IP address 192.168.1.103 are identified as belonging to the Company A network segment; a user-defined application (name: WEB Access; rule: port 80), where packets with port 80 are identified as the WEB Access application; and a user-defined transaction (name: xxx; rule: HOST field is www.xxx.com), where HTTP packets with the host field of www.xxx.com are identified as xxx. It should be noted that this example is for illustrative purposes only; in actual applications, the content of the configuration file should be based on the actual situation and is not limited here.
[0062] It is understandable that for the server under test, the more configurations in the configuration file, the more analysis data the server under test needs to generate, and correspondingly, the instability of the server under test will also increase.
[0063] S160: Receive the hardware utilization saturation reported periodically by the server under test.
[0064] In this embodiment, when the server under test receives the configuration file, it begins to perform real-time network traffic analysis based on the configuration file, records its own hardware utilization saturation, and reports the hardware utilization saturation to the configuration server at preset time intervals. For example, the server under test can record its own hardware utilization saturation and report it to the configuration server every minute.
[0065] It is understandable that the continuous distribution of configuration files will gradually increase the operating load of the server under test, which is specifically manifested in the gradual increase of hardware utilization saturation.
[0066] S170. When the hardware utilization saturation meets the first preset condition, stop issuing configuration files so that the server under test can enter the stability test run phase.
[0067] It is understood that hardware utilization saturation is a general term that can include at least one of the following: CPU utilization, memory utilization, disk I / O utilization, and network bandwidth utilization of the server under test. Accordingly, the first preset condition can be that each of the hardware utilization saturation parameters reaches its corresponding set threshold. In an optional example, the first preset condition could be: CPU utilization reaches a first set threshold of 85%, memory utilization reaches a second set threshold of 80%, disk I / O utilization reaches a third set threshold of 70%, and network bandwidth utilization reaches a fourth set threshold of 50%.
[0068] For the server under test, the stability test begins when it no longer receives configuration files. This stability test phase corresponds to a pre-configured runtime, which can be 7*24 hours or 3*24 hours, typically depending on the stability risk of the testing strategy.
[0069] S180: Receive stability parameters fed back by the server under test after the stability test operation phase is completed.
[0070] In this embodiment, during the stability test run, the server under test records its own stability parameters in real time, such as: uninterrupted running time, number of packet losses, number of crashes, fault recovery time, and performance margin. Performance margin refers to hardware utilization margin; for example, if CPU utilization is 85%, the CPU utilization margin is 100% - 85% = 15%. The same logic applies to memory utilization, disk I / O utilization, and network bandwidth utilization.
[0071] It is understandable that the end of the stability test run phase means the end of the stability test run time. At this time, the server under test will report its own stability run parameters at the end of the test to the configuration server.
[0072] For a server under test, the completion of its stability test is indicated by:
[0073] 1. Stability test run time has ended;
[0074] 2. During the stability test, the tested server did not experience any program crashes or freezes.
[0075] 3. During the stability test, the hardware utilization saturation of the tested server consistently met the first preset condition.
[0076] If any of the tested servers cannot meet the above three points, then the stability test of that server is actually incomplete, and the server under test is also unstable.
[0077] S190. Determine the stability test results of the server under test based on the stability parameters and preset stability conditions.
[0078] In the optional example, the preset stability conditions for the server under test can be: uninterrupted server uptime ≥ 72 hours, packet loss ≤ 10,000 packets / hour, number of crashes = 0, fault recovery time ≤ 1 hour, and all performance margins ≥ 20%. If all the above conditions are met, the server under test is considered to be stable. Conversely, if the number of crashes is 3, even if the other stability parameters meet the corresponding conditions, the server under test will be considered unstable.
[0079] This invention provides a method for batch testing server stability. For each server under test, configuration files are continuously sent based on test commands, enabling real-time network traffic analysis. The method receives periodic reports of hardware utilization saturation from the servers under test, and stops sending configuration files when a first preset condition is met, allowing the servers to enter the stability test run phase. Finally, the stability test results are determined based on preset stability conditions and stability parameters returned by the servers after the stability test run phase. This method, by sending configuration files to multiple servers under test via a configuration server for unified stability testing, and receiving stability parameters from the servers after the test for stability assessment, improves the efficiency of stability testing and the accuracy of test result recording.
[0080] It's important to note that the testing of each server under test is actually conducted synchronously. The configuration server also communicates with the control device. Once the configuration server receives the test command from the control device, it begins to continuously send configuration files to each server under test, gradually bringing each server into the stability test execution phase. However, due to performance differences between different servers under test, the timing of when each server enters the stability test execution phase may differ.
[0081] Meanwhile, in this embodiment of the invention, the stability test of the server under test includes two stages: the test environment construction stage and the stability test stage. The above steps S150 to S190 only describe the stability test stage from the perspective of a server under test.
[0082] Before the stability testing phase, it is necessary to construct a test environment for each server under test. The following describes the construction process of the test environment for the server under test.
[0083] Please see Figure 3 Before step S150, the method further includes steps S110 to S140.
[0084] S110. When a packet sending instruction is received, the first test traffic is continuously sent to each server under test.
[0085] In this embodiment, the packet sending command can be sent from the control device to the configuration server. The content indicated in the packet sending command may include: the device model of each server under test participating in this stability test, the extreme processing speed corresponding to each device model, the number of data packets sent per second, the number of sessions per second, the traffic type of the sent flow (i.e. the traffic type of the first test traffic), the packet sending speed, the packet sending cycle, etc.
[0086] In an optional example, the contents of a packet sending instruction may include, but are not limited to:
[0087] The maximum processing speed for a certain equipment model can be 10Gbps;
[0088] The number of data packets sent per second can reach 100wpps;
[0089] The number of sessions per second can be 1 million;
[0090] The types of traffic that are sent include HTTP (Hypertext Transfer Protocol) traffic, FTP (File Transfer Protocol) traffic, and VoIP (Voice over Internet Protocol) traffic;
[0091] The packet sending speed is the original speed, or the original speed multiplied by a multiple of s, or the packet sending speed is the maximum speed.
[0092] The packet sending cycle is 1 round or N rounds (the packet sending cycle can represent the number of servers being tested).
[0093] Due to performance limitations, some services under test may become unstable when the configuration server sends traffic at low rates, even before reaching the server's traffic saturation. For example, a server with the NG3000 model has a traffic saturation of 8Gbps, but its memory may be full or the system may crash when the traffic reaches 3Gbps. Therefore, to prevent the server under test from being directly overwhelmed by traffic sent by the configuration server, causing system crashes or memory exhaustion, the transmission rate of the initial test traffic is increased periodically.
[0094] S120: Receive the real-time traffic saturation feedback from each tested server.
[0095] During the test environment setup phase, each server under test will report its own traffic saturation to the configuration server in real time.
[0096] S130: Receive test commands sent by the control equipment.
[0097] In this embodiment, the test command is generated by the control device in response to the user's test initiation operation after the traffic saturation of each tested server meets the second preset condition. It can be understood that the second preset condition may be that the traffic saturation reaches a set traffic threshold, and the configuration server pre-stores a traffic extreme value table, which may include the processing speed extreme value corresponding to each tested server. In an optional example, the configuration server can obtain the processing speed extreme value corresponding to each tested server from the packet sending command sent by the control device and save it to the traffic extreme value table.
[0098] It can be understood that test instructions are the various test environment parameters set by the testers to achieve the goals of this round of stability testing. Test environment parameters may include: the version of this round of stability testing, the type of traffic sent (i.e., the traffic type of the second test traffic), the configuration file type, the number of configuration files, the stability run time, etc.
[0099] Based on the real-time traffic saturation feedback from each tested server, once the traffic saturation of all tested servers meets the second preset condition, the configuration server can determine that the test environment for each tested server has been constructed, and can start stability testing based on test commands and begin distributing configuration files.
[0100] The configuration server can inform the control device that the test environment for each server under test has been constructed. Then, the tester can generate a test start operation on the control device, which will then generate test instructions and send them to the configuration server to begin subsequent stability testing.
[0101] S140. For each server under test, when the traffic saturation reaches the processing speed limit of the server under test, continuously send a second test traffic to the server under test until the stability test run ends.
[0102] In this embodiment, the transmission rate of the second test traffic is matched with the extreme value of the processing speed. The second test traffic may include different data packets constructed by the configuration server. The server under test can perform traffic analysis on these different data packets during the stability test operation phase, and the server under test is running at full load.
[0103] It should be noted that for a given server under test, the moment the configuration server receives the test command may coincide with the moment when the server's own traffic saturation reaches its processing speed limit, or the two may occur in any order. Correspondingly, the execution order of steps S130 and S140 above is not fixed. Figure 3 The figures shown are limitations; the actual test results shall prevail.
[0104] The following is a simple example illustrating the construction of a test environment.
[0105] In an optional example, for a single server under test, the traffic threshold can be set to 80% of the server's maximum processing speed. In this case, assuming the maximum processing speeds of servers A, B, and C are 20Gbps, 10Gbps, and 8Gbps respectively, then their corresponding traffic thresholds would be 16Gbps, 8Gbps, and 6.4Gbps respectively.
[0106] The transmission rate at which the server sends the first test traffic to the server under test C at various times can be configured as follows:
[0107] In the first minute: the speed increased from an initial 1 Mbps to 10 Mbps;
[0108] At the 10th minute: Increased to 100Mbps;
[0109] At the 100th minute: Increased to 1Gbps;
[0110] 500th minute: Increased to 5Gbps;
[0111] 800 minutes: Increased to 8Gbps.
[0112] When the speed is increased to 8Gbps, the transmission rate of the second test traffic sent by the configuration server to the server under test C is already 8Gbps, and the traffic type in the second test traffic changes continuously according to the test requirements (e.g., traffic of different protocol types / packet lengths).
[0113] The process of configuring the server to send traffic to the tested servers A and B is similar to the above, and will not be described in detail here.
[0114] It should be noted that during the stability testing phase described above, the configuration file distributed to each server under test can be the same version, thus avoiding the need to manually add or modify content to the configuration file for each server under test.
[0115] Initially, the control device can send test scripts to the configuration server, and the configuration server can then send monitoring scripts to each server under test.
[0116] After configuring the server to run the test script, it can execute packet sending commands sent by the control device to continuously send the first test traffic and the second test traffic to the corresponding server under test through the stored server model and traffic extreme value table; it can also execute test commands sent by the control device to continuously send configuration files to each server under test. Upon receiving feedback information returned by the server under test during the stability test run, it adjusts the distribution of configuration files and traffic based on the feedback information.
[0117] After the server under test runs the monitoring script, it can record its own traffic saturation in real time and report its own traffic saturation to the configuration server in real time; it can record its own hardware utilization saturation and report the hardware utilization saturation to the configuration server in the form of logs at preset time intervals; it can record its own stability parameters in real time and report the stability parameters to the configuration server after the stability test run phase is completed; it can collect product anomaly logs and files and report them to the configuration server every 1 minute.
[0118] The above-described embodiment of the method for batch testing server stability describes the process of batch testing the stability of servers under test, with the configuration server as the execution subject.
[0119] Based on the above, the following describes a method for batch testing server stability, using the server under test as the execution subject. It should be noted that its basic principle and the resulting technical effects are the same as or similar to those in the aforementioned embodiments. For the sake of brevity, parts not mentioned in this embodiment can be referred to the corresponding content in the above embodiments.
[0120] Please see Figure 4 , Figure 4This is a flowchart illustrating another method for batch testing server stability according to an embodiment of the present invention. The method is applied to the server under test, which is communicatively connected to a configuration server. The method includes the following steps S230–S260:
[0121] S230: Receive configuration files continuously sent by the configuration server based on test commands, and perform real-time network traffic analysis based on the configuration files.
[0122] S240: Periodically report its own hardware utilization saturation to the configuration server.
[0123] It is understandable that the configuration server stops issuing configuration files when it detects that the hardware utilization saturation of all tested servers meets the first preset condition.
[0124] S250: When no more configuration files are received, the system enters the stability test run phase.
[0125] S260. After the stability test run phase is completed, send stability parameters to the configuration server so that the server under test can determine the stability test results based on the stability parameters and preset stability conditions.
[0126] The method for batch testing server stability provided in this invention allows the server under test to perform real-time network traffic analysis directly based on the configuration file sent by the configuration server, and periodically report its hardware utilization saturation to the configuration server. When no more configuration files are received, the system enters the stability test execution phase. After the stability test execution phase, stability parameters are sent to the configuration server so that the server under test can determine the stability test results based on the stability parameters and preset stability conditions. This unified and automated stability testing of each server under test improves the efficiency of stability testing and the accuracy of test result recording.
[0127] In an optional implementation, the configuration server also communicates with the control device and multiple other servers under test. Prior to step S230, the method further includes the following steps S210 to S220:
[0128] S210: Receive the first test traffic continuously sent by the configuration server.
[0129] It is understandable that the first test traffic is sent after the configuration server receives the packet sending instruction, and the transmission rate of the first test traffic gradually increases periodically.
[0130] S220: Send its own traffic saturation to the configuration server in real time.
[0131] It is understandable that after the traffic saturation of each tested server meets the second preset condition, the configuration server receives the test command sent by the control device. The test command is generated by the control device in response to the user's test start operation.
[0132] It should be noted that the execution order of each step in the above method embodiments is not limited to that shown in the attached figures, and the execution order of each step shall be subject to the actual application situation.
[0133] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0134] The configuration file distributed to each server under test can be the same version, avoiding the need to manually add or modify content in the configuration file for each server under test.
[0135] It saves manpower and improves the accuracy of stability testing. By automatically recording and reporting the traffic saturation and hardware utilization saturation of each server under test, the workload of manual intervention and debugging is reduced, thus improving the accuracy of test conclusions. Batch testing of servers under test can be performed, improving the efficiency of stability testing.
[0136] In order to perform the corresponding steps in the above method embodiments and various possible implementations, two implementation methods of a device for batch testing server stability applied to a configuration server and a server under test are given below.
[0137] Please see Figure 5 , Figure 5 This diagram illustrates the structure of an apparatus for batch testing server stability according to an embodiment of the present invention. The apparatus 100 is applied to a configuration server, which is communicatively connected to multiple servers under test. The apparatus includes: a first sending module 110, a first receiving module 120, and an analysis module 130.
[0138] The first sending module 110 is used to continuously send configuration files to each server under test based on test commands, so that the server under test can perform real-time network traffic analysis based on the configuration files.
[0139] The first receiving module 120 is used to receive the hardware utilization saturation reported periodically by the server under test.
[0140] The first sending module 110 is also used to stop sending the configuration file when the hardware utilization saturation meets the first preset condition, so that the server under test can enter the stability test run phase.
[0141] The first receiving module 120 is also used to receive stability parameters fed back by the server under test after the stability test operation phase is completed.
[0142] Analysis module 130 is used to determine the stability test results of the server under test based on stability parameters and preset stability conditions.
[0143] In an optional implementation, the configuration server is also communicatively connected to the control device. The first sending module 110 can also be used to: continuously send first test traffic to each server under test upon receiving a packet sending instruction; the transmission rate of the first test traffic increases periodically. The first receiving module 120 can also be used to: receive real-time traffic saturation feedback from each server under test; and receive test instructions sent by the control device, which are generated by the control device in response to a user's test initiation operation after the traffic saturation of each server under test meets a second preset condition.
[0144] In an optional implementation, the first sending module 110 may also be used to: for each server under test, when the traffic saturation reaches the processing speed limit of the server under test, continuously send a second test traffic to the server under test until the stability test operation phase ends; wherein the transmission rate of the second test traffic matches the processing speed limit.
[0145] In an optional implementation, hardware utilization saturation may include at least one of the CPU utilization, memory utilization, disk I / O utilization, and network bandwidth utilization of the server under test. Accordingly, the first preset condition may be that each of the hardware utilization saturation parameters reaches its corresponding set threshold.
[0146] Please see Figure 6 , Figure 6 A schematic diagram of another apparatus for batch testing server stability provided by an embodiment of the present invention is shown. This apparatus 200 for batch testing server stability is applied to a server under test, which is communicatively connected to a configuration server. The apparatus includes: a second receiving module 210, a second sending module 220, and an operating module 230.
[0147] The second receiving module 210 is used to receive configuration files continuously sent by the configuration server based on test commands, and to perform real-time network traffic analysis based on the configuration files.
[0148] The second sending module 220 is used to periodically report its own hardware utilization saturation to the configuration server; wherein, the configuration server stops sending configuration files when it detects that the hardware utilization saturation of each tested server meets the first preset condition.
[0149] Run module 230 to enter the stability test run phase when no more configuration files are received.
[0150] The second sending module 220 is also used to send stability parameters to the configuration server after the stability test operation phase is completed, so that the server under test can determine the stability test result based on the stability parameters and preset stability conditions.
[0151] In an optional implementation, the configuration server is also communicatively connected to the control device and multiple other servers under test. The second receiving module 210 can also be used to: receive a first test traffic continuously sent by the configuration server; the first test traffic is sent by the configuration server after receiving a packet sending instruction, and the transmission rate of the first test traffic gradually increases periodically;
[0152] The second sending module 2200 can also be used to: send its own traffic saturation to the configuration server in real time; wherein, after the traffic saturation of each tested server meets the second preset condition, the configuration server receives the test command sent by the control device, and the test command is generated by the control device in response to the user's test start operation.
[0153] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device 100 or 200 for batch testing server stability described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0154] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 300 includes a processor 310, a memory 320, and a bus 330, with the processor 310 connected to the memory 320 via the bus 330.
[0155] Memory 320 can be used to store software programs, for example, Figure 5 or Figure 6The apparatus shown is for batch testing the stability of servers. The memory 320 can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Flash Memory, Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The processor 310 can be an integrated circuit chip with signal processing capabilities.
[0156] The processor 310 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0157] The memory 320 stores machine-readable instructions executable by the processor 310. When the processor 310 executes the machine-readable instructions, it implements any of the methods for batch testing server stability disclosed in the above embodiments.
[0158] It is understood that the electronic device 300 can be the configuration server or the server under test mentioned above. Figure 7 The structure shown is for illustrative purposes only; the electronic device 300 may also include components that are more advanced than those shown. Figure 7 The more or fewer components shown, or having the same Figure 7 The different configurations shown. Figure 7 The components shown can be implemented using hardware, software, or a combination thereof.
[0159] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, this computer program implements any of the methods for batch testing server stability disclosed in the above embodiments. The readable storage medium can be, but is not limited to, various media capable of storing program code, such as USB flash drives, external hard drives, ROM, RAM, PROM, EPROM, EEPROM, FLASH disks, or optical discs.
[0160] In summary, this invention provides a method and related apparatus for batch testing server stability. It continuously sends configuration files to each server under test based on test commands, enabling the server to perform real-time network traffic analysis based on the configuration files. The method receives periodically reported hardware utilization saturation data from the servers under test, and stops sending configuration files when a first preset condition is met, allowing the server to enter the stability test run phase. Finally, based on preset stability conditions and stability parameters returned by the servers under test after the stability test run phase, the stability test result is determined. This method, by configuring a server to send configuration files to multiple servers under test for unified stability testing, and receiving stability parameters returned by the servers after the test for stability assessment, improves the efficiency of stability testing and increases the accuracy of test result recording.
[0161] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for batch testing server stability, characterized in that, The method is applied to a configuration server, which is communicatively connected to a control device and multiple servers under test, each of which is used for network traffic analysis; the method includes: When a packet sending command is received from the control device, a first test traffic is continuously sent to each of the servers under test; the transmission rate of the first test traffic increases periodically. Receive the real-time traffic saturation feedback from each of the tested servers; The control device receives the test command sent by the control device. The test command is generated by the control device in response to the user's test start operation after the traffic saturation of each of the tested servers has reached its own set traffic threshold. For each of the servers under test, when the traffic saturation reaches the processing speed limit of the server under test, a second test traffic is continuously sent to the server under test until the stability test operation phase ends; wherein, the transmission rate of the second test traffic matches the processing speed limit. For each of the servers under test, a configuration file is continuously sent to the server under test based on the test instructions, so that the server under test can perform real-time network traffic analysis based on the configuration file; the configuration file sent each time is used to indicate the network traffic that the server under test needs to analyze. Receive the hardware utilization saturation reported periodically by the server under test; When the hardware utilization saturation meets the first preset condition, stop issuing the configuration file so that the server under test can enter the stability test run phase. Receive stability parameters fed back by the server under test after the stability test operation phase ends; Based on the stability parameters and preset stability conditions, the stability test results of the server under test are determined.
2. The method according to claim 1, characterized in that, The hardware utilization saturation includes at least one of CPU utilization, memory utilization, disk I / O utilization, and network bandwidth utilization.
3. A method for batch testing server stability, characterized in that, The method is applied to a server under test, which is communicatively connected to a configuration server; the configuration server is also communicatively connected to a control device and multiple other servers under test, each of which is used for network traffic analysis; the method includes: The configuration server continuously sends first test traffic; the first test traffic is sent by the configuration server after receiving the packet sending instruction issued by the control device, and the transmission rate of the first test traffic gradually increases periodically. The configuration server sends its own traffic saturation to the configuration server in real time; wherein, when the configuration server receives the test command sent by the control device, it indicates that the traffic saturation of each of the tested servers has reached its own set traffic threshold, and the test command is generated by the control device in response to the user's test start operation; The configuration server continuously sends a second test traffic; wherein the transmission rate of the second test traffic matches the processing speed limit; the second test traffic is sent by the configuration server when the traffic saturation of the server under test reaches the corresponding processing speed limit, and stops being sent until the end of the stability test run phase. The system receives configuration files continuously sent by the configuration server based on the test instructions, and performs real-time network traffic analysis based on the configuration files; each received configuration file is used to indicate the network traffic that needs to be analyzed. The configuration server periodically reports its own hardware utilization saturation to the configuration server; wherein, the configuration server stops issuing the configuration file when it detects that the hardware utilization saturation of each of the tested servers meets a first preset condition. When the configuration file is no longer received, the stability test run phase begins. After the stability test run phase is completed, stability parameters are sent to the configuration server so that the server under test can determine the stability test result based on the stability parameters and preset stability conditions.
4. An apparatus for batch testing server stability, characterized in that, An apparatus is used to configure a server, which is communicatively connected to a control device and multiple servers under test, each of which is used for network traffic analysis; the apparatus includes: The first sending module is configured to continuously send a first test flow to each of the servers under test when it receives a packet sending instruction from the control device; the transmission rate of the first test flow increases periodically. The first receiving module is used to receive the real-time traffic saturation feedback from each of the tested servers; and to receive the test command sent by the control device, wherein the test command is generated by the control device in response to the user's test start operation after the traffic saturation of each of the tested servers has reached its own set traffic threshold. The first sending module is further configured to, for each of the servers under test, continuously send a second test traffic to the server under test until the stability test operation phase ends when the traffic saturation reaches the processing speed limit of the server under test; wherein, the transmission rate of the second test traffic matches the processing speed limit. The first sending module is further configured to continuously send a configuration file to each of the servers under test based on the test instructions, so that the servers under test can perform real-time network traffic analysis based on the configuration file; the configuration file sent each time is used to indicate the network traffic that the servers under test need to analyze. The first receiving module is also used to receive the hardware utilization saturation reported periodically by the server under test; The first sending module is further configured to stop sending the configuration file when the hardware utilization saturation meets the first preset condition, so that the server under test enters the stability test run phase; The first receiving module is further configured to receive stability parameters fed back by the server under test after the stability test operation phase ends; The analysis module is used to determine the stability test results of the server under test based on the stability parameters and preset stability conditions.
5. An apparatus for batch testing server stability, characterized in that, It is applied to the server under test, which is in communication connection with the configuration server; The configuration server is also communicatively connected to the control device and multiple other servers under test, each of which is used for network traffic analysis; the device includes: The second receiving module is used to receive the first test traffic continuously sent by the configuration server; the first test traffic is sent by the configuration server after receiving the packet sending instruction issued by the control device, and the transmission rate of the first test traffic gradually increases periodically. The second sending module is used to send its own traffic saturation to the configuration server in real time; wherein, when the configuration server receives the test instruction sent by the control device, it indicates that the traffic saturation of each of the tested servers has reached its own set traffic threshold, and the test instruction is generated by the control device in response to the user's test start operation; The second receiving module is further configured to receive the second test traffic continuously sent by the configuration server; wherein the transmission rate of the second test traffic matches the processing speed extreme value; the second test traffic is started by the configuration server when the traffic saturation of the server under test reaches the corresponding processing speed extreme value, and stops being sent until the end of the stability test run phase; The second receiving module is also used to receive the configuration file continuously sent by the configuration server based on the test command, and to perform real-time network traffic analysis based on the configuration file; The second sending module is further configured to periodically report its own hardware utilization saturation to the configuration server; wherein, the configuration server stops sending the configuration file when it detects that the hardware utilization saturation of each of the tested servers meets the first preset condition; The running module is used to enter the stability test running phase when the configuration file is no longer received; The second sending module is further configured to send stability parameters to the configuration server after the stability test operation phase is completed, so that the server under test can determine the stability test result based on the stability parameters and preset stability conditions.
6. An electronic device, characterized in that, include: A memory and a processor, the memory storing machine-readable instructions executable by the processor, which, when the electronic device is in operation, are executed by the processor to implement the method as described in any one of claims 1-2 or 3.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1-2 or 3.
Citation Information
Patent Citations
Performance test system and method
CN102075384A
Load testing method, device and system, storage medium and pressure measurement server
CN107480015A