CN113872826B - Network card port stability testing method, system, terminal and storage medium - Google Patents

Network card port stability testing method, system, terminal and storage medium Download PDF

Info

Publication number
CN113872826B
CN113872826B CN202111008954.3A CN202111008954A CN113872826B CN 113872826 B CN113872826 B CN 113872826B CN 202111008954 A CN202111008954 A CN 202111008954A CN 113872826 B CN113872826 B CN 113872826B
Authority
CN
China
Prior art keywords
detection data
port
data
value
network card
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.)
Active
Application number
CN202111008954.3A
Other languages
Chinese (zh)
Other versions
CN113872826A (en
Inventor
姜璐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111008954.3A priority Critical patent/CN113872826B/en
Publication of CN113872826A publication Critical patent/CN113872826A/en
Application granted granted Critical
Publication of CN113872826B publication Critical patent/CN113872826B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation

Abstract

The invention provides a method, a system, a terminal and a storage medium for testing the stability of a network card port, comprising the following steps: confirming that the connection state of a network card self-loop port is normal, wherein the network card self-loop port comprises a packet sending port and a packet receiving port; sending the set detection data to the packet receiving port through the packet sending port, and storing the actual detection data received by the packet receiving port to a specified path; reading actual detection data under an appointed path, calculating an MD5 value of the actual detection data, and carrying out consistency comparison on the MD5 value and an initial MD5 value of the locally stored set detection data to obtain a data detection result; collecting network card logs, counting error reporting information by using a keyword technology, and outputting the error reporting information and the data detection result. The invention realizes the automatic test of the connection stability of the network card port. The whole process is simple to operate, high in automation degree and high in practicability, resources can be saved, and the testing efficiency is improved.

Description

Network card port stability testing method, system, terminal and storage medium
Technical Field
The invention relates to the technical field of servers, in particular to a method, a system, a terminal and a storage medium for testing stability of a network card port.
Background
The network plays a key role as an indispensable component of a data center. At present, network technology is rapidly developed, and network devices of various specifications emerge endlessly. The functions of continuously updated network devices, such as network cards, switches, routers, etc., are increasing and complex, and the problems of compatibility, connectivity and performance among the interconnections of various devices are more and more emphasized. The server product undergoes different stages of testing during the development and testing stages. Network components such as network cards pay attention to the stability of the ports during each stage of testing. When the server tests the network performance, the synchronization will pay attention to the error reporting statistics of the ports, etc. In addition, the stability of the network ports can be tested in the test or production environment of the customer site. The statistical requirement of the company and the client on the network port is 0, i.e. the port must have zero packet loss and zero error.
The currently common network card testing method is that after various network devices are connected, whether the link is normal or not can be judged according to the states of link lamps. If it is checked whether normal communication is possible, it is necessary that both sides can be configured with IP for communication test. And if the conditions are limited, the test of the configured network flow is more complicated under the condition that only a single network card loop can be tested. For example, the statistics of the error reporting of the network port crc appearing on the client site is limited by the limitation of the client environment, and if the problem of the network card is to be eliminated, the network direct connection test cannot be simply carried out. Therefore, it is better to perform the self-loop test of the network card, and the limitation of the network switch environment can be saved. In the prior art, two server devices need to be interconnected, and after an intercommunicated network is configured, packet receiving and sending statistics is performed to test the characteristics of a port, such as packet loss, error report and the like. Under certain limiting conditions, if the device interconnection cannot be met or if the auxiliary test configuration is absent, the test cannot be performed. For example, the statistics of error reporting of the network port crc appearing on the client site is limited by the limitation of the client environment, and if the problem of the network card itself needs to be eliminated, the network direct connection test cannot be simply performed.
Disclosure of Invention
In view of the above-mentioned deficiencies of the prior art, the present invention provides a method, a system, a terminal and a storage medium for testing stability of a network card port, so as to solve the above-mentioned technical problems.
In a first aspect, the present invention provides a method for testing stability of a network card port, including:
confirming that the connection state of a network card self-loop port is normal, wherein the network card self-loop port comprises a packet sending port and a packet receiving port;
sending the set detection data to the packet receiving port through the packet sending port, and storing the actual detection data received by the packet receiving port to a specified path;
reading actual detection data under an appointed path, calculating an MD5 value of the actual detection data, and carrying out consistency comparison on the MD5 value and an initial MD5 value of the locally stored set detection data to obtain a data detection result;
collecting network card logs, counting error reporting information by using a keyword technology, and outputting the error reporting information and the data detection result.
Further, it is confirmed that the connection state of the network card self-loop port is normal, the network card self-loop port includes a packet sending port and a packet receiving port, and the method includes:
and calling a network port state information capture instruction to capture the connection states of the packet sending port and the packet receiving port, judging that the connection states pass the verification if the connection states of the packet sending port and the packet receiving port are both normal, and otherwise, terminating the test and outputting a connection error prompt.
Further, sending the set detection data to the packet receiving port through the packet sending port, and storing the actual detection data received by the packet receiving port to a specified path, including:
presetting detection data, wherein the detection data comprise large files, and setting a transmission time period and transmission times of the detection data;
calling a packet sending port to execute cyclic sending of the detection data according to the sending time period and the sending times;
and adding a timestamp to the actual detection data received by the packet receiving port and storing the actual detection data into a specified received data folder.
Further, reading actual detection data under the specified path and calculating an MD5 value of the actual detection data, and performing consistency comparison between the MD5 value and an initial MD5 value of the locally stored set detection data to obtain a data detection result, including:
taking the set detection data as standard detection data, and writing an MD5 value of the standard detection data as an initial MD5 value into a file name of the standard detection data;
monitoring the data updating condition of the received data folder, reading newly added actual detection data from the received data folder, calculating an MD5 value of the actual detection data, and comparing the consistency of the MD5 value and an initial MD5 value;
and writing the consistency comparison result of the MD5 value and the initial MD5 value into a test log as a data detection result.
Further, collecting network card logs, utilizing a keyword technology to count error reporting information, and outputting the error reporting information and the data detection result, including:
and extracting error information, and sequentially storing the error information to the test log according to occurrence time.
In a second aspect, the present invention provides a system for testing stability of a network card port, including:
the basic configuration unit is used for confirming that the connection state of a network card self-loop port is normal, and the network card self-loop port comprises a packet sending port and a packet receiving port;
the data receiving and sending unit is used for sending the set detection data to the packet receiving port through the packet sending port and storing the actual detection data received by the packet receiving port to a specified path;
the data verification unit is used for reading actual detection data under the specified path, calculating an MD5 value of the actual detection data, and performing consistency comparison on the MD5 value and a locally stored initial MD5 value of the set detection data to obtain a data detection result;
and the log processing unit is used for collecting network card logs, counting error reporting information by using a keyword technology, and outputting the error reporting information and the data detection result.
Further, the basic configuration unit is configured to:
and calling an internet access state information capturing instruction to capture the connection states of the packet sending port and the packet receiving port, judging that the connection states pass the verification if the connection states of the packet sending port and the packet receiving port are both normal, and otherwise, terminating the test and outputting a connection error prompt.
Further, the data transceiving unit is configured to:
presetting detection data, wherein the detection data comprise large files, and setting a transmission time period and transmission times of the detection data;
calling a packet sending port to execute cyclic sending of the detection data according to the sending time period and the sending times;
and adding a timestamp to the actual detection data received by the packet receiving port and storing the actual detection data into a specified received data folder.
Further, the data checking unit is configured to:
taking the set detection data as standard detection data, and writing an MD5 value of the standard detection data as an initial MD5 value into a file name of the standard detection data;
monitoring the data updating condition of the received data folder, reading newly added actual detection data from the received data folder, calculating an MD5 value of the actual detection data, and comparing the consistency of the MD5 value and an initial MD5 value;
and writing the consistency comparison result of the MD5 value and the initial MD5 value into a test log as a data detection result.
Further, the log processing unit is configured to:
and extracting error information, and sequentially storing the error information to the test log according to occurrence time.
In a third aspect, a terminal is provided, including:
a processor, a memory, wherein,
the memory is used for storing a computer program which,
the processor is used for calling and running the computer program from the memory so as to make the terminal execute the method of the terminal.
In a fourth aspect, a computer storage medium is provided having stored therein instructions that, when executed on a computer, cause the computer to perform the method of the above aspects.
The beneficial effect of the invention is that,
the network card port stability test method, the system, the terminal and the storage medium provided by the invention have the advantages that the upper layer configuration is carried out on the basis of carrying out self-loop connection on the network card port, the set detection data is sent to the packet receiving port through the packet sending port, the actual detection data received by the packet receiving port is stored to the appointed path, the data receiving and sending between two different ports of the same network card are realized, the integrity check is carried out on the receiving and sending data, and the network port log is checked, so that the stability test of the existing port of the network card is realized under the limited condition of a single server device. The invention realizes the automatic test of the connection stability of the network card port. The whole process is simple to operate, high in automation degree and high in practicability, resources can be saved, the testing efficiency is improved, and the method is an effective method tool for network card compatibility and network connection stability. The method can be applied to the model selection test, the problem positioning test and the like of the network card.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or prior art solutions of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
FIG. 2 is a schematic block diagram of a system of one embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following explains key terms appearing in the present invention.
A switch is a device that performs an information exchange function in a communication system. In computer network systems, the switching concept has been proposed as an improvement to the shared mode of operation. The HUB is a sharing device, the HUB itself cannot identify the destination address, when the a host in the same lan transmits data to the B host, the data packet is transmitted in a broadcast manner on the network using the HUB as a framework, and each terminal determines whether to receive the data packet by verifying the address information of the header of the data packet. In this mode of operation, only one set of data frame can be transmitted over the network at the same time, and a retry is required in the event of a collision. This approach is to share the network bandwidth.
A network card is a piece of computer hardware designed to allow a computer to communicate over a computer network. It belongs between layers 1 and 2 of the OSI model because it possesses a MAC address. It allows users to connect to each other by cable or wirelessly. Each network card has a unique 48-bit serial number, called the MAC address, which is written in a ROM on the card. Each computer on the network must have a unique MAC address. No two produced network cards have the same address. This is because the Institute of Electrical and Electronics Engineers (IEEE) is responsible for assigning unique MAC addresses to network interface controller (network card) vendors.
The network card is provided with a processor and a memory (comprising a RAM and a ROM). The communication between the network card and the local area network is performed in a serial transmission manner through a cable or a twisted pair. The communication between the network card and the computer is carried out in a parallel transmission mode through an I/O bus on a computer mainboard. Therefore, one important function of the network card is to perform serial/parallel conversion. Since the data rate on the network is not the same as the data rate on the computer bus, a memory chip for buffering data must be installed in the network card.
The main functions of the network card include: 1. and (3) encapsulating and decapsulating the data, and adding a header and a tail to the data transmitted by the upper layer during transmission to form an Ethernet frame. When receiving, stripping the head and tail of Ethernet frame, then delivering to the upper layer; 2. link management, which is mainly realized by CSMA/CD (Carrier Sense multiple Access with Collision Detection) protocol; 3. and data encoding and decoding, namely Manchester encoding and decoding. Manchester codes, also known as digital bi-directional codes, split phase codes or phase codes (PE), are one of the commonly used binary line codes used by the physical layer to encode the clock and data of a synchronous bit stream. In communication technology, codes are used to represent the combination of data in a bit stream to be transmitted and a timing signal. The method is commonly used in the fields of Ethernet communication, train bus control, industrial bus and the like.
The MD5 Message Digest Algorithm (english: MD5 Message-Digest Algorithm), a widely used cryptographic hash function, can generate a 128-bit (16-byte) hash value (hash value) to ensure the integrity of the Message transmission. MD5 was designed by the american cryptologist ronard-li-vister (Ronald Linn Rivest) and was published in 1992 as an alternative to the MD4 algorithm. The procedure for this set of algorithms is specified in the RFC 1321 standard. After 1996 the algorithm proved to have weaknesses that could be broken, and experts generally recommend changing to other algorithms, such as SHA-2, for data that require a high degree of security. In 2004, it was confirmed that the MD5 algorithm cannot prevent collision (collision), and therefore is not suitable for security authentication, such as SSL public key authentication or digital signature.
The invention realizes flow tapping by means of one port of the network card, realizes packet receiving statistics on the other port to be detected, and can automatically count information such as drop/error/crc and the like of the packet receiving condition of the port in real time. The requirement that the network card can realize the statistics of the flow of the receiving and sending packets and the stability state check of the network card in the port loop mode is met.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention. The execution main body in fig. 1 may be a network card port stability test system.
As shown in fig. 1, the method includes:
step 110, confirming that the connection state of a network card self-loop port is normal, wherein the network card self-loop port comprises a packet sending port and a packet receiving port;
step 120, sending the set detection data to the packet receiving port through the packet sending port, and storing the actual detection data received by the packet receiving port to a specified path;
step 130, reading actual detection data in the specified path, calculating an MD5 value of the actual detection data, and performing consistency comparison on the MD5 value and an initial MD5 value of the locally stored set detection data to obtain a data detection result;
step 140, collecting network card logs, counting error reporting information by using a keyword technology, and outputting the error reporting information and the data detection result.
In order to facilitate understanding of the present invention, the network card port stability testing method provided in the present invention is further described below with reference to the principle of the network card port stability testing method of the present invention and the process of testing the stability of the network card port in the embodiments.
Specifically, the method for testing the stability of the network card port comprises the following steps:
s1, confirming that the connection state of a network card self-loop port is normal, wherein the network card self-loop port comprises a packet sending port and a packet receiving port.
Firstly, different ports of the same network card are connected through cables. The loopback interface allows client and server programs on the same host to communicate via tcp/ip. Any data transmitted to the host ip address is sent to the loopback interface, and any data transmitted to the loopback interface is input as ip. I.e. the local of the local routing table that is going. Port self-looping may be implemented using net namespace. Namespace is a lightweight virtualization of Linux, and provides a more refined resource management mode. Net namespace is used to isolate network devices, ip addresses, ports, etc. Each net namespace has its own independent network stack, routing table, firewall rules, socket, etc.
And calling a network port state information capture instruction to capture the connection states of the packet sending port and the packet receiving port, judging that the connection states pass the verification if the connection states of the packet sending port and the packet receiving port are both normal, and otherwise, terminating the test and outputting a connection error prompt.
Detection port linkz status section:
Figure BDA0003237914010000091
and S2, sending the set detection data to the packet receiving port through the packet sending port, and storing the actual detection data received by the packet receiving port to a specified path.
Presetting detection data, wherein the detection data comprise large files, and setting a transmission time period and transmission times of the detection data; calling a packet sending port to execute cyclic sending of the detection data according to the sending time period and the sending times; and adding a timestamp to the actual detection data received by the packet receiving port and storing the actual detection data into a specified received data folder.
Port packet sending test part:
Figure BDA0003237914010000101
Figure BDA0003237914010000111
and S3, reading actual detection data under the specified path, calculating an MD5 value of the actual detection data, and carrying out consistency comparison on the MD5 value and an initial MD5 value of the locally stored set detection data to obtain a data detection result.
Taking the set detection data as standard detection data, and writing an MD5 value of the standard detection data as an initial MD5 value into a file name of the standard detection data; creating a monitoring process, monitoring the data updating condition of the received data folder, reading newly added actual detection data from the received data folder, calculating an MD5 value of the actual detection data, and comparing the consistency of the MD5 value and the initial MD5 value; and writing the consistency comparison result of the MD5 value and the initial MD5 value into a test log as a data detection result. Compared with the consistency of the conventional comparison between the sent data and the received data, the method provided by this embodiment generates the comparison result quickly by comparing the MD5 value, so as to improve the comparison efficiency, and meanwhile, the MD5 value is fixed, and the data sent does not need to be cached many times.
And S4, collecting network card logs, counting error reporting information by using a keyword technology, and outputting the error reporting information and the data detection result.
The detection log part:
Figure BDA0003237914010000121
and extracting error information, and sequentially storing the error information to the test log according to occurrence time.
The method provided by the embodiment only needs to install the network card driver, configure the network port to be tested, and then run the script program to execute the method. After the script program tests that the link is established in the network port, the stability conditions of network packet loss, error reporting and the like can be tested at the same time. Under the self-loop mode of the network card of the server, the single server can realize the test, thus being capable of simply and conveniently verifying the link state stability of the network interface. When running the script program, the script name needs to be followed by the tested port name. The script tool is directly executed, so that automatic testing can be realized, the testing resource consumption is greatly reduced, and the working efficiency is improved.
The method can be applied to network card testing, or network card related problem processing and the like. In the test, a network cable is used for carrying out self-loop on the port of the network card, and then the script is executed, so that the automatic test can be realized. In the prior art, two servers are required to test the receiving and sending packets after the two servers are connected with each other, and then the stability of the port is checked. The embodiment omits the conventional operation that two servers are required to be directly connected, can be realized only by self-looping of the network card port of one server, and only needs to ensure that the physical connection is normal without configuring an IP address.
As shown in fig. 2, the system 200 includes:
a basic configuration unit 210, configured to confirm that a connection state of a network card self-loop port is normal, where the network card self-loop port includes a packet sending port and a packet receiving port;
the data transceiving unit 220 is configured to send the set detection data to the packet receiving port through the packet sending port, and store the actual detection data received by the packet receiving port to a specified path;
the data checking unit 230 is configured to read actual detection data in a specified path, calculate an MD5 value of the actual detection data, and compare the MD5 value with an initial MD5 value of the locally stored set detection data to obtain a data detection result;
and the log processing unit 240 is configured to collect a network card log, count error information by using a keyword technology, and output the error information and the data detection result.
Optionally, as an embodiment of the present invention, the basic configuration unit is configured to:
and calling a network port state information capture instruction to capture the connection states of the packet sending port and the packet receiving port, judging that the connection states pass the verification if the connection states of the packet sending port and the packet receiving port are both normal, and otherwise, terminating the test and outputting a connection error prompt.
Optionally, as an embodiment of the present invention, the data transceiver unit is configured to:
presetting detection data, wherein the detection data comprise large files, and setting a transmission time period and transmission times of the detection data;
calling a packet sending port to execute cyclic sending of the detection data according to the sending time period and the sending times;
and adding a timestamp to the actual detection data received by the packet receiving port and storing the actual detection data into a specified received data folder.
Optionally, as an embodiment of the present invention, the data checking unit is configured to:
taking the set detection data as standard detection data, and writing an MD5 value of the standard detection data as an initial MD5 value into a file name of the standard detection data;
monitoring the data updating condition of the received data folder, reading newly added actual detection data from the received data folder, calculating an MD5 value of the actual detection data, and comparing the consistency of the MD5 value and an initial MD5 value;
and writing the consistency comparison result of the MD5 value and the initial MD5 value into a test log as a data detection result.
Optionally, as an embodiment of the present invention, the log processing unit is configured to:
and extracting error information, and sequentially storing the error information to the test log according to the occurrence time.
Fig. 3 is a schematic structural diagram of a terminal 300 according to an embodiment of the present invention, where the terminal 300 may be used to execute the method for testing stability of the network card port according to the embodiment of the present invention.
Among them, the terminal 300 may include: a processor 310, a memory 320, and a communication unit 330. The components communicate via one or more buses, and those skilled in the art will appreciate that the architecture of the servers shown in the figures is not intended to be limiting, and may be a bus architecture, a star architecture, a combination of more or less components than those shown, or a different arrangement of components.
The memory 320 may be used for storing instructions executed by the processor 310, and the memory 320 may be implemented by any type of volatile or non-volatile storage terminal or combination thereof, such as a Static Random Access Memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk. The executable instructions in memory 320, when executed by processor 310, enable terminal 300 to perform some or all of the steps in the method embodiments described below.
The processor 310 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by operating or executing software programs and/or modules stored in the memory 320 and calling data stored in the memory. The processor may be composed of an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs connected with the same or different functions. For example, the processor 310 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
A communication unit 330, configured to establish a communication channel so that the storage terminal can communicate with other terminals. And receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
Therefore, the invention carries out upper layer configuration on the basis of carrying out self-loop connection on the network card port, then sends the set detection data to the packet receiving port through the packet sending port, stores the actual detection data received by the packet receiving port to the specified path, realizes data receiving and sending between two different ports of the same network card, then carries out integrity verification on the received and sent data, and verifies the network port log, thereby realizing the stability test of the current port of the network card under the limited condition of a single server device. The invention realizes the automatic test of the connection stability of the network card port. The whole process is simple to operate, high in automation degree and high in practicability, resources can be saved, the testing efficiency is improved, and the method is an effective method tool for network card compatibility and network connection stability. The method and the device can be applied to the model selection test, the problem positioning test and the like of the network card, and the technical effects achieved by the embodiment can be referred to the description above, which is not described herein again.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be substantially or partially embodied in the form of a software product, the computer software product is stored in a storage medium, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various media capable of storing program codes include several instructions for enabling a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the method in the embodiments of the present invention.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.
In the embodiments provided in the present invention, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some interfaces, indirect coupling or communication connection of systems or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (7)

1. A method for testing stability of a network card port is characterized by comprising the following steps:
confirming that the connection state of a network card self-loop port is normal, wherein the network card self-loop port comprises a packet sending port and a packet receiving port;
sending the set detection data to the packet receiving port through the packet sending port, and storing the actual detection data received by the packet receiving port to a specified path;
reading actual detection data under an appointed path, calculating an MD5 value of the actual detection data, and carrying out consistency comparison on the MD5 value and an initial MD5 value of the locally stored set detection data to obtain a data detection result;
collecting network card logs, counting error reporting information by using a keyword technology, and outputting the error reporting information and the data detection result;
sending the set detection data to the packet receiving port through the packet sending port, and storing the actual detection data received by the packet receiving port to a specified path, including:
presetting detection data, wherein the detection data comprise large files, and setting a transmission time period and transmission times of the detection data;
calling a packet sending port to execute cyclic sending of the detection data according to the sending time period and the sending times;
adding a timestamp on actual detection data received by a packet receiving port and storing the actual detection data into a specified received data folder;
reading actual detection data under an appointed path, calculating an MD5 value of the actual detection data, and performing consistency comparison on the MD5 value and an initial MD5 value of locally stored set detection data to obtain a data detection result, wherein the data detection result comprises the following steps:
taking the set detection data as standard detection data, and writing an MD5 value of the standard detection data as an initial MD5 value into a file name of the standard detection data; creating a monitoring process, monitoring the data updating condition of the received data folder, reading newly added actual detection data from the received data folder, calculating the MD5 value of the actual detection data, and comparing the consistency of the MD5 value and the initial MD5 value; and writing the consistency comparison result of the MD5 value and the initial MD5 value into a test log as a data detection result.
2. The method of claim 1, wherein confirming that the connection status of the network card self-loop port is normal, wherein the network card self-loop port comprises a packet sending port and a packet receiving port, comprises:
and calling a network port state information capture instruction to capture the connection states of the packet sending port and the packet receiving port, judging that the connection states pass the verification if the connection states of the packet sending port and the packet receiving port are both normal, and otherwise, terminating the test and outputting a connection error prompt.
3. The method of claim 1, wherein collecting network card logs, counting error information by using a keyword technique, and outputting the error information and the data detection result comprises:
and extracting error information, and sequentially storing the error information to the test log according to occurrence time.
4. A network card port stability test system is characterized by comprising:
the basic configuration unit is used for confirming that the connection state of a network card self-loop port is normal, and the network card self-loop port comprises a packet sending port and a packet receiving port;
the data receiving and sending unit is used for sending the set detection data to the packet receiving port through the packet sending port and storing the actual detection data received by the packet receiving port to a specified path;
the data verification unit is used for reading actual detection data under the specified path, calculating an MD5 value of the actual detection data, and performing consistency comparison on the MD5 value and a locally stored initial MD5 value of the set detection data to obtain a data detection result;
the log processing unit is used for collecting network card logs, counting error reporting information by using a keyword technology, and outputting the error reporting information and the data detection result;
the data transceiving unit is used for:
presetting detection data, wherein the detection data comprise large files, and setting a transmission time period and transmission times of the detection data;
calling a packet sending port to execute cyclic sending of the detection data according to the sending time period and the sending times;
adding a timestamp on actual detection data received by a packet receiving port and storing the actual detection data into a specified received data folder;
reading actual detection data under an appointed path, calculating an MD5 value of the actual detection data, and performing consistency comparison on the MD5 value and an initial MD5 value of locally stored set detection data to obtain a data detection result, wherein the data detection result comprises the following steps:
taking the set detection data as standard detection data, and writing an MD5 value of the standard detection data as an initial MD5 value into a file name of the standard detection data; creating a monitoring process, monitoring the data updating condition of the received data folder, reading newly added actual detection data from the received data folder, calculating the MD5 value of the actual detection data, and comparing the consistency of the MD5 value and the initial MD5 value; and writing the consistency comparison result of the MD5 value and the initial MD5 value into a test log as a data detection result.
5. The system of claim 4, wherein the base configuration unit is configured to:
and calling a network port state information capture instruction to capture the connection states of the packet sending port and the packet receiving port, judging that the connection states pass the verification if the connection states of the packet sending port and the packet receiving port are both normal, and otherwise, terminating the test and outputting a connection error prompt.
6. A terminal, comprising:
a processor;
a memory for storing instructions for execution by the processor;
wherein the processor is configured to perform the method of any one of claims 1-3.
7. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-3.
CN202111008954.3A 2021-08-31 2021-08-31 Network card port stability testing method, system, terminal and storage medium Active CN113872826B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111008954.3A CN113872826B (en) 2021-08-31 2021-08-31 Network card port stability testing method, system, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111008954.3A CN113872826B (en) 2021-08-31 2021-08-31 Network card port stability testing method, system, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN113872826A CN113872826A (en) 2021-12-31
CN113872826B true CN113872826B (en) 2023-02-28

Family

ID=78988795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111008954.3A Active CN113872826B (en) 2021-08-31 2021-08-31 Network card port stability testing method, system, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113872826B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115297028B (en) * 2022-10-08 2023-01-03 浙江大华技术股份有限公司 Network card connectivity detection method and device, electronic device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571482A (en) * 2011-11-28 2012-07-11 曙光信息产业(北京)有限公司 System and method for testing stability of network card
CN104125117A (en) * 2014-08-04 2014-10-29 上海斐讯数据通信技术有限公司 Packet receiving and transmission testing method
CN107547304A (en) * 2017-07-13 2018-01-05 紫光华山信息技术有限公司 Network card testing method, device and machinable medium
CN109257249A (en) * 2018-08-20 2019-01-22 郑州云海信息技术有限公司 A kind of network interface card stability test method, apparatus, terminal and storage medium
CN110557299A (en) * 2019-07-31 2019-12-10 苏州浪潮智能科技有限公司 network transmission function batch test method, system, terminal and storage medium
CN111563016A (en) * 2020-04-27 2020-08-21 平安医疗健康管理股份有限公司 Log collection and analysis method and device, computer system and readable storage medium
CN112685248A (en) * 2020-12-24 2021-04-20 北京浪潮数据技术有限公司 Intelligent network card monitoring log obtaining method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111147331A (en) * 2019-12-28 2020-05-12 苏州浪潮智能科技有限公司 Server network card interaction test method, system, terminal and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571482A (en) * 2011-11-28 2012-07-11 曙光信息产业(北京)有限公司 System and method for testing stability of network card
CN104125117A (en) * 2014-08-04 2014-10-29 上海斐讯数据通信技术有限公司 Packet receiving and transmission testing method
CN107547304A (en) * 2017-07-13 2018-01-05 紫光华山信息技术有限公司 Network card testing method, device and machinable medium
CN109257249A (en) * 2018-08-20 2019-01-22 郑州云海信息技术有限公司 A kind of network interface card stability test method, apparatus, terminal and storage medium
CN110557299A (en) * 2019-07-31 2019-12-10 苏州浪潮智能科技有限公司 network transmission function batch test method, system, terminal and storage medium
CN111563016A (en) * 2020-04-27 2020-08-21 平安医疗健康管理股份有限公司 Log collection and analysis method and device, computer system and readable storage medium
CN112685248A (en) * 2020-12-24 2021-04-20 北京浪潮数据技术有限公司 Intelligent network card monitoring log obtaining method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113872826A (en) 2021-12-31

Similar Documents

Publication Publication Date Title
US11848849B1 (en) Testing computer networks in real time
US8050175B2 (en) Distributed packet group identification for network testing
US7440415B2 (en) Virtual network addresses
US8233399B2 (en) Generic packet generator and method
US9253062B2 (en) Byte by byte received data integrity check
US7100091B2 (en) Method and system for testing networks
US10897524B1 (en) Integrated packet generator and checker
US8005958B2 (en) Virtual interface
US9015822B2 (en) Automatic invocation of DTN bundle protocol
JP2004287811A (en) Data processing circuit
US10659571B1 (en) Network device with integrated packet generators or packet checkers
US20080298261A1 (en) Reconfigurable Test System
US11076025B1 (en) Generating network packet centric signatures
CN113872826B (en) Network card port stability testing method, system, terminal and storage medium
US9319441B2 (en) Processor allocation for multi-core architectures
US8966321B2 (en) Logical port and layer protocol test configuration resource manager
CN117176802B (en) Full-link monitoring method and device for service request, electronic equipment and medium
CN116743619A (en) Network service testing method, device, equipment and storage medium
CN113094762B (en) Data processing method and device and signature verification server
CN112436982B (en) Network flow automatic mixed running test method, system, terminal and storage medium
WO2021128936A1 (en) Message processing method and apparatus
CN113626405A (en) HDFS network data transmission optimization method, system, terminal and storage medium
CN114490202B (en) Password equipment testing method and device, electronic equipment and storage medium
CN117172205B (en) Performance analysis method, device, electronic equipment and storage medium
CN109445910B (en) Virtual machine VLAN management method, device, terminal and 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
GR01 Patent grant
GR01 Patent grant