File transfer performance testing method and device, electronic device, and storage medium
Through the SOL function of the remote control host side, the network port information of the smart network card is obtained and the test files are automatically created and transferred, which solves the problem of long and error-prone testing of the smart network card file transfer performance in the existing technology, and realizes efficient and accurate automated testing.
Patent Information
- Application Number
- CN202211447205.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-18
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-11-18
AI Technical Summary
When testing the file transfer performance of smart network cards, the existing technology requires manual configuration of IP, creation and comparison of large files, resulting in a long test time, prone to errors, and needs to enter the computer room to operate, affecting health.
The network serial port SOL function is activated by remote control of the host side, obtain the network port information of the smart network card, configure the IP address, create a test file, and send the file to the auxiliary test end through the SOL function to obtain the received file information, and automatically compare the file information to determine the file transfer performance.
Remote automatic testing of smart network cards is realized, which improves the efficiency and accuracy of file transfer performance testing, reduces manual operations, and reduces the impact of noise on testers.
Smart Images

Figure CN115811480B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network testing technology, and in particular to a method and device for testing file transmission performance, an electronic device, and a storage medium. Background Art
[0002] With the popularization of Internet applications, both servers and terminal computers need to access the network for data exchange and information transmission. Network cards, also known as network adapters or network interface cards, are hardware devices that provide network information interaction functions for servers or terminal computers. Especially for servers, network cards, as one of their essential hardware devices, need to have strong data throughput capabilities and long-term operating reliability. Usually, technicians need to pre-evaluate the performance of network cards before configuring network card devices, or regularly pay attention to the performance of network cards and monitor the working status of network cards during use. Therefore, it is necessary to test the performance of network cards.
[0003] In order to improve the processing power of the server, a smart network card will be configured. In addition to completing the network transmission function of the standard network card, it also provides a built-in programmable and configurable hardware acceleration engine to improve the performance of the application and greatly reduce the consumption of the central processing unit (CPU) in communication, providing more CPU resources for the application. File transfer performance is a particularly important function besides the basic network communication function of the network card. When testing the file transfer performance, the test personnel of the prior art need to use an external display device to enter the internal operating system of the network card through the in-band instruction method, manually configure the Internet Protocol (IP) of the smart network card, create a large file, and transfer the file to the test machine through the file transfer command. After the transfer is completed, the file in the test machine is obtained and compared with the file in the smart network card. The whole process not only takes up a lot of test time for the test personnel, but also is prone to errors in the file comparison process, resulting in inaccurate test results; in addition, since the test personnel need to enter the computer room or laboratory for operation, the noise in the operating space will also affect the health of the test personnel.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] In view of the above problems, the present application is proposed to provide a method and device for testing file transmission performance, an electronic device, and a storage medium that overcome the above problems or at least partially solve the above problems, including:
[0006] A method for testing file transfer performance, the method is used to test the file transfer performance of a smart network card configured in a host end; the method comprises:
[0007] Remotely control the host end to start the network serial port SOL function, and obtain the network port information of the smart network card through the SOL function;
[0008] Determine a network port configuration file of the smart network card according to the network port information, and configure a first IP address of the smart network card in the network port configuration file;
[0009] Creating a test file in the smart network card through the SOL function and the first IP address, determining the first file information of the test file, and controlling the smart network card to send the test file to the auxiliary test end; the auxiliary network card of the auxiliary test end has passed the file transfer performance test in advance;
[0010] Acquire second file information of a received file corresponding to the test file and received by the auxiliary test end;
[0011] A test result of the file transmission performance of the smart network card is determined according to the first file information and the second file information.
[0012] Optionally, the first file information is a first MD5 code, and the second file information is a second MD5 code; and determining the first file information of the test file includes:
[0013] According to the test file, a first MD5 code of the test file is calculated.
[0014] Optionally, the acquiring second file information of a received file corresponding to the test file and received by the auxiliary test end includes:
[0015] Controlling the auxiliary test end to calculate a second MD5 code of the received file based on the received file corresponding to the test file;
[0016] or,
[0017] A received file corresponding to the test file received by the auxiliary test end is obtained, and a second MD5 code of the received file is calculated.
[0018] Optionally, before controlling the smart network card to send the test file to the auxiliary test end, the method further includes:
[0019] A second IP address of the auxiliary network card of the auxiliary test terminal is configured, where the second IP address and the first IP address belong to the same network segment.
[0020] Optionally, configuring the second IP address of the auxiliary network card of the auxiliary test terminal includes:
[0021] Remotely control the auxiliary test terminal to execute the specified command to obtain the auxiliary network card port information;
[0022] The auxiliary network card network port configuration file is determined according to the auxiliary network card network port information, and the second IP address of the auxiliary network card is configured in the auxiliary network card network port configuration file.
[0023] Optionally, before controlling the smart network card to send the test file to the auxiliary test terminal, the method further includes:
[0024] Determine whether the network between the host terminal and the auxiliary test terminal is unobstructed;
[0025] If yes, the smart network card is controlled to send the test file to the auxiliary test terminal.
[0026] Optionally, the method further comprises:
[0027] Set the graphic display position to display the relevant information of the smart network card on the host side.
[0028] Optionally, determining a test result of the file transmission performance of the smart network card according to the first file information and the second file information includes:
[0029] When the first file information and the second file information are the same, it is determined that the file transmission performance of the smart network card is normal.
[0030] Optionally, the remotely controlling the host end to start a network serial port SOL function, and obtaining the network port information of the smart network card through the SOL function, includes:
[0031] Remotely control the host end to start the network serial port SOL function;
[0032] Check whether the network serial port SOL function of the host is normal;
[0033] If normal, the network port information of the smart network card is obtained through the SOL function.
[0034] A device for testing file transfer performance, the device is used to test the file transfer performance of a smart network card configured in a host end; the device comprises:
[0035] A network port information acquisition module, used to remotely control the host end to start the network serial port SOL function, and obtain the network port information of the smart network card through the SOL function;
[0036] A first address configuration module, used to determine a network port configuration file of the smart network card according to the network port information, and configure a first IP address of the smart network card in the network port configuration file;
[0037] A first file information acquisition module is used to create a test file in the smart network card through the SOL function and the first IP address, determine the first file information of the test file, and control the smart network card to send the test file to the auxiliary test end; the auxiliary network card of the auxiliary test end has passed the file transfer performance test in advance;
[0038] A second file information acquisition module, used to acquire second file information of a received file corresponding to the test file and received by the auxiliary test end;
[0039] A test result determination module is used to determine a test result of the file transmission performance of the smart network card according to the first file information and the second file information.
[0040] Optionally, the first file information is a first MD5 code, and the second file information is a second MD5 code; the first file information acquisition module includes:
[0041] The first MD5 code calculation submodule is used to calculate the first MD5 code of the test file according to the test file.
[0042] Optionally, the second file information acquisition module is used to control the auxiliary test end to calculate the second MD5 code of the received file based on the received file corresponding to the test file; or, to obtain the second MD5 code of the received file based on the received file corresponding to the test file received by the auxiliary test end, and calculate the second MD5 code of the received file.
[0043] Optionally, the device further comprises:
[0044] The second address configuration module is used to configure the second IP address of the auxiliary network card of the auxiliary test end, and the second IP address and the first IP address belong to the same network segment.
[0045] Optionally, the second address configuration module includes:
[0046] The first control submodule is used to remotely control the auxiliary test terminal to execute a specified command to obtain the auxiliary network card port information;
[0047] The second IP address configuration submodule is used to determine the auxiliary network card network port configuration file according to the auxiliary network card network port information, and configure the second IP address of the auxiliary network card in the auxiliary network card network port configuration file.
[0048] Optionally, the device further comprises:
[0049] A network accessibility judgment module, used to judge whether the network between the host terminal and the auxiliary test terminal is unobstructed;
[0050] The first judgment result processing module is used to control the intelligent network card to send the test file to the auxiliary test terminal.
[0051] Optionally, the device further comprises:
[0052] The display setting module is used to set the graphic display position to display the relevant information of the intelligent network card on the host side.
[0053] Optionally, the test result determination module is used to determine that the file transmission performance of the smart network card is normal when the first file information and the second file information are the same.
[0054] Optionally, the network port information acquisition module includes:
[0055] The SOL function starter module is used to remotely control the host end to start the network serial port SOL function;
[0056] The SOL function detection submodule is used to detect whether the SOL function of the network serial port of the host end is normal;
[0057] The information acquisition submodule is used to obtain the network port information of the smart network card through the SOL function if it is normal.
[0058] An electronic device comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the steps of the above-mentioned method for testing file transfer performance when executed by the processor.
[0059] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for testing file transfer performance as described above.
[0060] This application has the following advantages:
[0061] In an embodiment of the present application, the network serial port SOL function is started by remotely controlling the host end, and the network port information of the smart network card is obtained through the SOL function; the network port configuration file of the smart network card is determined according to the network port information, and the first IP address of the smart network card is configured in the network port configuration file; a test file is created in the smart network card through the SOL function and the first IP address, the first file information of the test file is determined, and the smart network card is controlled to send the test file to the auxiliary test end; the second file information of the received file corresponding to the test file received by the auxiliary test end is obtained; the test result of the file transfer performance of the smart network card is determined according to the first file information and the second file information; thereby realizing remote automatic testing of the file transfer performance of the smart network card and improving the efficiency and accuracy of the file transfer performance testing of the smart network card. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0063] Figure 1 A flowchart of a method for testing file transfer performance according to an embodiment of the present application;
[0064] Figure 2 This is a flowchart of a method for testing file transfer performance according to an example of the present application;
[0065] Figure 3 A flowchart of another method for testing file transfer performance according to an embodiment of the present application;
[0066] Figure 4 A structural block diagram of a file transmission performance testing device according to an embodiment of the present application;
[0067] Figure 5 A structural block diagram of an electronic device according to an embodiment of the present application;
[0068] Figure 6 A schematic diagram of a computer-readable storage medium according to an embodiment of the present application. DETAILED DESCRIPTION
[0069] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0070] File transfer performance is a particularly important function besides the basic network communication function of the network card. When testing file transfer performance, the existing technical testers need to use an external display device to enter the internal operating system of the network card through in-band instructions, manually configure the IP of the smart network card, create a large file, and transfer the file to the test machine through the file transfer command. After the transfer is completed, the file in the test machine is obtained and compared with the file in the smart network card. The whole process not only takes up a lot of test time for the testers, but is also prone to errors in the file comparison process, resulting in inaccurate test results. In addition, since the testers need to enter the computer room or laboratory to operate, the noise in the operating space will also affect the health of the testers.
[0071] In view of this, an embodiment of the present application proposes a method for testing file transfer performance, which starts the network serial port (Serial Over LAN, SOL) function by remotely controlling the host end, and obtains the network port information of the smart network card through the SOL function; determines the network port configuration file of the smart network card according to the network port information, and configures the first IP address of the smart network card in the network port configuration file; creates a test file in the smart network card through the SOL function and the first IP address, determines the first file information of the test file, and controls the smart network card to send the test file to the auxiliary test end; obtains the second file information of the received file received by the auxiliary test end and corresponding to the test file; determines the test result of the file transfer performance of the smart network card according to the first file information and the second file information; thereby realizing remote and automatic testing of the file transfer performance of the smart network card, and improving the efficiency and accuracy of the file transfer performance testing of the smart network card.
[0072] It can be understood that one of the core concepts of this application is to remotely connect to the smart network card, configure the IP address of the smart network card, and remotely control the smart network card to automatically create and transmit test files, so as to automatically test the file transfer performance of the smart network card.
[0073] Reference Figure 1 , shows a flowchart of a method for testing file transfer performance provided by an embodiment of the present application, which can be executed by a local terminal device and is used to test the file transfer performance of a smart network card configured in a host end, wherein the host end can be considered as any device configured with a smart network card, and the local terminal device can be considered as an execution machine for the tester to operate. In an embodiment of the present application, the method for testing file transfer performance may include the following steps:
[0074] Step 101: remotely control the host end to start the network serial port SOL function, and obtain the network port information of the smart network card through the SOL function.
[0075] SOL refers to a mechanism to redirect the serial I / O in the system through an IP-based Intelligent Platform Management Interface (IPMI) session. Among them, IPMI is a new generation of universal interface standards that make hardware management "intelligent". Users can use IPMI to monitor the physical characteristics of the device, such as temperature, voltage, fan working status, power supply, and chassis intrusion.
[0076] The tester can remotely connect to the host side of the smart network card configured with the file transfer performance to be tested through the execution machine, and start the SOL function by remotely controlling the host side, so as to obtain the network port information of the smart network card configured on the host side through the SOL function started by the host side.
[0077] Optionally, in order to ensure that the host side switches to the smart network card mode during the test, in some embodiments, before the above-mentioned remote control of the host side to start the network serial port SOL function may also include:
[0078] Remotely control the host to enable the in-band command of the host, and control the host to switch to the smart network card mode.
[0079] The execution machine remotely controls the host to enable the in-band command of the host, and controls the host to switch to the smart network card mode to enter the internal operating system of the network card and perform the subsequent file transfer test process.
[0080] Optionally, in order to facilitate the tester to understand the running process of the host side in real time, in an optional embodiment of the present application, it may also include:
[0081] Set the graphic display position to display the relevant information of the smart network card on the host side.
[0082] Exemplarily, the execution machine can set the graphic display position by running the export DISPLAY command to display the relevant information of the intelligent network card on the host side on the display of the execution machine, so as to understand the test process in real time.
[0083] Whether the SOL function of the host side is started normally will affect the subsequent test steps. Therefore, in an optional embodiment of the present application, the above-mentioned control of the host side to start the network serial port SOL function and obtain the network port information of the smart network card through the SOL function may include:
[0084] Control the host end to start the network serial port SOL function;
[0085] Check whether the network serial port SOL function of the host is normal;
[0086] If normal, the network port information of the smart network card is obtained through the SOL function.
[0087] In this implementation, after controlling the host side to start the SOL function, it is also necessary to detect whether the SOL function of the host side is normal. For example, the execution machine can detect whether the SOL of the host side is normal by running the xdotool command and the terminal number of the host side. If normal, the network port information of the smart network card can be obtained by controlling the SOL function of the host side; if abnormal, the steps of controlling the host side to start the network serial port SOL function can be re-executed.
[0088] Step 102: determine a network port configuration file of the smart network card according to the network port information, and configure a first IP address of the smart network card in the network port configuration file.
[0089] After obtaining the network port information of the smart network card configured on the host side, the execution machine can determine the network port configuration file of the smart network card according to the network port information, and then configure the first IP address of the smart network card in the network port configuration file.
[0090] Step 103, create a test file in the smart network card through the SOL function and the first IP address, determine the first file information of the test file, and control the smart network card to send the test file to the auxiliary test end; the auxiliary network card of the auxiliary test end has passed the file transfer performance test in advance.
[0091] In the process of testing the intelligent network card on the host side, an auxiliary test terminal is needed to assist in completing the test, and the auxiliary test terminal receives the test file sent from the intelligent network card on the host side.
[0092] Therefore, the execution machine can also communicate with the auxiliary test terminal. In the process of testing the file transfer performance of the smart network card configured on the host side, it is necessary to specify a terminal for receiving the test file sent by the smart network card on the host side. In this embodiment, the terminal for receiving the test file sent by the smart network card on the host side is recorded as the auxiliary test terminal. Through the SOL function and the first IP address of the host side, a test file can be created on the smart network card, and the first file information of the test file can be determined. The first file information is used to subsequently determine whether the file transfer performance of the smart network card is normal; then the smart network card is controlled to send the test file to the auxiliary test terminal.
[0093] In order to enable the host end and the auxiliary test end to communicate normally, it is necessary to configure the IP address of the auxiliary network card of the auxiliary test end, that is, the second IP address, and the second IP address of the auxiliary network card and the first IP address of the smart network card need to be in the same network segment.
[0094] That is, before controlling the smart network card to send the test file to the auxiliary test end, it also includes:
[0095] Configure a second IP address of the auxiliary network card of the auxiliary test end; the second IP address and the first IP address belong to the same network segment; wherein the auxiliary network card has passed the file transfer performance test in advance.
[0096] In an optional embodiment of the present application, the second IP address of the auxiliary network card of the auxiliary test terminal may include:
[0097] Remotely control the auxiliary test terminal to execute the specified command to obtain the auxiliary network card port information;
[0098] The auxiliary network card network port configuration file is determined according to the auxiliary network card network port information, and the second IP address of the auxiliary network card is configured in the auxiliary network card network port configuration file.
[0099] In this embodiment, the execution machine is remotely connected to the auxiliary test end. The execution machine executes corresponding commands by remotely controlling the auxiliary test machine to obtain the auxiliary network card network port information, and then determines the auxiliary network card network port configuration file based on the auxiliary network card network port information, and then configures the second IP address of the auxiliary network card in the auxiliary network card network port configuration file. The second IP address and the first IP address belong to the same network segment, which is a prerequisite for ensuring that the host end and the auxiliary test end can communicate normally.
[0100] In order to prevent the function of the auxiliary network card configured by the auxiliary test end from affecting the test results of the file transfer performance of the smart network card, in an embodiment of the present application, the auxiliary network card configured by the auxiliary test end has passed the file transfer performance test in advance, that is, the file transfer performance of the auxiliary network card of the auxiliary test end is normal. Therefore, the influence of the performance of the auxiliary network card of the auxiliary test end on the test results can be avoided.
[0101] After configuring the first IP address of the smart network card and the second IP address of the auxiliary network card, and confirming that the smart network card and the auxiliary network card can communicate normally, a test file can be created on the smart network card through the SOL function of the host side and the first IP address, and the first file information of the test file can be determined. The first file information is used to subsequently determine whether the file transfer performance of the smart network card is normal; then the smart network card is controlled to send the test file to the auxiliary test end.
[0102] Step 104: Acquire second file information of a received file corresponding to the test file and received by the auxiliary test end.
[0103] The auxiliary test terminal can receive a receiving file corresponding to the test file sent by the smart network card. It can be understood that when the file transmission performance of the smart network card is normal, the receiving file corresponding to the test file received by the auxiliary test terminal is the test file. When the file transmission performance of the smart network card is abnormal, the receiving file corresponding to the test file received by the auxiliary test terminal is different from the test file.
[0104] The auxiliary test end can obtain the second file information based on the received file corresponding to the test file, and send the second file information to the execution machine; or, the auxiliary test end can send the received file corresponding to the test file to the execution machine, and the execution machine obtains the second file information based on the received file.
[0105] In a preferred embodiment of the present application, the first file information may be an MD5 (MD5 Message-Digest Algorithm) code of the test file, recorded as the first MD5 code; the second file information is the MD5 code of the received file, recorded as the second MD5 code. Determining the first file information of the test file may include: calculating the first MD5 code of the test file according to the test file.
[0106] Specifically, a 128-bit feature code, namely the first MD5 code, can be obtained by mathematically transforming the test file according to the public MD5 algorithm. It can be understood that the unique corresponding test file can be determined by the first MD5 code.
[0107] The obtaining of the second file information obtained by the auxiliary test based on the received file corresponding to the test file may include:
[0108] Controlling the auxiliary test end to calculate a second MD5 code of the received file based on the received file corresponding to the test file;
[0109] or,
[0110] Obtain a received file corresponding to the test file received by the auxiliary test end, and calculate a second MD5 code of the received file.
[0111] It can be understood that the second MD5 code of the received file can be obtained by the auxiliary test end after mathematically transforming the received file according to the public MD5 algorithm, or by the execution machine after mathematically transforming the received file obtained from the auxiliary test end according to the public MD5 algorithm.
[0112] In this embodiment, the first file information is specifically the first MD5 code of the test file, and the second file information is specifically the second MD5 code of the received file. Combined with the characteristic of fewer bytes of the MD5 code, the efficiency of subsequently determining the test results of the file transmission performance of the smart network card by comparing the first file information and the second file information can be improved; combined with the characteristic of one-to-one correspondence between the MD5 code and the file, the accuracy of subsequently determining the test results of the file transmission performance of the smart network card by comparing the first file information and the second file information can be improved.
[0113] Step 105: Determine a test result of the file transmission performance of the smart network card according to the first file information and the second file information.
[0114] The first file information is used to represent the file information of the test file at the sending end, and the second file information is used to represent the file information of the test file at the receiving end. Therefore, the test result of the file transmission performance of the smart network card can be determined based on the first file information and the second file information.
[0115] Specifically, when the first file information is the same as the second file information, it indicates that the file transmission performance of the smart network card is normal, that is, the test result of the file transmission performance of the smart network card is normal.
[0116] When the first file information is different from the second file information, it indicates that the test file has changed during the transmission process, that is, the smart network card cannot correctly transmit the file, and the test result of the file transmission performance of the smart network card is abnormal.
[0117] Optionally, the smart network card may be controlled to send a test file multiple times, and a final test result of the file transmission performance of the smart network card may be determined based on the multiple test results.
[0118] The embodiment of the present application starts the network serial port SOL function by remotely controlling the host end, obtains the network port information of the smart network card through the SOL function; determines the network port configuration file of the smart network card according to the network port information, and configures the first IP address of the smart network card in the network port configuration file; creates a test file in the smart network card through the SOL function and the first IP address, determines the first file information of the test file, and controls the smart network card to send the test file to the auxiliary test end; obtains the second file information of the received file received by the auxiliary test end and corresponding to the test file; determines the test result of the file transmission performance of the smart network card according to the first file information and the second file information; thereby realizing remote automatic testing of the file transmission performance of the smart network card, and improving the efficiency and accuracy of the file transmission performance testing of the smart network card.
[0119] Next, we will combine Figure 2 The example of further illustrates the test method of file transfer performance in the embodiment of the present application.
[0120] In step 201, the host side is remotely controlled to enable an in-band command of the host side, and the host side is controlled to switch to a smart network card mode.
[0121] In a specific example of the present application, the tester can control the execution machine to run the ipmtool command to remotely control the host to execute the raw command to enable the host's in-band command. The execution machine then remotely controls the host to execute the raw command through the ipmtool command to switch the host to the smart network card mode.
[0122] Among them, ipmitool is a command-line-based ipmi platform management tool that can be used in Linux / Unix systems. It supports ipmi1.5 and ipmi2.0 specifications (the latest specification is ipmi 2.0). It can be used to obtain sensor information, display system log content, and remotely switch on and off the machine over the network. Its main functions include reading and displaying sensor data (SDR), displaying the content of the System Evernt Log (SEL), displaying and printing field replaceable unit (FRU) information, reading and setting the network (Local Area Network, LAN) configuration of the baseboard management controller (BaseboardManager Controller, BMC) module, and remotely controlling the power supply of the server host.
[0123] ipmitool supports IPMI-over-LAN and device driver interfaces in the system kernel (openIPMI in Linux, BMC in Solaris, openIPMI in FreeBSD). It can be run locally or on a remote machine to manage and control the host.
[0124] The raw command is one of the commonly used operation commands of ipmitool.
[0125] In step 202, the host is remotely controlled to start the network serial port SOL function, and the network port information of the smart network card is obtained through the SOL function.
[0126] In a specific example of the present application, the execution machine starts the SOL function of the host side by running the gnome-terminal command. The execution machine obtains the terminal number of the host side by running the xdotool command, and then determines whether it is a SOL terminal by running the xdotool command + terminal number. If so, the control of the SOL function of the host side can be completed by running the xdotool command + terminal number.
[0127] The execution machine completes the remote operation of inputting and executing relevant commands in the smart network card system by running the xdotool command. The execution machine executes the ifconfig command through the SOL function to obtain the network port information of the smart network card.
[0128] In step 203, a network port configuration file of the smart network card is determined according to the network port information, and a first IP address of the smart network card is configured in the network port configuration file.
[0129] In a specific example of the present application, the execution machine executes the vim ifconfig-network-port command through the SOL function to write information such as IPADDR=1.1.km and subnet mask into the ifcfg-network-port file of the smart network card to complete the automatic configuration of the IP address of the smart network card.
[0130] In step 204, a second IP address of the auxiliary network card of the auxiliary test end is configured; the second IP address and the first IP address belong to the same network segment; wherein the auxiliary network card has passed the file transfer performance test in advance.
[0131] In a specific example of the present application, the execution machine remotely controls the auxiliary test end through the Secure Shell (SSH) protocol to execute the command ifconfig to obtain the network port information of the auxiliary network card, and then the execution machine remotely controls the auxiliary test end through the SSH protocol to execute the command vim ifconfig-network port to write IPADDR=1.1.kn, subnet mask and other information into the network card ifcfg-network port file to complete the remote configuration of the auxiliary test end IP address. Where n is not equal to m, that is, the first IP address is different from the second IP address, when the first IP address and the second IP address belong to the same network segment.
[0132] In step 205, a test file is created in the smart network card through the SOL function and the first IP address, first file information of the test file is determined, and the smart network card is controlled to send the test file to the auxiliary test terminal.
[0133] In a specific example of the present application, the execution machine creates a test file of no less than 50G through the SOL function execution command, and obtains the first MD5 code of the test file through the instruction. The execution machine then transfers the file to the auxiliary test terminal through the SOL function execution command.
[0134] In step 206, second file information of a received file corresponding to the test file and received by the auxiliary test end is obtained.
[0135] In a specific example of the present application, after the test file is transmitted, the execution machine remotely controls the test end through the SSH protocol to obtain the second MD5 code of the received file.
[0136] In step 207, a test result of the file transmission performance of the smart network card is determined according to the first file information and the second file information.
[0137] In a specific example of the present application, after obtaining the first MD5 code and the second MD5 code, the execution machine determines the file transmission performance of the smart network card by comparing the first MD5 code and the second MD5 code.
[0138] The embodiment of the present application realizes configuring the IP address of the smart network card by remotely connecting to the smart network card, and realizes automatic testing of the file transfer performance of the smart network card, which solves the inconvenience of the prior art that testers need to enter the computer room to operate. Through the automatic testing logic of the embodiment of the present application, the execution machine automatically executes the corresponding commands to realize automatic testing of the file transfer performance of the smart network card, which can reduce the number of manual operations and improve the testing efficiency. The whole testing process is coherent, which can effectively avoid the problem of unstable host SOL function affecting the test results.
[0139] Reference Figure 3 , shows a flowchart of a method for testing file transfer performance provided by an embodiment of the present application. In the embodiment of the present application, the method for testing file transfer performance may include the following steps:
[0140] Step 301, remotely controlling the host to enable an in-band command of the host, and controlling the host to switch to a smart network card mode.
[0141] The tester can remotely connect to the host side of the smart network card configured with the file transfer performance to be tested through the execution machine, remotely control the host side through the execution machine to enable the host side's in-band command, and control the host side to switch to the smart network card mode to enter the internal operating system of the network card and execute the subsequent file transfer test process.
[0142] Step 302: remotely control the host end to start the network serial port SOL function, and obtain the network port information of the smart network card through the SOL function.
[0143] The SOL function is started by controlling the host side so that the network port information of the smart network card configured on the host side can be obtained through the SOL function started by the host side.
[0144] Step 303: determine a network port configuration file of the smart network card according to the network port information, and configure a first IP address of the smart network card in the network port configuration file.
[0145] After obtaining the network port information of the smart network card configured on the host side, the execution machine can determine the network port configuration file of the smart network card according to the network port information, and then configure the first IP address of the smart network card in the network port configuration file.
[0146] Step 304, configure a second IP address of the auxiliary network card of the auxiliary test end; the second IP address and the first IP address belong to the same network segment; wherein the auxiliary network card has passed the file transfer performance test in advance.
[0147] The execution machine can also be connected to the auxiliary test terminal for communication, and the auxiliary test terminal is used to receive the test file sent by the intelligent network card of the host side. In order to prevent the function of the auxiliary network card configured by the auxiliary test terminal from affecting the test result of the file transfer performance of the intelligent network card, in the embodiment of the present application, the auxiliary network card configured by the auxiliary test terminal passes the file transfer performance test in advance, that is, the file transfer performance of the auxiliary network card of the auxiliary test terminal is normal, so the influence of the performance of the auxiliary network card of the auxiliary test terminal on the test result can be avoided.
[0148] Step 305, determine whether the network between the host end and the auxiliary test end is unobstructed; if it is unobstructed, execute step 306; if it is not unobstructed, return to step 303 to reconfigure the first IP address of the smart network card and the second IP address of the auxiliary network card.
[0149] Whether the network between the host side and the auxiliary test side is unobstructed will affect the test process and test results. Therefore, in an embodiment of the present application, before sending the test file, it is necessary to determine whether the network between the host side and the auxiliary test side is unobstructed. If it is unobstructed, the step of sending the test file from the smart network card to the auxiliary network card can be executed. If it is not unobstructed, the first IP address of the smart network card and the second IP address of the auxiliary network card can be reconfigured.
[0150] Optionally, the number of times the first IP address of the smart network card and the second IP address of the auxiliary network card are reconfigured can also be recorded. When the number reaches a preset number, if the network between the host end and the auxiliary test end is still not smooth, a reminder message can be generated to remind the tester to handle the exception.
[0151] Wherein, judging whether the network between the host end and the auxiliary test end is unobstructed can be specifically that the execution machine controls the host end and the auxiliary test end to execute ping commands respectively. The ping command is also called ping (Packet Internet Groper), which is an Internet packet explorer and a program for testing the network connection amount. Ping is a service command working in the application layer of the TCP / IP network architecture. It mainly sends ICMP (Internet Control Message Protocol Internet Message Control Protocol) Echo request messages to a specific destination host to test whether the destination station is reachable and understand its relevant status. Whether the network between the host end and the auxiliary test end is unobstructed is determined by detecting whether the host end and the auxiliary test end can ping each other. Specifically, if the host end and the auxiliary test end can ping each other, it means that the network between the host end and the auxiliary test end is unobstructed. If the host end and the auxiliary test end cannot ping each other, it means that the network between the host end and the auxiliary test end is not unobstructed.
[0152] Optionally, when the host side and the auxiliary test side cannot ping each other, the host side and the auxiliary test side can be controlled to re-execute the ping command and record the number of times the ping command is executed. When the number of times the ping command is executed reaches a preset threshold, if the host side and the auxiliary test side still cannot ping each other, the first IP address of the smart network card and the second IP address of the auxiliary network card can be reconfigured, or a prompt message can be directly generated to prompt the tester to handle the exception.
[0153] Step 306: create a test file in the smart network card through the SOL function and the first IP address, determine the first file information of the test file, and control the smart network card to send the test file to the auxiliary test terminal.
[0154] After configuring the first IP address of the smart network card and the second IP address of the auxiliary network card, and confirming that the smart network card and the auxiliary network card can communicate normally, a test file can be created on the smart network card through the SOL function of the host side and the first IP address, and the first file information of the test file can be determined. The first file information is used to subsequently determine whether the file transfer performance of the smart network card is normal; then the smart network card is controlled to send the test file to the auxiliary test end.
[0155] Step 307: Acquire second file information of a received file corresponding to the test file and received by the auxiliary test end.
[0156] The auxiliary test terminal can receive a receiving file corresponding to the test file sent by the smart network card, and obtain the second file information based on the receiving file, and the execution machine can obtain the second file information from the auxiliary test terminal. Alternatively, the execution machine can obtain the receiving file from the auxiliary test terminal and obtain the second file information based on the receiving file.
[0157] Step 308: Determine a test result of the file transmission performance of the smart network card according to the first file information and the second file information.
[0158] After obtaining the first file information and the second file information, the execution machine can determine whether the file transmission performance of the smart network card is normal by comparing whether the first file information and the second file information are the same. When the first file information is the same as the second file information, it is determined that the file transmission performance of the smart network card is normal. When the first file information is different from the second file information, it is determined that the file transmission performance of the smart network card is abnormal.
[0159] Since steps 301-304 correspond to the previous steps 201-204 respectively, and steps 306-308 correspond to the previous steps 205-207 respectively, the description is relatively simple.
[0160] The embodiment of the present application remotely controls the host side to start the in-band command of the host side, and controls the host side to switch to the smart network card mode; controls the host side to start the network serial port SOL function, and obtains the network port information of the smart network card through the SOL function; determines the network port configuration file of the smart network card according to the network port information, and configures the first IP address of the smart network card in the network port configuration file; configures the second IP address of the auxiliary network card of the auxiliary test side; the second IP address and the first IP address belong to the same network segment; on the basis of determining that the network between the host side and the auxiliary test side is unobstructed, creates a test file in the smart network card through the SOL function and the first IP address, determines the first file information of the test file, and controls the smart network card to send the test file to the auxiliary test side; obtains the second file information of the received file received by the auxiliary test side and corresponding to the test file; determines the test result of the file transmission performance of the smart network card according to the first file information and the second file information; thereby realizing remote automatic testing of the file transmission performance of the smart network card, and improving the efficiency and accuracy of the file transmission performance testing of the smart network card.
[0161] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
[0162] Reference Figure 4 , shows a structural block diagram of an embodiment of a test device for file transfer performance of the present application, which can be applied to a local terminal device to test the file transfer performance of a smart network card configured in a host end, wherein the host end can be considered as any device configured with a smart network card, and the local terminal device can be considered as an execution machine for testers to operate. In an embodiment of the present application, the test device for file transfer performance may include the following modules:
[0163] The network port information acquisition module 401 is used to remotely control the host end to start the network serial port SOL function, and obtain the network port information of the smart network card through the SOL function;
[0164] A first address configuration module 402, configured to determine a network port configuration file of the smart network card according to the network port information, and configure a first IP address of the smart network card in the network port configuration file;
[0165] The first file information acquisition module 403 is used to create a test file in the smart network card through the SOL function and the first IP address, determine the first file information of the test file, and control the smart network card to send the test file to the auxiliary test end; the auxiliary network card of the auxiliary test end has passed the file transfer performance test in advance.
[0166] A second file information acquisition module 404, configured to acquire second file information of a received file corresponding to the test file and received by the auxiliary test terminal;
[0167] The test result determination module 405 is configured to determine a test result of the file transmission performance of the smart network card according to the first file information and the second file information.
[0168] Optionally, the first file information is a first MD5 code, and the second file information is a second MD5 code; the first file information acquisition module 403 includes:
[0169] The first MD5 code calculation submodule is used to calculate the first MD5 code of the test file according to the test file.
[0170] Optionally, the second file information acquisition module 404 is used to control the auxiliary test end to calculate the second MD5 code of the received file based on the received file corresponding to the test file; or to obtain the second MD5 code of the received file based on the received file corresponding to the test file by the auxiliary test end, and calculate the second MD5 code of the received file.
[0171] Optionally, the device further comprises:
[0172] The second address configuration module is used to configure the second IP address of the auxiliary network card of the auxiliary test end, and the second IP address and the first IP address belong to the same network segment.
[0173] Optionally, the second address configuration module includes:
[0174] The first control submodule is used to remotely control the auxiliary test terminal to execute a specified command to obtain the auxiliary network card port information;
[0175] The second IP address configuration submodule is used to determine the auxiliary network card network port configuration file according to the auxiliary network card network port information, and configure the second IP address of the auxiliary network card in the auxiliary network card network port configuration file.
[0176] Optionally, the device further comprises:
[0177] A network accessibility judgment module, used to judge whether the network between the host terminal and the auxiliary test terminal is unobstructed;
[0178] The first judgment result processing module is used to control the intelligent network card to send the test file to the auxiliary test terminal.
[0179] Optionally, the device further comprises:
[0180] The display setting module is used to set the graphic display position to display the relevant information of the intelligent network card on the host side.
[0181] Optionally, the test result determination module 405 is configured to determine that the file transmission performance of the smart network card is normal when the first file information and the second file information are the same.
[0182] Optionally, the network port information acquisition module 401 includes:
[0183] The SOL function starter module is used to remotely control the host end to start the network serial port SOL function;
[0184] The SOL function detection submodule is used to detect whether the SOL function of the network serial port of the host end is normal;
[0185] The information acquisition submodule is used to obtain the network port information of the smart network card through the SOL function if it is normal.
[0186] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0187] Reference Figure 5The embodiment of the present application also discloses an electronic device 50, including a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and capable of running on the processor 501. When the computer program 503 is executed by the processor 501, the steps of the file transfer performance testing method as described above are implemented.
[0188] Reference Figure 6 The embodiment of the present application also discloses a computer-readable storage medium 60, on which a computer program 503 is stored. When the computer program 503 is executed by a processor, the steps of the method for testing file transfer performance as described above are implemented.
[0189] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0190] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0191] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0192] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0193] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0194] All actions for obtaining information proposed in the embodiments of the present application are performed in compliance with the corresponding data protection laws and policies of the country of location and with the authorization given by the corresponding device owner.
[0195] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0196] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0197] The above is a detailed introduction to a file transfer performance testing method and device, electronic device, and storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for testing file transfer performance, characterized in that: The method is used to test the file transmission performance of the smart network card configured in the host end; the method comprises: Remotely control the host end to start the network serial port SOL function, and obtain the network port information of the smart network card through the SOL function; Determine a network port configuration file of the smart network card according to the network port information, and configure a first IP address of the smart network card in the network port configuration file; Creating a test file in the smart network card through the SOL function and the first IP address, determining the first file information of the test file, and controlling the smart network card to send the test file to the auxiliary test end; the auxiliary network card of the auxiliary test end has passed the file transfer performance test in advance; Acquire second file information of a received file corresponding to the test file and received by the auxiliary test end; Determine a test result of the file transmission performance of the smart network card according to the first file information and the second file information; Before controlling the smart network card to send the test file to the auxiliary test end, the method further includes: Configure a second IP address of the auxiliary network card of the auxiliary test end, where the second IP address and the first IP address belong to the same network segment, and the first IP address and the second IP address are used for communication between the host end and the auxiliary test end; The configuring of the second IP address of the auxiliary network card of the auxiliary test terminal includes: Remotely control the auxiliary test terminal to execute the specified command to obtain the auxiliary network card port information; The auxiliary network card network port configuration file is determined according to the auxiliary network card network port information, and the second IP address of the auxiliary network card is configured in the auxiliary network card network port configuration file.
2. The method according to claim 1, characterized in that The first file information is a first MD5 code, and the second file information is a second MD5 code; and determining the first file information of the test file includes: According to the test file, a first MD5 code of the test file is calculated.
3. The method according to claim 2, characterized in that The obtaining second file information of a received file corresponding to the test file and received by the auxiliary test end includes: Controlling the auxiliary test end to calculate a second MD5 code of the received file based on the received file corresponding to the test file; or, A received file corresponding to the test file received by the auxiliary test end is obtained, and a second MD5 code of the received file is calculated.
4. The method according to claim 1, characterized in that: Before controlling the smart network card to send the test file to the auxiliary test terminal, the method further includes: Determine whether the network between the host terminal and the auxiliary test terminal is unobstructed; If yes, the smart network card is controlled to send the test file to the auxiliary test terminal.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Set the graphic display position to display the relevant information of the smart network card on the host side.
6. The method according to any one of claims 1 to 4, characterized in that The step of determining a test result of the file transmission performance of the smart network card according to the first file information and the second file information includes: When the first file information and the second file information are the same, it is determined that the file transmission performance of the smart network card is normal.
7. The method according to claim 1, characterized in that The remotely controlling the host end to start the network serial port SOL function, and obtaining the network port information of the smart network card through the SOL function, includes: Remotely control the host end to start the network serial port SOL function; Check whether the network serial port SOL function of the host is normal; If normal, the network port information of the smart network card is obtained through the SOL function.
8. A device for testing file transfer performance, characterized in that: The device is used to test the file transmission performance of the smart network card configured in the host end; the device includes: A network port information acquisition module, used to remotely control the host end to start the network serial port SOL function, and obtain the network port information of the smart network card through the SOL function; A first address configuration module, used to determine a network port configuration file of the smart network card according to the network port information, and configure a first IP address of the smart network card in the network port configuration file; A first file information acquisition module is used to create a test file in the smart network card through the SOL function and the first IP address, determine the first file information of the test file, and control the smart network card to send the test file to the auxiliary test end; the auxiliary network card of the auxiliary test end has passed the file transfer performance test in advance; A second file information acquisition module, used to acquire second file information of a received file corresponding to the test file and received by the auxiliary test end; A test result determination module, configured to determine a test result of the file transmission performance of the smart network card according to the first file information and the second file information; Wherein, the device further comprises: A second address configuration module, used to configure a second IP address of the auxiliary network card of the auxiliary test end, the second IP address and the first IP address belong to the same network segment, and the first IP address and the second IP address are used for communication between the host end and the auxiliary test end; The second address configuration module includes: The first control submodule is used to remotely control the auxiliary test terminal to execute a specified command to obtain the auxiliary network card port information; The second IP address configuration submodule is used to determine the auxiliary network card network port configuration file according to the auxiliary network card network port information, and configure the second IP address of the auxiliary network card in the auxiliary network card network port configuration file.
9. An electronic device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method for testing the file transmission performance as claimed in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for testing file transfer performance according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
SOL functional test method and system
CN103164309A
Network transmission function batch test method and system, terminal and storage medium
CN110557299A