Network card pressure test method and server

Obtain the network port information files of other servers through the first server, automatically form a network card stress test group, and use switch connections for testing, which solves the problem of requiring additional hosts and hardware equipment in the existing technology, and realizes the automation and cost of network card stress testing. save.

CN118612104APending Publication Date: 2024-09-06XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410683513.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

When performing network card stress testing in a server system, additional hosts and hardware equipment are required, increasing hardware and software costs.

Method used

Obtain the network port information files of other servers through the first server, automatically form a network card stress test group, and use switch connections for testing, avoiding the use of external equipment, and realizing automated testing processes and result judgments.

Benefits of technology

Without increasing hardware equipment and hardware performance, the purpose of network card stress testing is achieved, hardware and software costs are saved, and testing efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118612104A
    Figure CN118612104A
Patent Text Reader

Abstract

The network card pressure testing method comprises the steps that a first server obtains a first network port information file of at least one second server; the first network port information file is used for identifying that the second server can participate in a network card pressure test; the first server determines a third server from the at least one second server according to a second network port information file of the first server and the acquired first network port information file; and the first server performs pressure testing on the network cards on the first server and the third server. When the network card pressure test is carried out, hardware equipment and hardware performance requirements do not need to be additionally added, and the hardware and software cost in the network card pressure test process is saved under the condition that the purpose of the network card pressure test is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of servers, and in particular to a network card testing method and a server. Background Art

[0002] The network card is an essential module for the server system. It is used to realize data transmission between server systems and is also the main function of the server system. Therefore, whether in the product development stage or in the production delivery stage, it is necessary to conduct targeted tests on the performance of the network card and network link deployed in the server system. Among them, the most important test item is the network card stress test.

[0003] Generally, when stress testing the network cards deployed in the server system, an additional host needs to be provided and a preset program needs to be run on the host to confirm the test status, form a test team, control the test process and confirm the test results, which increases the hardware cost and system maintenance cost. Summary of the invention

[0004] The embodiment of the present application provides a network card stress testing method and server. When performing a network card stress test, there is no need to add additional hardware equipment and hardware performance requirements. While achieving the purpose of the network card stress test, the hardware and software costs in the network card stress testing process are saved.

[0005] In the first aspect, the embodiment of the present application provides a network card stress test method, which is applied to a first server, and the method includes: the first server obtains a first network port information file of at least one second server; the first network port information file is used to identify that the second server can participate in the network card stress test; the first server determines a third server from at least one second server according to the second network port information file of the first server and the obtained first network port information file; the first server performs a stress test on the network cards on the first server and the third server. Wherein, the first server is connected to the second server through a switch.

[0006] In this solution, when performing a network card stress test, the first server can automatically obtain the network port information files corresponding to other servers, and automatically form a network card stress test group based on the obtained network port information files, and automatically perform a network card stress test. That is, in this solution, when performing a network card stress test, no additional terminal equipment is required to test the server team, control the test process and test results, and save hardware and software costs.

[0007] In a possible implementation, a first server obtains a first network port information file of at least one second server, including: the first server obtains first information, the first information carries an Internet Protocol (IP) address of a management port of a switch connected to the first server, and the IP address of the management port is used to log in to the switch; the first server obtains second information from the switch, the second information includes an IP address and / or a media access control (MAC) address of a network port of at least one second server; the first server obtains the first network port information file of at least one second server based on the IP address and / or MAC address of the network port of at least one second server.

[0008] That is to say, when the first server obtains the network port information files corresponding to other servers, the first server can obtain the IP address of the switch management network port by obtaining the LLDP message sent by the switch connected to the first server. Then, the first server logs in to the switch according to the obtained IP address, and obtains the IP address and / or MAC address of the network port of the server connected to the port stored in the switch port. The first server can obtain the network port information files corresponding to other servers according to the obtained IP addresses and / or MAC addresses of the network ports of other servers. Through the obtained network port information files, each server can be tested in a team, avoiding the control of the test team through external devices and saving hardware costs.

[0009] In a possible implementation, IP addresses are respectively allocated to each network port of the network card of the first server and each network port of the network card of at least one second server through an electronic device.

[0010] In a possible implementation, the first server determines a third server from at least one second server based on the second network port information file of the first server and the acquired first network port information file, including: the first server sorts the first network port information file and the second network port information file according to the generation time of the first network port information file and the second network port information file respectively carried in the first network port information file and the second network port information file; and determines the third server from at least one second server according to the sorting.

[0011] That is, the first server can automatically implement network port stress test teaming according to the obtained network port information files corresponding to each second server, thereby avoiding the need for external equipment to control the test teaming and saving hardware costs.

[0012] In one possible implementation, before the first server performs stress testing on the network cards on the first server and the third server, the method also includes: a receiving port on the first server receives a first data packet sent by a sending port on the third server; and when the receiving port on the first server receives the first data packet, triggering the first server to start a network card stress test.

[0013] That is, during the process of starting the network card stress test, the network port on the first server as the receiving end needs to receive the data packet sent by the network port on the third server as the sending end, so as to ensure that the communication between the network ports of the first server and the third server is smooth.

[0014] In a possible implementation, the first server generates a second network port information file of the first server according to the IP address of the network port of the first server and the test status flag, wherein the second network port information file includes the time when the network port information file was generated in the first server. Similarly, the second server generates a first network port information file of the second server according to the IP address of the network port of the second server and the test status flag, wherein the first network port information file includes the time when the network port information file was generated in the second server.

[0015] In one possible implementation, before the first server performs stress testing on the network cards on the first server and the third server, the method also includes: the sending port on the first server sends a second data packet to the receiving port on the third server; when the receiving port on the first server receives third information, the first server is triggered to start the network card stress test, and the third information is used to identify that the second data packet is received by the third server.

[0016] That is to say, during the process of starting the network card stress test, the network port of the first server as the receiving end also needs to receive data packets sent by the network port of the third server as the sending end, so as to ensure that the communication between the network ports of the first server and the third server is smooth.

[0017] In a possible implementation, after triggering the first server to start the network card stress test, the method further includes: updating a test status flag on the first server stored in the second network port information file.

[0018] That is to say, when performing network card stress testing on the entire cabinet server, for the server that has started the network card stress test, it is necessary to update the network port information file corresponding to the server to avoid the server that has started the network card stress test from forming a test group with other servers that have started the network card stress test.

[0019] In one possible implementation, the first server performs a stress test on the network cards on the first server and the third server, including: detecting the communication rate of each network port on the first server and the third server; if the communication rate of a network port in the first server or the third server is lower than a set communication rate threshold, determining that the network card stress test between the first server and the third server has failed.

[0020] That is to say, when judging the network card stress test results of the first server and the third server, a communication rate threshold can be preset. If the communication rate of any network port on the first server and the third server is lower than the preset communication rate threshold, it can be considered that the network card stress test between the first server and the third server has failed. By detecting the communication rate of the network port to be tested, the automatic judgment of the network card stress test result is achieved.

[0021] In a possible implementation, after determining that the network card stress tests of the first server and the third server have failed, the method further includes: performing single-node tests on the first server and the third server respectively to determine the server where the abnormal network card is located.

[0022] That is, if the network card stress test between the first server and the third server fails, the server where the abnormal network card is located can be further determined by performing single-node tests on the first server and the third server, which is convenient for subsequent operation and maintenance personnel to handle.

[0023] In a possible implementation, the first network port information file and the second network port information file contain the same type of information; the first network port information file includes: the IP address of the network port, the MAC address of the network port, the network port test status flag, and the generation time of the network port information file.

[0024] In a possible implementation, the first network port information file may include: the IP address of the network port, a network port test status flag, and the generation time of the network port information file.

[0025] In a possible implementation, the first network port information file may include: a MAC address of the network port, a network port test status flag, and a generation time of the network port information file.

[0026] In a second aspect, an embodiment of the present application provides a server, including:

[0027] at least one memory for storing a program;

[0028] At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method described in the first aspect or any possible implementation manner of the first aspect.

[0029] In a third aspect, an embodiment of the present application provides a computer storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the method described in the first aspect or any possible implementation of the first aspect.

[0030] In a fourth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method described in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0032] Figure 1a and Figure 1b A schematic diagram of an application scenario provided for an embodiment of the present application;

[0033] Figure 2 A schematic diagram of the structure of a whole cabinet server provided in an embodiment of the present application;

[0034] Figure 3 A schematic diagram of a test network topology in a whole cabinet server provided in an embodiment of the present application;

[0035] Figure 4 A schematic diagram of the structure of a network card stress testing system provided in an embodiment of the present application;

[0036] Figure 5 A schematic diagram of a network card stress test process provided in an embodiment of the present application;

[0037] Figure 6a A schematic diagram of a process of performing environment deployment on a server node in a whole cabinet server by a terminal device provided in an embodiment of the present application;

[0038] Figure 6b A schematic diagram of a process of generating a network port information file 1 by a server 1 provided in an embodiment of the present application;

[0039] Figure 6c A schematic diagram of a process for a server 1 to obtain a network port information file 2 corresponding to a server 2 provided in an embodiment of the present application;

[0040] Figure 7 A schematic diagram of a network topology of a network card stress test group provided in an embodiment of the present application;

[0041] Figure 8 A flowchart of a network card stress testing method provided in an embodiment of the present application;

[0042] Fig. 9 A flowchart of a network card stress testing method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0044] In the description of the embodiments of the present application, any embodiment or design scheme of "exemplary", "for example" or "for example" should not be understood as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.

[0045] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprises", "has" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0046] Before introducing the embodiments of the present application, the terms in the embodiments of the present application are first introduced.

[0047] NIC stress test: A test item for NIC performance. Run a tool in the computer operating system to generate virtual data, and transmit the data from a port specified by the NIC to other NIC ports in the LAN or other ports of the NIC. The performance of the NIC is characterized by comparing the measured NIC transmission data rate with the nominal value.

[0048] The IP performance measurements (I perf) tool can test the maximum transmission control protocol (TCP) and user datagram protocol (UDP) bandwidth performance. It has multiple parameters and UDP characteristics that can be adjusted as needed, and can report bandwidth, delay jitter and packet loss.

[0049] The network performance measurement tool (Netperf) is mainly used for transmission based on TCP or UDP. Netperf can perform different modes of network performance testing, namely bulk data transfer mode and request / response mode, depending on the application. The netperf test results reflect how fast a system can send data to another system, and how fast another system can receive data.

[0050] Next, embodiments of the present application are introduced.

[0051] Generally, when stress testing the server network cards in the entire cabinet, it is necessary to use a separate control terminal to obtain the server node information in the LAN in real time, and sort the server nodes that enter the network card stress test project in the chronological order of entering the network card stress test project, and allocate test groups from top to bottom and control the server nodes that have successfully formed a team to start the network card stress test.

[0052] Although this method can realize stress testing of the network cards in the entire cabinet server, it requires the provision of an additional host, and the need to run a preset program on the host to confirm the test status, test team, test process control and test result confirmation, which increases the hardware cost and system maintenance cost.

[0053] In view of this, an embodiment of the present application provides a network card stress testing method.

[0054] This method can be used to Figure 1a The network card of the server node in the whole cabinet server shown in the figure can also be used to stress test Figure 1b The network card of the server node in the server cluster shown in the figure is subjected to stress test. The server cluster includes multiple servers (e.g. Figure 1b Servers 301 to 304 shown) and one or more switches (eg Figure 1b The servers and switches in the server cluster can be connected and communicated with each other through a local area network.

[0055] for Figure 1a Any server node in the rack server shown, or Figure 1bAny server node in the server cluster shown in the figure can automatically detect the Internet Protocol (IP) address, Media Access Control (MAC) address and corresponding switch port number and other information of all server nodes in the whole cabinet server or server cluster that can normally communicate on the network. Then, the server node selects a server node to form a test group according to the test status of the detected server node and starts the network card stress test. Finally, the server node monitors the data flow of the network port throughout the process and judges the test result according to the flow rate. The purpose of the network card stress test is achieved without adding additional hardware equipment and hardware performance requirements, saving the hardware and software costs in the network card stress test process.

[0056] Below Figure 1a The scenario of the whole cabinet server shown in FIG. 1 is taken as an example for specific description. It can be understood that the network card stress testing method provided in the embodiment of the present application is applied to Figure 1a The scenario shown can be applied in the R&D test scenario of the whole cabinet server, and can also be applied in the production test scenario of the whole cabinet server.

[0057] For example, Figure 1a A schematic diagram of an application scenario provided by an embodiment of the present application is shown. Figure 1a As shown, it includes: a whole cabinet server 100 and an electronic device 200. The electronic device 200 can be communicatively connected with each server node in the whole cabinet server 100. The electronic device 200 can include a terminal device or a server and other devices.

[0058] In the process of stress testing the network card on the server node in the whole cabinet server 100, the electronic device 200 can be configured with a dynamic host configuration protocol (DHCP) and a preboot execution environment (PXE), that is, the electronic device 200 can be deployed as a DHCP server and a PXE server. Among them, PXE is a computer network protocol that allows a client to download a boot image from a remote server through a network and load installation files or the entire operating system. In an embodiment of the present application, each server node in the whole cabinet server 100 can download a boot image from the terminal device 100 through the network, and load installation files or the entire operating system in the server node.

[0059] DHCP is a network protocol for a local area network. It uses the UDP protocol and uniformly uses two ports assigned by the Internet Assigned Numbers Authority (IANA): 67 (server side) and 68 (client side). DHCP is usually used in a local area network environment. Its main function is to centrally manage and allocate IP addresses, so that the client (cl ient) can dynamically obtain information such as IP addresses, Gateway addresses, DNS server addresses, and can improve the utilization rate of addresses. In an embodiment of the present application, the electronic device 200 can be used as a DHCP server, and each server node in the whole cabinet server 100 can be used as a DHCP client. When the network port on each server node in the whole cabinet server 100 is configured as a DHCP mode, the electronic device 200 can automatically allocate IP addresses to the network ports on each server node in the whole cabinet server 100, and automatically deploy the test software package for stress testing the network port to the operating system (OS) of each server node. Among them, the test software package includes a network card test program.

[0060] It is understandable that the electronic device 200 can only participate in the deployment of the test environment for the stress test of the network card in the whole cabinet server 100, and does not participate in the stress test process of the network card in the whole cabinet server 100. In the embodiment of the present application, when the network card in the whole cabinet server 100 is subjected to stress test, each server node in the whole cabinet server 100 automatically executes the network card test program, starts the test, and the network card test program runs independently in each server node to be tested. Figure 1a The number of switches 110 and servers 120 included in the whole cabinet server 100 is not limited in the embodiment of the present application.

[0061] Next, Figure 1a The whole cabinet server 100 shown in FIG. 1 is introduced. In the whole cabinet server product delivered as a whole cabinet, the network link and the power link in the cabinet have been deployed in advance before leaving the factory.

[0062] For example, Figure 2 FIG. 1 shows a schematic diagram of the structure of a whole cabinet server. Figure 2 As shown, the whole cabinet server 100 includes: a plurality of switches 110, a plurality of servers 120 and a power supply box 130. The power supply box 130 can be used to supply power to the switches 110 and the servers 120.

[0063] The switch 110 is used to provide network connection and data forwarding for each server node in the whole rack server 100. Specifically, the switch 110 in the whole rack server 100 can be divided into: a service switch, a management switch, and a storage switch according to the type of service processed. Figure 1a The whole cabinet server 100 shown in FIG. 1 includes a service switch and a management switch. In other embodiments, the management switch in the whole cabinet server 100 may also be replaced by a storage switch, or replaced by other switches with storage functions and management functions.

[0064] The server 120 can be configured with two network ports, each of which has a corresponding network card, but there is no one-to-one correspondence between the network port and the network card. For example, the two network ports can correspond to the same network card or to two network cards. For a server 120 configured with only two network ports, since the business network and the management network need to be isolated in market applications, the two network ports on the server 120 can be connected to two different switches, namely the business switch and the management switch. The business switch and the management switch can communicate through the aggregation switch, and can also communicate with other electronic devices through the aggregation switch. Among them, the aggregation switch is deployed outside the whole cabinet server, connecting the business switch and the management switch in the whole cabinet server. The aggregation switch can also be used to connect multiple whole cabinet servers.

[0065] In some possible embodiments, when performing stress testing on the network card in the whole cabinet server 100, it is necessary to group the server nodes in the whole cabinet into two groups to form a test group. Figure 3 FIG. 1 shows a test network topology diagram in the whole cabinet server 100. Figure 3 As shown, each test group includes: two servers (corresponding to Figure 3 Server 1 and Server 2 in the system), service switch, management switch, and aggregation switch. Server 1 and Server 2 can be connected to external servers (for example, Figure 1a and Figure 1b The external server can automatically assign IP addresses to the first network port and the second network port of server 1 and server 2, and deploy the test software package in the OS system of server 1 and server 2. When performing the network card stress test team, the first network port on server 1 can communicate with the first network port on server 2 through the service switch 11. The second network port on server 1 can communicate with the second network port on server 2 through the management switch to perform stress testing on the network cards corresponding to the first network port and the second network port in server 1 and server 2.

[0066] Next, based on the above description, a network card stress testing system provided by an embodiment of the present application is introduced. For example, Figure 4 FIG. 1 shows a schematic diagram of the structure of a network card stress testing system provided by an embodiment of the present application. Figure 4 As shown, it includes: a node environment deployment module 410, a node status expression module 420, a node search module 430, a test team module 440, and a test result judgment module 450.

[0067] Among them, the node environment deployment module 410 can be deployed in the above-mentioned electronic device 200. The node environment deployment module 410 is used to deploy the network card test environment of each server node in the whole cabinet server. For example, the node environment deployment module 410 can automatically allocate IP addresses, download OS images and test program packages for each server node in the whole cabinet server, so that each server node in the whole cabinet server can automatically execute the test program software after it is started.

[0068] Among them, the node status expression module 420, the node search module 430, the test team module 440, and the test result judgment module 450 can be deployed in each server in the whole cabinet server.

[0069] The node status expression module 420 can be used to obtain information such as the IP of the management port of the switch connected to the network port on the current server node, the name of the switch port connected to the network port, etc. The node status expression module 420 can also be used to generate a network port information file of the current server node based on the IP, MAC and other information of all network ports on the server. Among them, the network port information file includes the generation time of the network port information file, and the generation time of the network port information file can be the system time when the server generates the network port information file. In some embodiments, the network port information file can also include information such as the U position information of the server, the network port names of all network ports on the server, etc.

[0070] The node search module 430 is used to search for the IP addresses and / or MAC addresses of the network ports of all other server nodes in the whole cabinet server that are connected to the same local area network, and obtain the network port information files of other server nodes according to the IP addresses and / or MAC addresses of the network ports of other server nodes. Then, the node search module 430 merges the obtained network port information files of multiple server nodes into one file, and sorts each network port information file according to the generation time of the network port information file.

[0071] The test team module 440 can group the servers corresponding to the network port information files into teams of two by two according to the network port information files of multiple nodes obtained by the node search module 430 and in the order of generation time of the network port information files to form a test group.

[0072] The test result judgment module 450 is used to continuously detect the communication rate of each network port after the network card stress test is started. For network ports that continuously fail to meet the requirements, the network card stress tests of the two server nodes in the test group need to be judged as test failures. For server nodes that fail the test, it is necessary to start a single node test to determine which server node is abnormal. Among them, the single node test means that when performing a network card stress test, for any server in the whole cabinet server, the network card stress test data on the server flows out from one network port of the server through the switch and flows into another network port of the server. For example, when performing a network card stress test on server 1 in the whole cabinet server, the network card stress test data flow on server 1 is from network port 1 of server 1 through the service switch and then through the aggregation switch to the management switch, and finally reaches network port 2 of server 1.

[0073] Next, based on Figure 4 The stress test system shown in the figure introduces a network card stress test process provided by an embodiment of the present application. Figure 5 As shown, the node environment deployment module 410 can be deployed in the electronic device 200, and each server node in the whole cabinet server 100 is deployed with a node state expression module 420, a node search module 430, a test team module 440, and a test result judgment module 450. Figure 5 Taking the node status expression module 420, the node search module 430, the test team module 440, and the test result judgment module 450 deployed in the server 1 as an example, a network card stress test process provided in an embodiment of the present application is introduced.

[0074] In step 501, the node environment deployment module 410 deploys a network card stress test environment for the server nodes in the whole cabinet server. In one possible example, Figure 6a FIG. 4 is a schematic diagram showing a process in which the node environment deployment module 410 in the terminal device performs environment deployment on the server nodes in the whole cabinet server. Figure 6a As shown, the node environment deployment module 410 is deployed in the electronic device 200, and the electronic device 200 may include a DHCP server and a PXE server, and the node environment deployment module 410 may be deployed in the DHCP server and the PXE server. The node environment deployment module 410 in the DHCP server of the electronic device 200 can assign IP addresses to all network ports of the server nodes connected to the electronic device 200. The node environment deployment module 410 in the PXE server of the electronic device 200 can provide the image package (e.g., OS system image) and test program software package of the server node for the server node connected to the electronic device 200.

[0075] In step 502, the node status expression module 420 in the server 1 generates a network port information file corresponding to the server 1. In a possible example, Figure 6b As shown, server 1 in the whole cabinet server can communicate with other server nodes in the whole cabinet server or external terminal devices through switches (including: service switches, management switches, and aggregation switches).

[0076] The node status expression module 420 of server 1 can obtain the link layer discovery protocol (LLDP) message sent by the switch to which server 1 is connected. The LLDP message sent by the switch carries the IP address of the management port of the switch to which the network port of server 1 is connected. The U-bit information of server 1 can identify the physical location of server 1 in the whole cabinet server, and 1U is equal to 44.45mm. The IP address of the management port of the switch is used for server 1 to log in to the switch. The LLDP message sent by the switch can also include the port name of the switch to which the network port of server 1 is connected.

[0077] It is understandable that the main function of the LLDP protocol is to realize automatic discovery and topology management of network devices. It will only communicate with directly connected devices and will not be forwarded. The LLDP protocol enables a device connected to the network to send its main capabilities, management address, device identification, interface identification and other information to other devices connected to the same local area network. In the embodiment of the present application, all devices (including switches and server nodes) in the whole cabinet server are in the same local area network. After the switch is started, it can send LLDP messages in a broadcast manner, and each server node in the whole cabinet server will also send LLDP messages in a broadcast manner.

[0078] The node status expression module 420 of server 1 can generate a network port information file of server 1 according to the IP addresses, MAC addresses, and test status identification bits of all the network ports to be tested of the network card installed on server 1, wherein the network port information file includes the generation time of the network port information file, and the generation time of the network port information file can be the system time when server 1 generates the network port information file. And save the generated network port information file to the specified directory of the OS of server 1. Among them, the network port IP address and MAC address can be used to receive or send data packets in the network card stress test. The network port name can be used to distinguish the network port and confirm the sending and receiving relationship of the traffic during the network card stress test. The generation time of the network port information file can be used to sort the network port information files, so that when generating the test group, they can be grouped in order.

[0079] In a possible example, the network port information file may also include: U-bit information of the server and a test status flag, etc. The U-bit information of the server may be determined according to the port name of the switch in the LLDP message broadcast by the switch to the server. The value of the test status flag is used to indicate whether the server can participate in the network card stress test.

[0080] The network port information file of server 1 can be used to determine whether server 1 has entered the network card stress test state. For example, when other servers in the whole cabinet server obtain the network port information file generated by server 1, it means that server 1 has entered the network card test project, and other servers can start the network card stress test on server 1. The test status flag is used to identify whether the current network port is in the test state. For example, the test status flag includes two states, 1 and 0. When the test status flag is 1, it indicates that the current network port is in the test state, and when the test status flag is 0, it indicates that the current network port is not in the test state.

[0081] It is understandable that one server node corresponds to one network port information file. Since one server node may include multiple network ports, the network port information file includes information of each network port. Taking server 1 including two network ports as an example, Table 1 shows the network port information file corresponding to server 1.

[0082] Table 1

[0083]

[0084] It should be noted that other servers in the whole cabinet server can also follow Figure 5 In step 501 and step 502 shown, respective network port information files are generated.

[0085] In step 503, the node search module 430 obtains the network port information file of each server node in the whole cabinet server. Specifically, the node search module 430 can use the secure shell protocol (SSH) to log in to the switch connected to the server 1 based on the IP address of the management port of the switch. Then, the node search module 430 can obtain the LLDP information of other servers from the switch, and the LLDP information carries information such as the network port IP address and / or MAC address of each server node in the whole cabinet server.

[0086] It is understandable that after each server node in the whole cabinet server receives the LLDP message sent by the switch, each server node also needs to send an LLDP message to the switch, and the LLDP message carries the network port IP address and MAC address of the server node. After the switch receives the LLDP message broadcast by each connected server node, it extracts the network port IP address, MAC address and other information from it and saves it as the server's LLDP information in the switch.

[0087] After obtaining the network port IP address and / or MAC address of each server node in the whole cabinet server, the node search module 430 can download the network port information file of the server node from the specified path of the server node according to the obtained IP address and / or MAC address of each server node. In a possible example, the node search module 430 can use the scp tool to download the network port information file from the specified path of the server node according to the IP address of the network port of the server node. Among them, scp is a secure file transfer tool based on the SSH protocol. The scp tool can copy files from a remote server to a specified target path of the local system.

[0088] In one possible example, Figure 6c The schematic diagram shows the process of the node search module 430 in the server 1 acquiring the network port information file 2 corresponding to the server 2. Figure 6c As shown, server 1 can log in to the service switch through the management network port IP of the service switch carried in the pre-acquired LLDP message, and obtain the IP address and MAC address of network port 1 of server 2 saved by the service switch. Alternatively, server 1 can also log in to the management switch through the management network port IP of the management switch carried in the pre-acquired LLDP message, and obtain the IP address and MAC address corresponding to network port 2 of server 2 saved by the management switch. Then, server 1 can establish a communication connection with server 2 based on the obtained IP address corresponding to network port 1 on server 2 or the IP address corresponding to network port 2, and download network port information file 2 corresponding to server 2 from the specified path of server 2. It can be understood that the process of server 1 obtaining network port information files corresponding to other servers in the whole cabinet server is similar to this, and will not be repeated here.

[0089] In step 504, the test team module 440 determines the stress test group according to the obtained network port information files of each server node. Specifically, after obtaining the network port information files of each server node in the whole cabinet server, the test team module 440 can sort the obtained multiple network port information files according to the generation time of the network port information files, and team them in order. Among them, when forming a test group, it is necessary to detect the test status flag of the server node to determine whether the corresponding server node is in the test state. For server nodes that are already in the test state, no test group can be formed.

[0090] In one possible example, the generation time of the network port information file of server node 1 is 15:35:26:123 and the test status flag is 0, the generation time of the network port information file of server node 2 obtained by the test team module 440 is 15:35:27:257 and the test status flag is 0, the generation time of the network port information file of server node 3 is 15:36:01 and the test status flag is 0… The generation time of the network port information file of server n is 15:36:27:121 and the test status flag is 0. After the test team module 440 sorts the obtained network port information files according to their generation time, it can select server 1 and server 2 corresponding to the network port information files at the front of the queue to form a test group. Exemplary, Figure 7 FIG. 4 shows a schematic diagram of the network topology structure of a test group consisting of server 1 and server 2. Figure 7 As shown, both server 1 and server 2 include two network ports (network port 1 and network port 2). For server 1, network port 1 can be used as the receiving end of the stress test, and network port 2 can be used as the sending end of the stress test. For server 2, network port 1 can be used as the sending end of the stress test, and network port 2 can be used as the receiving end of the stress test. Of course, in other embodiments, network port 1 of server 1 can also be used as the sending end of the stress test, network port 2 of server 1 can be used as the receiving end of the stress test, network port 1 of server 2 can be used as the receiving end of the stress test, and network port 2 of server 2 can be used as the sending end of the stress test.

[0091] Specifically, the test team module 440 may include a receiving end process and a sending end process. After server 1 and server 2 form a test group, the network port 1 of server 1 serves as the sending end of the stress test. After the sending end process of server 1 is started, it is continuously connected to the network port 1 of server 2 according to the IP address of the network port 1 of server 2 through the network port 1 of server 1. As the receiving end, the network port 1 of server 2 can use tools such as tcpdump to continuously listen to the data packets corresponding to the IP address of the network port 1 of server 1. After listening to the data packets sent by the network port 1 of server 1, server 2 starts the receiving end process. In this way, the test between the network port 1 of server 1 and the network port 1 of server 2 is successfully started.

[0092] The test startup process between network port 2 on server 1 and network port 2 on server 2 is the same as the test startup process of network port 1, which will not be repeated here. After the network port test startup is successful, server 1 and server 2 also need to change the test status flag corresponding to the corresponding network port in the corresponding network port information file to 1.

[0093] In step 505, the test result judgment module 450 detects the communication rate of each network port and determines the stress test result. Specifically, after the network card stress test is started, the test result judgment module 450 can continuously detect the communication rate of each network port on the server 1. If the communication rate of a network port continuously fails to meet the preset threshold, the two server nodes in the test group can be identified as test failures. For the server node that failed the test, a single point test is started to determine the test node where the failure occurred.

[0094] In an embodiment of the present application, when stress testing the network card in the server node in the whole cabinet server, the test program is deployed to each server node in advance. Each server node runs the test program, and automatically identifies each server node in the whole cabinet server through the LLDP information of each server stored in the switch in the whole cabinet server, and automatically performs the test and judges the result. There is no need to add additional terminal equipment to perform test teaming, test process and test result judgment on each server node in the whole cabinet server, saving hardware and software costs. Among them, the LLDP information of each port of the switch can be stored in the memory of the switch.

[0095] Next, a network card stress testing method provided by an embodiment of the present application is introduced. For example, Figure 7 A schematic diagram of a network card stress test method is shown. The method can be performed by Figure 2 The first server in the whole cabinet server shown executes, wherein, Figure 2 The whole cabinet server shown in the figure includes multiple servers and multiple switches. Figure 7As shown, the method includes: step 801-step 804. The multiple servers may include a first server and a second server, and the number of the second server may be one or more.

[0096] Step 801: A first server obtains a first network port information file of at least one second server, where the first network port information file is used to identify that the second server can participate in a network card stress test.

[0097] In this embodiment, the whole cabinet server includes multiple servers, and each of the multiple servers can generate a corresponding network port information file. After the server generates the network port information file, it is marked that the server can participate in the network card stress test. For example, the first server in the whole cabinet server can generate a second network port information file corresponding to the first server, and the second server other than the first server in the whole cabinet server can generate a corresponding first network port information file.

[0098] It is understandable that the information types contained in the first network port information file and the second network port information file are exactly the same. Exemplarily, the first network port information file and the second network port information file may include: the IP address of the network port, the MAC address, the test status flag, the network port information file generation time, etc.

[0099] After each server in the whole cabinet server generates a corresponding network port information file, the first server can also obtain the first network port information file generated by at least one second server in the whole cabinet server. Exemplarily, the first server can obtain the first information sent by the switch connected to the first server. The first information carries the IP address of the management port of the switch connected to the first server. After the first server obtains the IP address of the management port of the switch connected to the first server, the first server can log in to the corresponding switch through the IP address of the management port, and obtain the LLDP messages of all servers in the whole cabinet server that are connected to the switch from the switch port.

[0100] After obtaining the port IP addresses of other servers, the first server can download the first network port information file from the designated path of the corresponding second server according to the obtained IP addresses.

[0101] Among them, the first information may include the LLDP message of the switch. It is understandable that the multiple servers and multiple switches in the whole cabinet server belong to the same local area network. After the whole cabinet server is started, the switch can send LLDP messages in a broadcast manner in the local area network. The LLDP message carries the IP address of the management port of the switch, the port name of the switch and other information. For the servers in the whole cabinet, each server also needs to send an LLDP message to the connected switch. The LLDP message carries information such as the network port IP address and MAC address of the corresponding server.

[0102] In one possible example, before each server in the whole cabinet server generates a corresponding network port information file, the test environment in each server in the whole cabinet server can also be deployed. For example, the test environment in each server in the whole cabinet server can be deployed through an electronic device that is communicatively connected to the whole cabinet server. Specifically, the electronic device may include a DHCP server and a PXE server that are communicatively connected to the whole cabinet server. Among them, the DHCP server can assign IP addresses to the network ports on each server in the whole cabinet server. The PXE server can provide OS images and test packages for each server in the whole cabinet server.

[0103] Step 802: The first server determines a third server from at least one second server according to the second network port information file generated by the first server and the acquired first network port information file.

[0104] In this embodiment, after the first server obtains the first network port information file corresponding to at least one second server in the whole cabinet server, the first server can sort the first network port information file and the second network port information file according to the second network port information file generated by the first server and the generation time of the network port information file carried in the obtained first network port information. The first server can determine the third server from at least one second server based on the sorting results of the first network port information file and the second network port information file. Specifically, the first server can form a test group with the servers corresponding to the first network port information file and the second network port information file in pairs according to the sorting results of the first network port information file and the second network port information file based on the generation time, and the server belonging to the same test group as the first server is the third server.

[0105] It is understandable that when the first server forms a test group according to the sorting results of the first network port information file and the second network port information file based on the generation time, the first server also needs to check the test status flag corresponding to each server constituting the test group. A server that is already in a test state cannot form a test group. Since a server may correspond to multiple network ports, when the network port state indicated by the test status flag corresponding to any network port on the server is a test state, it can be considered that the server where the network port is located is in a test state.

[0106] Step 703: The first server performs a stress test on the network cards on the first server and the third server.

[0107] In this embodiment, both the first server and the third server are installed with network cards. After the first server and the third server form a test group, the first server can start a network card stress test between the first server and the third server.

[0108] During the process of the network card stress test on the first server and the third server, it is also necessary to test and establish a link between the network ports on the first server and the third server. When conducting the test link establishment, the network port 1 of the first server in the test group can be used as the stress test sending port, and the network port 2 can be used as the stress test receiving port, and the network port 1 of the third server can be used as the stress test receiving port, and the network port 2 can be used as the stress test sending port. Then, the receiving port on the first server receives the first data packet sent by the sending port on the third server. When the receiving port on the first server receives the first data packet, the first server is triggered to start the network card stress test. And the sending port on the first server sends a second data packet to the receiving port on the third server. When the receiving port on the third server receives the second data packet, the first server is triggered to start the network card stress test, wherein the first information is used to identify that the second data packet is received by the third server.

[0109] After the network port stress test between the first server and the third server is successfully started, the first server and the third server can use tools such as iperf or netperf to continuously detect the communication rate of the corresponding test network port on the first server or the third server. For example, the communication rate between the test network ports within the period can be tested with a firmware time as a period. When the network port communication rate between the test network ports does not meet the set threshold for multiple consecutive periods, it can be determined that the network port stress test between the first server and the third server has failed. At this time, it is necessary to start a single-node test and perform network port stress tests on the first server and the third server respectively to determine the server where the abnormality occurs.

[0110] Next, we will use a specific example to Figure 8The network card stress test method shown is specifically introduced. For example, Fig. 9 A flowchart of a network card stress testing method provided by an embodiment of the present application is shown. Figure 8 Another way to express the network card stress test method shown in the figure is to combine the two. Fig. 9 As shown, the method includes: step 901-step 913.

[0111] Step 901: A first server obtains an LLDP message of a switch connected to a network card on the first server.

[0112] In this embodiment, the whole cabinet server includes multiple servers and multiple switches, and the multiple servers and multiple switches are in the same local area network. After the whole cabinet server is started, the switch will send LLDP messages in the local area network in a broadcast manner. The servers in the whole cabinet listen to the LLDP messages received by the server and obtain the IP address of the management port of the connected switch from the received LLDP messages.

[0113] Taking the first server in the whole cabinet server as an example, the first server can use tools such as tcpdump to listen to the LLDP message in the local area network to which the first server belongs. The LLDP message carries the IP address of the management port of the switch connected to the first server, the switch port number and other information. Among them, the IP address of the management port of the switch can be used to log in to the switch.

[0114] In one possible example, before performing network card stress testing on multiple servers in a whole cabinet server, it is also necessary to deploy the test environment of each server in the whole cabinet. For example, the test environment in each server in the whole cabinet server can be deployed through an electronic device that is communicatively connected to the whole cabinet server. Specifically, the electronic device may include a DHCP server and a PXE server that are communicatively connected to the whole cabinet server. Among them, the DHCP server can assign IP addresses to the network ports on each server in the whole cabinet server. The PXE server can provide OS images and test packages for each server in the whole cabinet server.

[0115] After the first server obtains the LLDP message of the switch, it can generate the LLDP message of the first server according to the IP address of the network port of the first server and broadcast it to the switch. In other words, after each server in the whole cabinet server receives the LLDP message of the switch, it can broadcast the LLDP message of the server to the switch.

[0116] Of course, in other embodiments, the server may first broadcast the LLDP message of the server to the switch, and after the switch receives the LLDP message of the server, it broadcasts the LLDP message of the switch to the server.

[0117] Step 902: The first server generates a corresponding network port information file according to the network port information of the first server.

[0118] In this embodiment, before the first server performs a network port stress test, the first server also needs to obtain network port information such as the IP address and MAC address of the network port on the first server that needs to perform a network card stress test from the switch connected to it. Then, the first server can generate a network port information file corresponding to the first server based on the obtained network port information, the U-bit information of the first server obtained from the LLDP message broadcast by the switch connected to the first server, and the current system time, and save it to a designated directory in the OS system of the first server. Among them, the current system time is used to determine the generation time of the network port information file of the first server. In some embodiments, the network port information file may also not include the U-bit information of the first server.

[0119] Step 903: The first server obtains LLDP information of at least one second server in the entire cabinet except the first server, where the LLDP information includes the IP address of the network port of the second server.

[0120] In this embodiment, after generating the network port information file corresponding to the first server, the first server also needs to obtain the network port information file of at least one second server in the whole cabinet server except the first server. Specifically, the first server can log in to the corresponding switch according to the IP address of the switch management port obtained from the LLDP message broadcast by the switch, and obtain the IP address, MAC address and other information of the server connected to the switch. In a possible example, the first server can log in to the switch through the SSH protocol, and execute the "show l ldpneighbors" command in the switch system to obtain the network port IP address of the server connected to each port in the switch.

[0121] In one possible example, after the whole cabinet server is started, each server node in the whole cabinet server can broadcast the server's LLDP message to the PXE / DHCP server, and the PXE / DHCP server stores the IP address of the network port in the LLDP message of each server in the specified directory of the PXE / DHCP server. After the first server establishes a connection with the second server, the directory can be accessed by all server nodes in the whole cabinet server. For example, after the whole cabinet server is started, the first server can broadcast the LLDP message of the first server to the PXE / DHCP server, and the first server can also obtain the IP address of the network port of other server nodes in the whole cabinet server by accessing the specified directory in the PXE / DHCP server. In this example, the first server can access the specified directory in the PXE / DHCP server through the IP address of the PXE / DHCP server to obtain the IP address of the network port of other server nodes in the whole cabinet server, and there is no need to obtain the IP address of the network port of other server nodes in the whole cabinet server through the switch to which the first server is connected. It is understandable that, in this example, the PXE / DHCP server can be used to share test information during the whole cabinet server network card stress test, but does not participate in the specific test process.

[0122] Step 904 , the first server determines whether the IP addresses of the network ports of all the second servers in the whole cabinet server are obtained. If so, execute step 905 ; otherwise, wait for a preset time and execute step 903 .

[0123] In this embodiment, after the first server obtains the IP address of the network port corresponding to at least one second server in the whole cabinet server, it can compare the number of the obtained network port IP addresses with the number of servers configured in the whole cabinet server, so as to determine whether the IP addresses of the network ports of all the second servers are obtained. For example, the number of servers configured in the whole cabinet server is 10, when the number of the network port IP addresses obtained by the first server is 9, the first server can determine that the IP addresses of the network ports of all the second servers are obtained.

[0124] If it is determined that the IP address of the network port corresponding to the second server is not obtained, it can be considered that the first server fails to obtain the IP address of the network port from the switch. The reason for the failure of the first server to obtain the IP address may be that there is an abnormal server in the whole cabinet server or there is a U position that is not connected to the server. At this time, the first server can wait for a certain period of time and then re-obtain the LLDP information of the connected second server from the port of the switch to obtain the IP address of the network port of the second server.

[0125] In a possible example, when the first server fails to obtain the IP address of the network port corresponding to the second server for three consecutive times, in order to ensure that the network port stress test of the entire cabinet server can be carried out smoothly, the first server can continue to execute step 905.

[0126] Step 905: The first server downloads a network port information file from at least one second server according to the IP address of the network port of at least one second server.

[0127] In this embodiment, after the first server obtains the IP address of the network port of at least one second server, the first server can download the network port information file of at least one second server from a specified path on the at least one second server according to the IP address of the network port of the at least one second server.

[0128] It is understandable that the path for storing the network port information file of each server in the whole cabinet server can be the same or different. In the case where the storage paths of the network port information files of each server are different, the first server can send a path request to the second server according to the IP address of the network port of the second server to obtain the storage path of the network port information file of the second server from the second server. After the first server obtains the storage path of the network port information file of the second server, it downloads the network port information file of the second server from the storage path of the network port information file of the second server according to the IP address of the network port of the second server.

[0129] In one possible example, after generating the corresponding network port information file, each server node in the whole cabinet server can store the generated network port information file in a specified directory of the PXE / DHCP server. The directory can be accessed by all server nodes in the whole cabinet server. The first server can obtain the network port information files corresponding to other server nodes in the whole cabinet server by accessing the specified directory in the PXE / DHCP server. It can be understood that in this example, the PXE / DHCP server can be used to share test information during the stress test of the network card of the whole cabinet server, but does not participate in the specific test process.

[0130] Step 906, determining whether the network port information file of at least one second server is obtained, if so, executing step 907, otherwise, after waiting for a preset time period, executing step 905.

[0131] In this embodiment, only when the first server obtains the network port information file of the second server, can the first server form a test group to perform the network card stress test.

[0132] It is understandable that in this embodiment, whether the server has entered the network card stress test state can be determined by whether the server generates a network port information file. Since other servers in the whole cabinet server may be abnormal, it is impossible to obtain the network port information files of other servers. If the first server does not obtain the network port information files corresponding to other servers, the first server can wait for a period of time and then continue to obtain them to wait for the abnormal server to return to normal.

[0133] In a possible example, the first server can download the network port information file from the specified path of the server corresponding to each IP address obtained by using tools such as scp. Then, the first server can determine the execution result of each scp instruction. If the execution result is successful, it can be considered that the network port information file of the current node has been obtained.

[0134] Step 907: The first server determines a third server from at least one second server according to the acquired network port information file, wherein the third server is used to form a test group with the first server.

[0135] In this embodiment, the first server can sort the network port information files corresponding to the first server and the obtained multiple network port information files according to the generation time of the obtained multiple network port information files and the generation time of the network port information files corresponding to the first server. Then, according to the sorting result, the servers corresponding to the network port information files are grouped into twos to form a test group.

[0136] When the servers corresponding to the network port information files are formed into a test group according to the sorting results of the network port information files, it is also possible to determine whether the server corresponding to the network port information file is in a test state according to the state information indicated by the test state flag in the network port information file. For a server in a test state, the server will not be able to participate in forming a test group. For example, the result of the first server sorting the acquired network port information files according to the time sequence of generation is "network port information file 2, network port information file 5, network port information file 1, network port information file 4, network port information file 3...", wherein network port information file 2 corresponds to server 2 in the whole cabinet server, network port information file 5 corresponds to server 5, network port information file 1 corresponds to server 1, network port information file 4 corresponds to server 4, and network port information file 3 corresponds to server 3. Server 1 can be used as the first server, and servers 2-5 can be used as the second server. The test states corresponding to servers 2, 5, 1, and 3 are "not in a test state", and the test state corresponding to server 4 is "in a test state". When generating a test group, server 2 and server 5 form a test group. Since server 4 is in a test state, server 1 and server 3 form a test group.

[0137] Step 908, determining whether the third server is in a test state, if not, executing step 909, otherwise, after waiting for a preset time period, executing step 905.

[0138] In this embodiment, when the first server forms a test group according to the obtained network port information file, there may be a situation where the first server fails to form a test group. For example, the servers that can form a test group with the first server are all in a test state, or, when forming a test group according to the network port information file obtained by the first server, the network port information file corresponding to the first server is ranked last, and the servers corresponding to the network port information files arranged between the network port information files corresponding to the first server just form a test group in pairs.

[0139] In this embodiment, when the third server is in the test state, the network port information file of the corresponding server is downloaded again from the designated path according to the IP address of the network port of the third server.

[0140] Step 909: Start a network card stress test between the first server and the third server.

[0141] In this embodiment, it is taken that there are two network ports to be tested on both the first server and the third server as an example. The network topology connection between the first server and the third server can refer to Figure 7 When performing the network card stress test, the first server (corresponding to Figure 7 The network port 1 on the server 1 in the figure can be used as the stress test sender, and the network port 2 can be used as the stress test receiver. Figure 7 The network port 1 of the server 2 in the stress test is used as the receiving end of the stress test, and the network port 2 is used as the sending end of the stress test. Then, when starting the network card stress test between the first server and the third server, it is necessary to establish a link between the first server and the third server. Specifically, the first server starts the sending end process, and the sending end process of the first server sends a data packet to the network port 1 on the third server through the network port 1 of the first server according to the IP address of the network port 1 on the third server. At the same time, the first server can also use tools such as tcpdump to continuously listen to whether the network port 2 on the first server receives the data packet sent by the third server. After the first server monitors the data packet sent by the third server, the first server can start the receiving end process of the network port 2 of the first server. The startup process of the receiving end process and the sending end process on the third server is the same as that of the first server, which will not be repeated here. After the receiving end process and the sending end process on the first server and the third server are started, it can be considered that the link between the first server and the third server is successfully established.

[0142] In other embodiments, when establishing a link between the first server and the third server, data can be transmitted through the MAC addresses of the network ports of each network card. For example, when the sending end process is started on the first server, the sending end process of the first server sends a data packet to the network port 1 on the third server through the network port 1 of the first server according to the MAC address of the network port 1 on the third server. The first server can also continue to monitor whether the network port 2 on the first server receives the data packet sent by the third server. After the first server monitors the data packet sent by the third server, the first server can start the receiving end process of the network port 2 of the first server. The startup process of the receiving end process and the sending end process on the third server is the same as that of the first server. Therefore, after the receiving end process and the sending end process on the first server and the third server are started, it can be considered that the link between the first server and the third server is successfully established.

[0143] After the first server and the third server successfully establish a link, it can be considered that the network port stress test between the first server and the third server is successfully started, and the first server and the third server need to update the network port information files corresponding to the first server and the third server respectively. For example, the test status flag bit of the corresponding network port in the network port information file is changed from "0" to "1".

[0144] Step 910, determining whether the network card stress test between the first server and the third server is successfully started, if successfully started, executing step 911, otherwise ending.

[0145] In this embodiment, whether the network card stress test between the first server and the third server is successfully started can be determined by whether the link between the first server and the third server is successfully established. If the network card stress test between the first server and the third server fails to start, the first server can re-team with other servers in the whole cabinet server for network card stress test.

[0146] Step 911, determine whether the communication rate between the test network ports on the first server and the third server meets the preset rate. If so, the network card stress test between the first server and the third server is successful. If not, execute step 813.

[0147] In this embodiment, after the network card stress test between the first server and the third server is started, the first server also needs to detect the communication rates of the two network ports on the first server. When the communication rate of any network port on the first server does not continuously meet the preset communication rate, it can be determined that the network card stress test between the first server and the third server has failed.

[0148] In a possible example, the first server can obtain the flow information of each network port on the first server by executing the sar-nDEV 2 instruction, and filter out the communication rate of each network port. If the communication rate of any network port on the first server does not meet the preset threshold for multiple consecutive time periods, it can be determined that the network card stress test between the first server and the third server has failed.

[0149] Step 912, perform single-point tests on the first server and the third server respectively. If the network card communication rates of the first server and the third server meet the preset rate, the network card stress test between the first server and the third server is successful, otherwise the stress test fails.

[0150] In this embodiment, when the network card stress test between the first server and the third server fails, single-point tests may be performed on the first server and the third server respectively to determine which server has a fault among the first server and the third server.

[0151] In the embodiment of the present application, when the network card stress test is performed on the whole cabinet server, the test program is deployed in advance to each node to be tested. Each node runs the test program, automatically identifies the server node to be tested in the cabinet through the LLDP information of each port of the cabinet switch, automatically starts the test, and automatically judges the test result. There is no need to control the test team, test process and test results of each node by the control terminal, saving hardware and software costs.

[0152] It is understandable that the size of the sequence number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. In addition, in some possible implementations, each step in the above embodiment can be selectively executed according to actual conditions, and can be partially executed or fully executed, which is not limited here. In addition, all or part of any feature in the above embodiment can be freely and arbitrarily combined without contradiction. The combined technical solution is also within the scope of the present application.

[0153] Based on the method in the above embodiment, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method in the above embodiment.

[0154] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product, characterized in that when the computer program product runs on a processor, the processor executes the method in the above embodiment.

[0155] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.

[0156] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0157] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.

Claims

1. A network card stress testing method, characterized in that: Applied to a first server, the method comprises: The first server obtains a first network port information file of at least one second server; the first network port information file is used to identify that the second server can participate in the network card stress test; the first server is connected to the second server through a switch; The first server determines a third server from the at least one second server according to the second network port information file of the first server and the acquired first network port information file; The first server performs a stress test on the network cards on the first server and the third server.

2. The method according to claim 1, characterized in that: The first server obtains the first network port information file of the at least one second server, including: The first server acquires first information, wherein the first information carries an Internet Protocol IP address of a management port of a switch connected to the first server, and the IP address of the management port is used to log in to the switch; The first server obtains second information from the switch, wherein the second information includes an IP address and / or a media access control address (MAC address) of a network port of the at least one second server; The first server obtains the first network port information file of the at least one second server according to the IP address and / or MAC address of the network port of the at least one second server.

3. The method according to claim 1, characterized in that The first server determines a third server from the at least one second server according to the second network port information file of the first server and the acquired first network port information file, including: The first server sorts the first network port information file and the second network port information file according to generation time of the first network port information file and the second network port information file respectively carried in the first network port information file and the second network port information file; A third server is determined from the at least one second server according to the ranking.

4. The method according to claim 1, characterized in that: Before the first server performs stress testing on the network cards on the first server and the third server, the method further includes: The receiving port on the first server receives the first data packet sent by the sending port on the third server; When the receiving port on the first server receives the first data packet, the first server is triggered to start a network card stress test.

5. The method according to claim 1, characterized in that Before the first server performs stress testing on the network cards on the first server and the third server, the method further includes: The sending port on the first server sends a second data packet to the receiving port on the third server; When the receiving port on the first server receives the third information, it triggers the first server to start the network card stress test, and the third information is used to identify that the second data packet is received by the third server.

6. The method according to claim 4 or 5, characterized in that: After triggering the first server to start the network card stress test, the method further includes: Update the test status flag on the first server stored in the second network port information file.

7. The method according to claim 1, characterized in that The first server performs a stress test on the network cards on the first server and the third server, including: Detecting the communication rate of each network port on the first server and the third server; If the communication rate of a network port in the first server or the third server is lower than a set communication rate threshold, it is determined that the network card stress test between the first server and the third server fails.

8. The method according to claim 7, characterized in that After determining that the network card stress tests of the first server and the third server fail, the method further includes: Single-node tests are performed on the first server and the third server respectively to determine the server where the abnormal network card is located.

9. The method according to any one of claims 1 to 8, characterized in that: The first network port information file and the second network port information file contain the same information type; The first network port information file includes: the IP address of the network port, the network port test status flag, and the generation time of the network port information file.

10. A server, characterized in that: include: at least one memory for storing a program; At least one processor is used to execute the program stored in the memory, and when the program stored in the memory is executed, the processor is used to execute the method described in any one of claims 1-9.