CN115622916A - Network card testing method, device, equipment and storage medium - Google Patents
Network card testing method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN115622916A CN115622916A CN202211384290.5A CN202211384290A CN115622916A CN 115622916 A CN115622916 A CN 115622916A CN 202211384290 A CN202211384290 A CN 202211384290A CN 115622916 A CN115622916 A CN 115622916A
- Authority
- CN
- China
- Prior art keywords
- target
- network card
- test result
- binding
- test
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 348
- 238000000034 method Methods 0.000 claims abstract description 115
- 238000004891 communication Methods 0.000 claims description 15
- 238000009662 stress testing Methods 0.000 claims description 2
- 238000010998 test method Methods 0.000 abstract description 3
- 238000004590 computer program Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000011056 performance test Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 210000001503 joint Anatomy 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0817—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention provides a network card test method, a device, equipment and a storage medium, wherein the method comprises the following steps: the method comprises the steps of obtaining a target connection method of a target end network card according to a first command, obtaining a first test result with the highest bandwidth performance in test results of different pressure test tools aiming at the target connection method, wherein the first test result is obtained according to the target pressure test tool and the first bandwidth, carrying out core binding, binding interruption and core binding interruption core binding tests on the target pressure test tool under the condition that the first bandwidth of the target network card is detected to be smaller than a target threshold value, obtaining a second test result with the highest bandwidth performance in the test results, and the second test result is obtained according to a target binding mode, a target thread number, the target connection method and the second bandwidth and is sent to a display screen, so that workers can refer to the second test result, and time and labor cost are greatly saved.
Description
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a network card testing method, apparatus, device, and storage medium.
Background
The server is provided with a network card to realize the functions of communication and information interaction. Based on the requirements of server design, the network card needs to be subjected to performance test, and the test can be added into a configuration list of the server only when the test meets the requirements. The performance test of the network card mainly comprises a delay test and a bandwidth test, wherein the bandwidth test is the main consideration standard for testing the network card, so how to quickly enable the bandwidth performance to reach the standard becomes a very time-consuming work.
The existing bandwidth test method comprises the following steps: under a network system of a computer, after a network card of a to-be-tested machine and a network card of an auxiliary end testing machine are connected in a couplet, a netperf (performance testing tool), an iperf (pressure testing tool) and an iperf3 (pressure testing tool) are used for running in two servers, the bandwidth performance of the network card is tested based on the basic configuration of the network card, and when the speed of the to-be-tested network card is maintained to be more than 90% of the bandwidth speed limit in a testing specified time and no network card related error is reported, the network card is judged to be tested to reach the standard.
However, due to different network card connections, not all network cards can pass the standard, and therefore, a tester is required to continuously adjust parameters under an operating system to achieve the standard, which greatly increases time and labor cost.
Disclosure of Invention
The embodiment of the invention aims to provide a network card testing method, a device, equipment and a storage medium, which solve the problems that the existing network card performance test needs testers to continuously adjust parameters under an operating system to achieve the standard and the time and labor cost are greatly increased, and have the following specific technical scheme:
in a first aspect of the embodiment of the present invention, a method for testing a network card is first provided, where the method includes:
acquiring a target connection method of a target terminal network card according to the first command;
aiming at the target connection method, obtaining a first test result with the highest bandwidth performance in test results of different pressure test tools, wherein the first test result is obtained according to the target pressure test tool and the first bandwidth;
under the condition that the first bandwidth of the target network card is smaller than a target threshold value, performing core binding, binding interruption and binding interruption core binding tests on the target pressure testing tool to obtain a second testing result with the highest bandwidth performance in the testing result, wherein the second testing result is obtained according to a target binding mode, a target thread number, a target connection method and a second bandwidth;
and sending the second test result to a display screen.
Optionally, the obtaining the target connection of the target-side network card according to the first command includes:
acquiring numa nodes of the target end network card and the auxiliary end network card according to a first command;
under the condition that the numa node is detected to be consistent, determining that the target end network card and the auxiliary end network card are in a first connection method;
under the condition that the numa node is detected to be inconsistent, determining that the target end network card and the auxiliary end network card are in a second connection method;
and acquiring the target connection method of the target terminal network card according to the first connection method or the second connection method.
Optionally, the pressure testing tool comprises: the obtaining of the first test result with the highest bandwidth performance in the test results of different pressure test tools according to the target connection method includes:
aiming at the target connection method, generating a third test result according to the iperf, generating a fourth test result according to the iperf3, and generating a fifth test result according to the netiperf;
and acquiring the first test result with the highest bandwidth performance according to the third test result, the fourth test result and the fifth test result.
Optionally, before the obtaining the second test result with the highest bandwidth performance in the test results, the method further includes:
acquiring a total amount of numa nodes;
binding the target end network card and the auxiliary end network card with the full numa node respectively according to a second command to generate a full core binding mode;
and generating a full-amount core binding test result according to the target pressure test tool and the full-amount core binding mode.
Optionally, before obtaining a second test result with the highest bandwidth performance in the test results, the method further includes:
acquiring the core quantity according to the third command;
generating network ports with target quantity according to the core quantity;
binding the target end network card and the auxiliary end network card with the network ports of the target number respectively according to a fourth command to generate a target binding interruption mode;
and generating a target binding interruption test result according to the target pressure test tool and the target binding interruption mode.
Optionally, after the target network card and the auxiliary network card are respectively bound with the number of target ports according to the fourth command to generate a target binding interruption mode, the method further includes:
acquiring a total number of numa nodes;
binding the target end network card and the auxiliary end network card with the full numa node respectively according to a second command to generate a full core binding mode;
and generating a full-amount binding and interrupting test result according to the target pressure test tool, the full-amount binding and interrupting mode and the target binding and interrupting mode.
Optionally, before the performing the binding, binding interruption and binding interruption binding tests on the target pressure testing tool in the case that it is detected that the first bandwidth of the target network card is smaller than the target threshold, the method further includes:
and sending the first test result to a display screen under the condition that the first bandwidth of the target network card is detected to be not less than a target threshold value.
In a second aspect of the present invention, there is also provided a network card testing apparatus, including:
the first acquisition module is used for acquiring a target connection method of the target terminal network card according to the first command;
the second obtaining module is used for obtaining a first test result with the highest bandwidth performance in test results of different pressure test tools aiming at the target connection, and the first test result is obtained according to the target pressure test tool and the first bandwidth;
a third obtaining module, configured to perform core binding, core binding interruption, and core binding interruption tests on the target pressure testing tool when it is detected that the first bandwidth of the target network card is smaller than a target threshold, and obtain a second test result with the highest bandwidth performance in the test results, where the second test result is obtained according to a target binding mode, a target thread number, a target connection method, and a second bandwidth;
and the first sending module is used for sending the second test result to a display screen.
In a third aspect of the present invention, there is also provided a communication device, including: a transceiver, a memory, a processor, and a program stored on the memory and executable on the processor;
the processor is used for reading the program in the memory to realize the execution of any one of the network card testing methods.
In a fourth aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where instructions are stored, and when the instructions are executed on a computer, the computer is caused to execute any one of the network card testing methods described above.
The network card testing method provided by the embodiment of the invention obtains the target connection method of the network card at the target end according to the first command, obtains the first testing result with the highest bandwidth performance in the testing results in different pressure testing tools aiming at the target connection method, carries out the core binding, the binding interruption and the core binding interruption on the target pressure testing tool under the condition that the first bandwidth of the target network card is detected to be smaller than the target threshold value, obtains the second testing result with the highest bandwidth performance in the testing results, and sends the second testing result to the display screen according to the target binding mode, the target thread number, the target connection method and the second bandwidth, thereby realizing the network card connection method, the target thread number and the network card testing information of the target binding mode which can enable the bandwidth performance to be the best, and sending the network card testing information to the display screen, so that the time and the labor cost are greatly saved for workers to refer.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a first flowchart illustrating steps of a network card testing method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a second step of the network card testing method according to the embodiment of the present invention;
fig. 3 is a flow chart illustrating a third step of the network card testing method according to the embodiment of the present invention;
fig. 4 is a flowchart illustrating a fourth step of the network card testing method according to the embodiment of the present invention;
fig. 5 is a flowchart illustrating a fifth step of the network card testing method according to the embodiment of the present invention;
fig. 6 is a schematic structural diagram of a network card testing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a communication device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments. The following embodiments are divided for convenience of description, and should not constitute any limitation to the specific implementation manner of the present invention, and the embodiments may be mutually incorporated and referred to without contradiction.
Referring to fig. 1, a first flowchart illustrating a first step of a network card testing method provided in an embodiment of the present invention is shown, where the method may include:
In the embodiment of the invention, the target network card and the auxiliary network card are connected in a butt joint mode under the system, and then the bandwidth performance of the target network card is tested, but because the network cards at two ends have various connection modes and the bandwidth performance of the network cards under different connection modes is different, in order to obtain the bandwidth performance of the target network card, two network cards are firstly installed in two servers, and then the connection method of the target network card is obtained through a first command. For example, the network card access method can be confirmed by looking up the numa _ node corresponding to the logical port of the network card, that is, the numa nodes corresponding to the logical ports of the target-side network card and the auxiliary-side network card are obtained, when it is detected that the numa nodes of the target-side network card and the auxiliary-side network card are consistent, it is determined that the two network cards are not cross-DIE access, and when the numa nodes of the target-side network card and the auxiliary-side network card are inconsistent, it is determined that the two network cards are cross-DIE access. Of course, other parameter information of the network card may also be obtained through other commands to determine the connection method of the network card, and the present invention is not limited in this respect.
It should be noted that, a numa node corresponding to a logical port of the target-side network card and a logical port of the auxiliary-side network card is checked through the first command to determine the connection method, and the specific steps include:
acquiring numa nodes of a target-side network card and an auxiliary-side network card according to the first command;
under the condition that the numa nodes are consistent, determining that the target end network card and the auxiliary end network card are in a first connection method;
under the condition that the numa node is detected to be inconsistent, determining that the target end network card and the auxiliary end network card are in a second connection method;
and acquiring a target connection method of the network card of the target terminal according to the first connection method or the second connection method.
The first connection method is a cross-DIE connection method, and the second connection method is a cross-DIE connection method.
Therefore, in the embodiment of the present invention, after the target-side network card and the auxiliary-side network card are respectively configured to the two servers, the target connection method of the target-side network card is obtained according to the first command, so as to obtain the bandwidth performance of the network card under the target connection method, and perform optimal configuration.
In the embodiment of the invention, after the target connection method of the network card is determined, the bandwidth performance of the network card is detected, and at the moment, a pressure test tool is required to be introduced to obtain a test result. By way of example, several common stress testing tools include: the method comprises the following steps that iperf, iperf3 and netperf are respectively used in two servers for testing by using the pressure testing tools, then testing results are compared, and a first testing result with the highest bandwidth performance is obtained, wherein the first testing result comprises the following steps: the target pressure test tool of the result and the network card bandwidth measured at the moment are obtained.
And 103, under the condition that the first bandwidth of the target network card is detected to be smaller than the target threshold value, performing core binding, binding interruption and binding interruption core binding tests on the target pressure testing tool, and acquiring a second testing result with the highest bandwidth performance in the testing result, wherein the second testing result is acquired according to the target binding mode, the target thread number, the target connection method and the second bandwidth.
In the embodiment of the invention, in the first test result with the highest bandwidth performance obtained after testing through different pressure test tools, the network card needs to be configured when the first bandwidth of the target network card is detected to be smaller than a target threshold, wherein the target threshold is a threshold for judging that the bandwidth of the network card meets the standard, when the bandwidth of the network card is smaller than the threshold, the bandwidth of the network card does not meet the configuration requirements of a server, the target pressure test tool with the best network card pressure test performance is subjected to a core binding test, a core binding interruption test and a core binding interruption test, the obtained test results are compared, and a second test result with the highest bandwidth performance in the test results is obtained, and the second test result obtained at the moment comprises: and (4) target connection of the target end network card, obtaining a target pressure testing tool of the result, obtaining the target thread number required by the bandwidth performance, and obtaining the target binding mode and the second bandwidth at the moment.
It should be noted that, when it is detected in the obtained first test result that the first bandwidth is greater than or equal to the target threshold, that is, it indicates that the bandwidth performance of the network card at this time meets the standard, no adjustment is needed, and at this time, the first test result may be directly sent to the display screen for reference by the worker to configure the network card. Specifically, the implementation steps comprise:
and sending a first test result to a display screen under the condition that the first bandwidth of the target network card is detected to be not less than the target threshold value.
Therefore, in the embodiment of the present invention, after obtaining a tool with the best network card pressure test performance and the first bandwidth at this time by using the pressure test tool, the first bandwidth is compared with the target threshold value representing the qualified standard of the bandwidth, and according to the obtained different results, the corresponding operation of directly sending the result to the display screen or further configuring the network card is performed.
And 104, sending the second test result to a display screen.
In the embodiment of the invention, the second test result is printed on the display screen for reference of the tester, and the tester can perform corresponding configuration on the network card according to the target binding mode, the target thread number, the target connection method and the second bandwidth in the second test result, so that the final bandwidth of the network card can reach the second bandwidth, and the tuning configuration of the network card is met.
The network card testing method provided by the embodiment of the invention obtains the target connection method of the network card at the target end according to the first command, obtains the first testing result with the highest bandwidth performance in the testing results in different pressure testing tools aiming at the target connection method, carries out the core binding, the binding interruption and the core binding interruption on the target pressure testing tool under the condition that the first bandwidth of the target network card is detected to be smaller than the target threshold value, obtains the second testing result with the highest bandwidth performance in the testing results, and sends the second testing result to the display screen according to the target binding mode, the target thread number, the target connection method and the second bandwidth, thereby realizing the network card connection method, the target thread number and the network card testing information of the target binding mode which can enable the bandwidth performance to be the best, and sending the network card testing information to the display screen, so that the time and the labor cost are greatly saved for workers to refer.
Referring to fig. 2, a flowchart illustrating a second step of the network card testing method provided in the embodiment of the present invention is shown, where the method may include:
In an embodiment of the present invention, a pressure testing tool includes: iperf, iperf3, netperf. Therefore, a third test result is generated according to iperf, a fourth test result is generated according to iperf3, and a fifth test result is generated according to netperf. Specifically, the test command used for generating the third test result according to iperf is the nohup iperf-c network port IP-i 1-t 150-P11 > >3005.Log &, and it should be noted that the meaning of each parameter in this command is: nohup refers to background operation, c specifies a host IP, i refers to an interval of each report, the unit is second, t refers to test duration, P refers to the number of packet sending concurrent threads, > >3005.Log & is to send a test result to a corresponding file, so that the command means that the pressure testing tool iperf operates in the background under the IP of the specified host under the condition that 11 packet sending concurrent threads exist within 150 seconds, the obtained result is reported every 1 second, and all report results are sent to the 3005.Log & file.
The fourth test result is generated according to iperf3 by a test command nohup iperf3-c internet port IP-t150-i 1-P5201-forceflush 5-P11 te-a 5201.Log & and the fifth test result is generated according to netperf by a command nohup netperf-H internet port IP-l 150> log & gt. The embodiment of the present invention may also test the network card through other pressure testing tools, and the present invention is not limited in detail herein.
And 202, acquiring a first test result with the highest bandwidth performance according to the third test result, the fourth test result and the fifth test result.
In the embodiment of the present invention, the steps of testing the network card through iperf, iperf3, and netperf respectively to obtain a third test result, a fourth test result, and a fifth test result, comparing some parameters related to bandwidth performance in the test results, and selecting the test result with the highest bandwidth performance as the first test result include: a target pressure test tool and a first bandwidth. Illustratively, by generating the bandwidth in the third test result from iperf to be 8Mbps, the bandwidth in the fourth test result from iperf3 to be 9Mbps, and the bandwidth in the fifth test result from netperf to be 10Mbps, the fifth test result of the test results having the bandwidth of 10Mbps is selected as the first test result because 10mbps > < 9mbps > < 8mbps.
The network card testing method provided by the embodiment of the invention obtains the target connection method of the network card at the target end according to the first command, obtains the first testing result with the highest bandwidth performance in the testing results in different pressure testing tools aiming at the target connection method, carries out the core binding, the binding interruption and the core binding interruption on the target pressure testing tool under the condition that the first bandwidth of the target network card is detected to be smaller than the target threshold value, obtains the second testing result with the highest bandwidth performance in the testing results, and sends the second testing result to the display screen according to the target binding mode, the target thread number, the target connection method and the second bandwidth, thereby realizing the network card connection method, the target thread number and the network card testing information of the target binding mode which can enable the bandwidth performance to be the best, and sending the network card testing information to the display screen, so that the time and the labor cost are greatly saved for workers to refer.
Referring to fig. 3, a third step flow chart of the network card testing method provided in the embodiment of the present invention is shown, where the method may include:
In the embodiment of the invention, the selected target pressure testing tool is subjected to core binding test, and the condition of the CPU numa node is obtained firstly, wherein the obtained total numa node has 1 and 0 as an example.
And step 302, respectively binding the target end network card and the auxiliary end network card with a full numa node according to a second command to generate a full core binding mode.
In the embodiment of the present invention, the target network card and the auxiliary network card are respectively bound with the full numa node according to the second command to generate the full core binding mode, for example, if the obtained full numa node has 1 and 0, the full core binding mode includes: and binding the target end network card and the auxiliary end network card to 0, binding the target end network card and the auxiliary end network card to 1, and respectively binding the target end network card and the auxiliary end network card to 0 and 1.
And 303, generating a full-amount binding test result according to the target pressure test tool and the full-amount binding mode.
In the embodiment of the invention, after the target network card and the auxiliary network card are selected to be in the corresponding binding mode, the selected target pressure testing tool is used for testing to obtain the total binding testing result.
For example, in the case that the selected target pressure testing tool is iperf, the target pressure testing tool may be implemented by a testing command numactl — cpunoded =0 — membindd =0iperf-c internet port IP-i 1-t 150-P11 > >3005.Log & where numactl — cpunoded =0 — membindd =0 refers to binding the network card to numandoft 0, and the latter command has the same meaning as the iperf testing command, which is not described in detail herein.
The network card testing method provided by the embodiment of the invention obtains the target connection method of the network card at the target end according to the first command, obtains the first testing result with the highest bandwidth performance in the testing results in different pressure testing tools aiming at the target connection method, carries out the core binding, the binding interruption and the core binding interruption on the target pressure testing tool under the condition that the first bandwidth of the target network card is detected to be smaller than the target threshold value, obtains the second testing result with the highest bandwidth performance in the testing results, and sends the second testing result to the display screen according to the target binding mode, the target thread number, the target connection method and the second bandwidth, thereby realizing the network card connection method, the target thread number and the network card testing information of the target binding mode which can enable the bandwidth performance to be the best, and sending the network card testing information to the display screen, so that the time and the labor cost are greatly saved for workers to refer.
Referring to fig. 4, a flowchart illustrating a fourth step of the network card testing method provided in the embodiment of the present invention is shown, where the method may include:
in step 401, the core number is obtained according to the third command.
In the embodiment of the invention, the selected target pressure testing tool is subjected to the binding interruption test, and the number of core is acquired according to a third command, wherein the third command refers to lscpu.
It should be noted that lscpu collects cpu architecture information from sysfs and/proc/cpuinfo, and the information output by the command includes cpu number, thread, core number, socket, and non-Uniform memory Access (NUMA), cache, and the like.
And step 402, generating network ports with target quantity according to the core quantity.
In the embodiment of the present invention, the network ports of the target number are generated according to the core number, where the generated network port number for access is smaller than the core number, and in an example, the number of the obtained cores is 48, and the number of the generated network ports of the target number is 16, and is numbered from 0 to 15.
And step 403, binding the target network card and the auxiliary network card with the number of the target network ports respectively according to the fourth command to generate a target binding interruption mode.
In the embodiment of the present invention, the target network card and the auxiliary network card are respectively bound with the target number of network ports according to the fourth command to generate a target binding interruption mode, for example, the name of the network port corresponding to the generated network port is 0 to 15, and then the binding interruption mode is to bind both the target network card and the auxiliary network card to the corresponding network port.
And step 404, generating a target binding interruption test result according to the target pressure test tool and the target binding interruption mode.
In the embodiment of the invention, after the target network card and the auxiliary network card are selected to be in the corresponding binding interruption modes, the target binding interruption test result is obtained by testing through the selected target pressure test tool.
For example, when the target pressure testing tool is selected to be iperf, the target pressure testing tool can be implemented by a testing command taskset-c 0-15iperf-c network interface IP-i 1-t 150-P11 > >3005.Log, where taskset-c 0-15 refers to binding a network card to a network interface of 0-15, and the latter part of the command has the same meaning as the iperf testing command, which is not described in detail herein. The network card testing method provided by the embodiment of the invention obtains the target connection method of the network card at the target end according to the first command, obtains the first testing result with the highest bandwidth performance in the testing results in different pressure testing tools aiming at the target connection method, carries out the core binding, the binding interruption and the core binding interruption on the target pressure testing tool under the condition that the first bandwidth of the target network card is detected to be smaller than the target threshold value, obtains the second testing result with the highest bandwidth performance in the testing results, and sends the second testing result to the display screen according to the target binding mode, the target thread number, the target connection method and the second bandwidth, thereby realizing the network card connection method, the target thread number and the network card testing information of the target binding mode which can enable the bandwidth performance to be the best, and sending the network card testing information to the display screen, so that the time and the labor cost are greatly saved for workers to refer.
Referring to fig. 5, a flowchart illustrating a fifth step of the network card testing method provided in the embodiment of the present invention is shown, where the method may include:
The manner of acquiring the total numa node in the embodiment of the present invention is the same as that in step 301, and the present invention is not described in detail herein.
And step 502, binding the target end network card and the auxiliary end network card with the full numa node respectively according to the second command to generate a full core binding mode.
In the embodiment of the present invention, the manner of binding the network card of the target end and the network card of the auxiliary end with the full numa node respectively to generate the full amount of binding cores according to the second command is the same as that in step 302, and details of the present invention are not described herein.
And 503, generating a full amount binding and interrupting test result according to the target pressure test tool, the full amount binding mode and the target binding and interrupting mode.
The core-binding interruption of the embodiment of the invention refers to interruption on a corresponding numa node, so that a full-binding interruption test result is generated according to a target pressure test tool, a full-binding mode and a target binding interruption mode, and can be realized by numact-cpunobound = 0-membinded = 0-task = 0-c 0-15iperf-c network port IP-i 1-t 150-P11 > >3005.Log & for example.
The network card testing method provided by the embodiment of the invention obtains the target connection method of the network card at the target end according to the first command, obtains the first testing result with the highest bandwidth performance in the testing results in different pressure testing tools aiming at the target connection method, carries out the core binding, the binding interruption and the core binding interruption on the target pressure testing tool under the condition that the first bandwidth of the target network card is detected to be smaller than the target threshold value, obtains the second testing result with the highest bandwidth performance in the testing results, and sends the second testing result to the display screen according to the target binding mode, the target thread number, the target connection method and the second bandwidth, thereby realizing the network card connection method, the target thread number and the network card testing information of the target binding mode which can enable the bandwidth performance to be the best, and sending the network card testing information to the display screen, so that the time and the labor cost are greatly saved for workers to refer.
Referring to fig. 6, a schematic structural diagram of a network card testing device provided in an embodiment of the present invention is shown, and as shown in fig. 6, the device may include:
the first obtaining module 601 is configured to obtain a target access of the network card of the target end according to the first command.
A second obtaining module 602, configured to obtain, for the target connection, a first test result with the highest bandwidth performance in test results of different pressure test tools, where the first test result is obtained according to the target pressure test tool and the first bandwidth.
A third obtaining module 603, configured to perform a core binding, interruption of binding, and core binding interruption test on the target pressure testing tool when it is detected that the first bandwidth of the target network card is smaller than the target threshold, and obtain a second test result with the highest bandwidth performance in the test result, where the second test result is obtained according to the target binding mode, the target thread number, the target connection method, and the second bandwidth.
And a first sending module 604, configured to send the second test result to the display screen.
Optionally, the first obtaining module further includes:
and the first acquisition submodule is used for acquiring the numa nodes of the target end network card and the auxiliary end network card according to the first command.
And the first determining submodule is used for determining that the target terminal network card and the auxiliary terminal network card are in a first connection mode under the condition that the numa nodes are detected to be consistent.
And the second determining submodule is used for determining that the target terminal network card and the auxiliary terminal network card are in a second connection method under the condition that the numa nodes are detected to be inconsistent.
And the second acquisition submodule is used for acquiring the target connection method of the target terminal network card according to the first connection method or the second connection method.
Optionally, the pressure testing tool comprises: iperf, iperf3, netperf, said second acquisition module further comprising:
the first generation submodule is used for generating a third test result according to the iperf, generating a fourth test result according to the iperf3 and generating a fifth test result according to the netiperf aiming at the target access.
And the third obtaining submodule is used for obtaining a first test result with the highest bandwidth performance according to the third test result, the fourth test result and the fifth test result.
Optionally, the network card testing apparatus further includes:
and the fourth acquisition module is used for acquiring the total numa node.
And the first generation module is used for binding the target end network card and the auxiliary end network card with the full numa node respectively according to the second command to generate a full core binding mode.
And the second generation module is used for generating a full-amount binding test result according to the target pressure test tool and the full-amount binding mode.
Optionally, the network card testing apparatus further includes:
and the fifth obtaining module is used for obtaining the core quantity according to the third command.
And the third generation module is used for generating the network ports with the target quantity according to the core quantity.
And the fourth generation module is used for binding the target end network card and the auxiliary end network card with the network ports of the target quantity respectively according to the fourth command to generate a target binding interruption mode.
And the fifth generation module is used for generating a target binding interruption test result according to the target pressure test tool and the target binding interruption mode.
Optionally, the network card testing apparatus further includes:
and the sixth acquisition module is used for acquiring the total numa node.
And the sixth generating module is used for binding the target end network card and the auxiliary end network card with the full numa node respectively according to the second command to generate a full core binding mode.
And the seventh generation module is used for generating a full-amount core binding and interrupting test result according to the target pressure test tool, the full-amount core binding mode and the target core binding and interrupting mode.
And the second sending module is used for sending the first test result to the display screen under the condition that the first bandwidth of the target network card is detected to be not less than the target threshold value.
The network card testing method provided by the embodiment of the invention obtains the target connection method of the network card at the target end according to the first command, obtains the first testing result with the highest bandwidth performance in the testing results in different pressure testing tools aiming at the target connection method, carries out the core binding, the binding interruption and the core binding interruption on the target pressure testing tool under the condition that the first bandwidth of the target network card is detected to be smaller than the target threshold value, obtains the second testing result with the highest bandwidth performance in the testing results, and sends the second testing result to the display screen according to the target binding mode, the target thread number, the target connection method and the second bandwidth, thereby realizing the network card connection method, the target thread number and the network card testing information of the target binding mode which can enable the bandwidth performance to be the best, and sending the target network card testing information to the display screen for the reference of working personnel, and greatly saving time and labor cost.
An embodiment of the present invention further provides a communication device, as shown in fig. 7, including a processor 701, a communication interface 702, a memory 703 and a communication bus 704, where the processor 701, the communication interface 702, and the memory 703 complete mutual communication through the communication bus 704,
a memory 703 for storing a computer program;
the processor 701 is configured to implement the following steps when executing the program stored in the memory 703:
acquiring a target connection method of a target terminal network card according to the first command;
aiming at a target connection method, obtaining a first test result with the highest bandwidth performance in test results in different pressure test tools, wherein the first test result is obtained according to the target pressure test tool and the first bandwidth;
under the condition that the first bandwidth of the target network card is smaller than the target threshold value, performing core binding, binding interruption and binding interruption core binding tests on the target pressure testing tool to obtain a second testing result with the highest bandwidth performance in the testing result, wherein the second testing result is obtained according to the target binding mode, the target thread number, the target connection method and the second bandwidth;
and sending the second test result to a display screen.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, a computer-readable storage medium is further provided, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is caused to execute the network card testing method described in any one of the above embodiments.
In another embodiment of the present invention, a computer program product containing instructions is further provided, which when run on a computer, causes the computer to execute any of the network card testing methods described in the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may 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 loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, as for the system embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (10)
1. A network card testing method is characterized by comprising the following steps:
acquiring a target connection method of a target network card according to the first command;
aiming at the target connection method, obtaining a first test result with the highest bandwidth performance in test results of different pressure test tools, wherein the first test result is obtained according to the target pressure test tool and the first bandwidth;
under the condition that the first bandwidth of the target network card is smaller than a target threshold value, performing core binding, binding interruption and binding interruption core binding tests on the target pressure testing tool to obtain a second testing result with the highest bandwidth performance in the testing result, wherein the second testing result is obtained according to a target binding mode, a target thread number, a target connection method and a second bandwidth;
and sending the second test result to a display screen.
2. The method of claim 1, wherein the obtaining the target connection of the target-side network card according to the first command comprises:
acquiring model nodes numa nodes of the target end network card and the auxiliary end network card according to a first command;
under the condition that the numa node is detected to be consistent, determining that the target end network card and the auxiliary end network card are in a first connection method;
under the condition that the numa node is detected to be inconsistent, determining that the target end network card and the auxiliary end network card are in a second connection method;
and acquiring the target connection method of the target terminal network card according to the first connection method or the second connection method.
3. The method of claim 1, wherein the pressure testing tool comprises: ip erf, iperf3, and netperf, wherein the obtaining a first test result with the highest bandwidth performance among test results in different pressure test tools, for the target connection, includes:
aiming at the target connection method, generating a third test result according to the iperf, generating a fourth test result according to the iperf3, and generating a fifth test result according to the netiperf;
and acquiring the first test result with the highest bandwidth performance according to the third test result, the fourth test result and the fifth test result.
4. The method of claim 1, wherein prior to said obtaining a second test result with a highest bandwidth performance among the test results, the method further comprises:
acquiring a total amount of numa nodes;
binding the target end network card and the auxiliary end network card with the full numa node respectively according to a second command to generate a full core binding mode;
and generating a full-amount binding test result according to the target pressure test tool and the full-amount binding mode.
5. The method of claim 1, wherein prior to said obtaining a second test result with a highest bandwidth performance among the test results, the method further comprises:
acquiring the core quantity according to the third command;
generating network ports with target quantity according to the core quantity;
binding the target end network card and the auxiliary end network card with the network ports of the target number respectively according to a fourth command to generate a target binding interruption mode;
and generating a target binding interruption test result according to the target pressure test tool and the target binding interruption mode.
6. The method according to claim 5, wherein after the target-side network card and the auxiliary-side network card are respectively bound with a target number of network ports according to a fourth command to generate a target binding interruption manner, the method further comprises:
acquiring a total number of numa nodes;
binding the target end network card and the auxiliary end network card with the full numa node respectively according to a second command to generate a full core binding mode;
and generating a full-amount core binding interruption test result according to the target pressure test tool, the full-amount core binding mode and the target core binding interruption mode.
7. The method of claim 1, wherein prior to said performing said banding, band breaking and band break banding tests on said target stress testing tool in the event that said first bandwidth of said target network card is detected to be less than a target threshold, said method further comprises:
and sending the first test result to a display screen under the condition that the first bandwidth of the target network card is detected to be not less than a target threshold value.
8. A network card testing device, comprising:
the first acquisition module is used for acquiring a target connection method of the target terminal network card according to the first command;
a second obtaining module, configured to obtain, for the target connection, a first test result with highest bandwidth performance among test results in different pressure test tools, where the first test result is obtained according to the target pressure test tool and the first bandwidth;
a third obtaining module, configured to perform core binding, core binding interruption, and core binding interruption tests on the target pressure testing tool when it is detected that the first bandwidth of the target network card is smaller than a target threshold, and obtain a second test result with the highest bandwidth performance in the test results, where the second test result is obtained according to a target binding mode, a target thread number, a target connection method, and a second bandwidth;
and the first sending module is used for sending the second test result to a display screen.
9. A communication device, comprising: a transceiver, a memory, a processor, and a program stored on the memory and executable on the processor;
the processor is configured to read the program in the memory to implement the steps in the network card testing method according to any one of claims 1 to 7.
10. A readable storage medium for storing a program, wherein the program, when executed by a processor, implements the steps in the network card testing method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211384290.5A CN115622916A (en) | 2022-11-07 | 2022-11-07 | Network card testing method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211384290.5A CN115622916A (en) | 2022-11-07 | 2022-11-07 | Network card testing method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115622916A true CN115622916A (en) | 2023-01-17 |
Family
ID=84878735
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211384290.5A Pending CN115622916A (en) | 2022-11-07 | 2022-11-07 | Network card testing method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115622916A (en) |
-
2022
- 2022-11-07 CN CN202211384290.5A patent/CN115622916A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017000424A1 (en) | Protocol detection method and apparatus | |
CN110618903A (en) | Electronic equipment testing method and device | |
CN113472607B (en) | Application program network environment detection method, device, equipment and storage medium | |
US8752027B2 (en) | Injecting faults into program for testing software | |
CN111522728A (en) | Method for generating automatic test case, electronic device and readable storage medium | |
US20090204851A1 (en) | Method and System for Software Testing | |
CN109218407B (en) | Code management and control method based on log monitoring technology and terminal equipment | |
CN111176918A (en) | Server testing method, system, equipment and computer readable storage medium | |
CN113468009B (en) | Pressure testing method and device, electronic equipment and storage medium | |
CN101800672A (en) | Equipment detection method and equipment | |
CN110888804B (en) | Interface test method and interface test platform | |
CN103186447B (en) | Bus read-write detection device | |
CN116302736A (en) | Method and device for testing components of server, electronic equipment and storage medium | |
CN112019404A (en) | Method and device for automatically testing FC-AE-1553 communication protocol chip | |
CN115622916A (en) | Network card testing method, device, equipment and storage medium | |
US8407175B2 (en) | Method, apparatus and product for SAT solving using templates clauses | |
CN110381035A (en) | Network security test method, device, computer equipment and readable storage medium storing program for executing | |
CN115914062A (en) | Network card testing method and device, electronic equipment and storage medium | |
CN113360389A (en) | Performance test method, device, equipment and storage medium | |
CN113722265A (en) | Debugging optimization method and device for interconnection channel in multi-CPU system | |
CN112231236A (en) | Method for testing database performance | |
CN108255715B (en) | Test result processing method and terminal equipment | |
CN111680395B (en) | Reliability comprehensive verification test method and device, electronic equipment and storage medium | |
CN112905602B (en) | Data comparison method, computing device and computer storage medium | |
CN116302758A (en) | Power failure detection method, device, communication equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |