CN114157590A - Network card testing method, device and equipment and computer readable storage medium - Google Patents

Network card testing method, device and equipment and computer readable storage medium Download PDF

Info

Publication number
CN114157590A
CN114157590A CN202111424726.4A CN202111424726A CN114157590A CN 114157590 A CN114157590 A CN 114157590A CN 202111424726 A CN202111424726 A CN 202111424726A CN 114157590 A CN114157590 A CN 114157590A
Authority
CN
China
Prior art keywords
network card
tested
testing method
link negotiation
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202111424726.4A
Other languages
Chinese (zh)
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 CN202111424726.4A priority Critical patent/CN114157590A/en
Publication of CN114157590A publication Critical patent/CN114157590A/en
Withdrawn legal-status Critical Current

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
    • H04L43/0823Errors, e.g. transmission errors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a network card testing method, which can control a server to restart and judge whether a current link negotiation result is correct or not according to target link information of a network card to be tested after the server is restarted, and can finish testing after the number of restarting times reaches the number of termination times if no link negotiation error occurs all the time, thereby completing testing the link negotiation stability, being beneficial to timely repairing the network card with problems, improving the working efficiency and user experience, and reducing the labor cost due to application in a processor. The invention also discloses a network card testing device and equipment, which have the same beneficial effects as the network card testing method.

Description

Network card testing method, device and equipment and computer readable storage medium
Technical Field
The invention relates to the field of network cards, in particular to a network card testing method, and also relates to a network card testing device, equipment and a computer readable storage medium.
Background
The server may perform network communication with other devices through the network card, during the starting process of the server, the network card inserted into the server needs to complete a tracing (link negotiation) operation with the network card, so as to normally operate after the server is started, but some link negotiation results may be abnormal under certain conditions (for example, PCIe (Peripheral Component Interconnect express) link signal quality between the server and the network card is not ideal or BUG occurs in firmware of the network card itself, etc.), and a mature method for testing link negotiation stability of the network card is absent in the prior art, and once the network card link negotiation results are abnormal, the working efficiency and user experience may be affected.
Therefore, how to provide a solution to the above technical problem is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a network card testing method, which is used for completing the test of link negotiation stability, is beneficial to timely repairing the network card with problems, improves the working efficiency and the user experience, and reduces the labor cost due to the application in a processor; another object of the present invention is to provide a network card testing apparatus, device and computer readable storage medium, which complete the test of link negotiation stability, facilitate timely repairing the problematic network card, improve the work efficiency and user experience, and reduce the labor cost due to the application in the processor.
In order to solve the above technical problem, the present invention provides a network card testing method, applied to a processor, comprising:
the control server restarts and acquires the current link negotiation result of the network card to be tested after restarting;
judging whether the link negotiation result is consistent with pre-stored target link information or not;
if the test times are consistent, adding the test times of which the initial values are zero and judging whether the current test times are termination times;
if not, judging that the link negotiation is wrong;
if the number of times of termination is not, executing the control server to restart, and acquiring a current link negotiation result of the network card to be tested after the server is restarted;
if the number of the termination times is the number of the termination times, the test is ended.
Preferably, before the control server restarts and acquires a current link negotiation result of the network card to be tested after the control server restarts, the network card testing method further includes:
before the initial control server is restarted, whether the communication with a network card to be tested of the server can be carried out is checked;
if yes, executing the control server to restart and acquiring a current link negotiation result of the network card to be tested after the control server is restarted;
if not, the alarm is controlled to give an alarm.
Preferably, the checking whether the communication with the network card to be tested of the server can be performed specifically includes:
determining a bus equipment function BDF number corresponding to the network card name of the network card to be tested according to the preset corresponding relation;
and judging whether communication can be established with the network card to be tested according to the BDF number.
Preferably, after determining whether the link negotiation result is consistent with the pre-stored target link information, the network card testing method further includes:
and recording the current test result of the network card to be tested.
Preferably, the recording of the current test result of the network card to be tested specifically includes:
and recording the test time, whether the link negotiation result is correct, the network card name and the BDF number of the network card to be tested.
Preferably, after determining that the link negotiation is wrong, the network card testing method further includes:
and the control prompter prompts the negotiation error of the network card link to be tested.
Preferably, the prompter is a voice announcer.
In order to solve the above technical problem, the present invention further provides a network card testing apparatus, applied to a processor, including:
the action module is used for controlling the server to restart and acquiring the current link negotiation result of the network card to be tested after the server is restarted;
the first judging module is used for judging whether the link negotiation result is consistent with the pre-stored target link information or not, if so, the second judging module is triggered, and if not, the judging module is triggered;
the second judging module is used for adding the test times with the initial value of zero and judging whether the current test times are termination times, if not, the action module is triggered, and if so, the termination module is triggered;
the judging module is used for judging the link negotiation error;
and the ending module is used for ending the test.
In order to solve the above technical problem, the present invention further provides a network card testing device, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the network card testing method when the computer program is executed.
In order to solve the above technical problem, the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the network card testing method are implemented.
The invention provides a network card testing method, which can control a server to restart and judge whether the current link negotiation result is correct or not according to target link information of a network card to be tested after the server is restarted, and can finish the test after the restarting times reach the termination times if no link negotiation error occurs all the time, thereby completing the test on the link negotiation stability, being beneficial to timely repairing the network card with problems, improving the working efficiency and the user experience, and reducing the labor cost due to the application to a processor.
The invention also provides a network card testing device and equipment, which have the same beneficial effects as the network card testing method.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed in the prior art and the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flow chart of a network card testing method provided by the present invention;
fig. 2 is a schematic structural diagram of a network card testing device provided in the present invention;
fig. 3 is a schematic structural diagram of a network card testing device provided in the present invention.
Detailed Description
The core of the invention is to provide a network card testing method, which is used for completing the test of link negotiation stability, is beneficial to timely repairing the network card with problems, improves the working efficiency and the user experience, and reduces the labor cost due to the application in a processor; another core of the present invention is to provide a network card testing apparatus, a device and a computer readable storage medium, which complete the test of link negotiation stability, facilitate the timely repair of the problematic network card, improve the work efficiency and user experience, and reduce the labor cost due to the application in the processor.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. 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.
Referring to fig. 1, fig. 1 is a schematic flow chart of a network card testing method provided by the present invention, where the network card testing method includes:
s101: the control server restarts and acquires the current link negotiation result of the network card to be tested after restarting;
specifically, in view of the technical problems in the background art, the present application intends to design an automatic testing method for the training stability of a network card link, and in order to implement the test for the training stability of the network card link, a server needs to be controlled to restart, so as to obtain a link negotiation result of a network card after restarting and perform a test.
The embodiment of the invention can be applied to a processor in a server.
Specifically, the server may be of various types, for example, may also be a storage device, and the embodiment of the present invention is not limited herein.
S102: judging whether the link negotiation result is consistent with the pre-stored target link information or not;
specifically, the judgment basis for the correct link negotiation is that the link negotiation result is consistent with the pre-stored target link information, that is, the expected training result is achieved, so that the link negotiation result is judged in this step, so as to facilitate the normal operation of the test process.
The link negotiation content is usually two items, one item is the data transmission speed negotiation result of a single channel, the other item is the channel (lan) number between the network card and the server, and the link negotiation can be considered to be correct only if the two items negotiate correctly.
S103: if the current test times are consistent, adding the test times of which the initial values are zero and judging whether the current test times are termination times;
specifically, in order to implement the link negotiation stability test, it is necessary to detect whether the link negotiation results of consecutive times are correct, so this step is mainly to record the times, and terminate the test when the times reach the termination times, so as to smoothly perform the automated test procedure.
The number of termination times may be set autonomously, for example, may be 200 times, and the embodiment of the present invention is not limited herein.
S104: if not, judging that the link negotiation is wrong;
specifically, under the condition that the two link negotiation results are inconsistent, the link negotiation result is proved to have a problem, at this time, a link negotiation error can be judged, and at this time, the test can be directly terminated theoretically, so that a worker can conveniently carry out repair work on the network card.
If the number of times is not the termination number, executing the control server to restart, and acquiring the current link negotiation result of the network card to be tested after the server is restarted;
specifically, if the number of times of termination is not reached, the procedure may return to S101 to continue the test.
S105: if the number of the termination times is the number of the termination times, the test is ended.
Specifically, if the termination times are reached, the test is proved to pass the termination times test smoothly, and the test can be terminated at the moment, and the link negotiation process of the network card is proved to be stable.
The invention provides a network card testing method, which can control a server to restart and judge whether the current link negotiation result is correct or not according to target link information of a network card to be tested after the server is restarted, and can finish the test after the restarting times reach the termination times if no link negotiation error occurs all the time, thereby completing the test on the link negotiation stability, being beneficial to timely repairing the network card with problems, improving the working efficiency and the user experience, and reducing the labor cost due to the application to a processor.
On the basis of the above-described embodiment:
as a preferred embodiment, before the control server restarts and acquires the current link negotiation result of the network card to be tested after the restart, the network card testing method further includes:
before the server is controlled to restart for the first time, whether the communication with a network card to be tested of the server can be carried out is checked;
if yes, executing the step of restarting the control server and acquiring the current link negotiation result of the network card to be tested after restarting;
if not, the alarm is controlled to give an alarm.
Specifically, the premise of the test is that the server can normally communicate with the network card, although the test is accurate before the communication is performed in advance, the situation that the communication with the network card to be tested cannot be normally established due to reasons such as wrong communication parameter setting or infirm network card insertion is inevitable, and the test is difficult to be performed under the situation, so that useless restarting is avoided.
The alarm may be of various types, for example, may be a buzzer or the like, and the embodiment of the present invention is not limited herein.
As a preferred embodiment, the step of checking whether the communication with the network card to be tested of the server can be performed specifically includes:
determining a BDF (BUS Device Function) number corresponding to the network card name of the network card to be tested according to a preset corresponding relation;
and judging whether the BDF number can be communicated with the network card to be tested.
Specifically, the method in the embodiment of the invention can quickly find the BDF number of the network card to be tested and establish communication with the network card to be tested through the BDF number, and the working efficiency is higher.
Of course, besides the method, the specific way of checking whether the network card to be tested of the server can communicate with the network card to be tested may be implemented, and the embodiment of the present invention is not limited herein.
As a preferred embodiment, after determining whether the link negotiation result is consistent with the pre-stored target link information, the network card testing method further includes:
and recording the current test result of the network card to be tested.
Specifically, in order to facilitate the analysis of the test result of the network card to be tested by the worker after the test, the test result of the network card to be tested may be recorded in the embodiment of the present invention.
As a preferred embodiment, recording the current test result of the network card to be tested specifically includes:
and recording the test time, whether the link negotiation result is correct, the network card name and the BDF number of the network card to be tested.
Specifically, the relevant information of the test result recorded in the embodiment of the invention is relatively comprehensive, which is beneficial to accurately positioning the network card relevant to the result.
Of course, besides the specific information of the test result, other relevant information of the test result may also be recorded, and the embodiment of the present invention is not limited herein.
As a preferred embodiment, after determining that the link negotiation is incorrect, the network card testing method further includes:
and the control prompter prompts the negotiation error of the network card link to be tested.
Specifically, in order to facilitate the staff to know the condition at the first time, the embodiment of the present invention may further control the prompter to prompt the network card link to be tested for negotiation errors, which is favorable for further improving the working efficiency.
In a preferred embodiment, the prompter is a voice announcer.
Specifically, the voice broadcasting device has the advantages of small size, low price, long service life and the like.
Of course, besides the voice announcer, the prompter may be of other various types, and the embodiment of the present invention is not limited herein.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a network card testing device provided in the present invention, the network card testing device is applied to a processor, and includes:
the action module 21 is used for controlling the server to restart and acquiring a current link negotiation result of the network card to be tested after the server is restarted;
the first judging module 22 is used for judging whether the link negotiation result is consistent with the pre-stored target link information, if so, the second judging module 23 is triggered, and if not, the judging module 24 is triggered;
a second judging module 23, configured to add the test times with the initial value of zero and judge whether the current test times is a termination time, if not, trigger the action module 21, and if so, trigger the termination module 25;
a decision module 24 for deciding a link negotiation error;
and an end module 25 for ending the test.
For the introduction of the network card testing device in the embodiment of the present invention, please refer to the embodiment of the network card testing method described above, which is not described herein again.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a network card testing device provided in the present invention, where the network card testing device includes:
a memory 31 for storing a computer program;
the processor 32 is configured to implement the steps of the network card testing method in the foregoing embodiments when executing the computer program.
For the introduction of the network card testing device in the embodiment of the present invention, please refer to the embodiment of the network card testing method described above, which is not described herein again.
The present invention further provides a computer-readable storage medium, on which a computer program is stored, and when being executed by a processor, the computer program implements the steps of the network card testing method in the foregoing embodiments.
For the introduction of the computer-readable storage medium in the embodiments of the present invention, please refer to the foregoing embodiments of the network card testing method, which are not described herein again.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A network card test method is applied to a processor and comprises the following steps:
the control server restarts and acquires the current link negotiation result of the network card to be tested after restarting;
judging whether the link negotiation result is consistent with pre-stored target link information or not;
if the test times are consistent, adding the test times of which the initial values are zero and judging whether the current test times are termination times;
if not, judging that the link negotiation is wrong;
if the number of times of termination is not, executing the control server to restart, and acquiring a current link negotiation result of the network card to be tested after the server is restarted;
if the number of the termination times is the number of the termination times, the test is ended.
2. The network card testing method of claim 1, wherein before the control server restarts and acquires the current link negotiation result of the network card to be tested after the restarting, the network card testing method further comprises:
before the initial control server is restarted, whether the communication with a network card to be tested of the server can be carried out is checked;
if yes, executing the control server to restart and acquiring a current link negotiation result of the network card to be tested after the control server is restarted;
if not, the alarm is controlled to give an alarm.
3. The network card testing method according to claim 2, wherein the checking whether the network card to be tested of the server can communicate specifically includes:
determining a bus equipment function BDF number corresponding to the network card name of the network card to be tested according to the preset corresponding relation;
and judging whether communication can be established with the network card to be tested according to the BDF number.
4. The network card testing method according to claim 3, wherein after determining whether the link negotiation result is consistent with the pre-stored target link information, the network card testing method further comprises:
and recording the current test result of the network card to be tested.
5. The network card testing method according to claim 4, wherein the recording of the current testing result of the network card to be tested specifically comprises:
and recording the test time, whether the link negotiation result is correct, the network card name and the BDF number of the network card to be tested.
6. The network card testing method of any one of claims 1 to 5, wherein after determining that the link negotiation is incorrect, the network card testing method further comprises:
and the control prompter prompts the negotiation error of the network card link to be tested.
7. The network card testing method of claim 6, wherein the prompter is a voice broadcaster.
8. A network card testing device is characterized by being applied to a processor and comprising:
the action module is used for controlling the server to restart and acquiring the current link negotiation result of the network card to be tested after the server is restarted;
the first judging module is used for judging whether the link negotiation result is consistent with the pre-stored target link information or not, if so, the second judging module is triggered, and if not, the judging module is triggered;
the second judging module is used for adding the test times with the initial value of zero and judging whether the current test times are termination times, if not, the action module is triggered, and if so, the termination module is triggered;
the judging module is used for judging the link negotiation error;
and the ending module is used for ending the test.
9. A network card testing device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the network card testing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, implements the steps of the network card testing method according to any one of claims 1 to 7.
CN202111424726.4A 2021-11-26 2021-11-26 Network card testing method, device and equipment and computer readable storage medium Withdrawn CN114157590A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111424726.4A CN114157590A (en) 2021-11-26 2021-11-26 Network card testing method, device and equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111424726.4A CN114157590A (en) 2021-11-26 2021-11-26 Network card testing method, device and equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114157590A true CN114157590A (en) 2022-03-08

Family

ID=80458754

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111424726.4A Withdrawn CN114157590A (en) 2021-11-26 2021-11-26 Network card testing method, device and equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114157590A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115114101A (en) * 2022-06-30 2022-09-27 苏州浪潮智能科技有限公司 Link testing method, device, system and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115114101A (en) * 2022-06-30 2022-09-27 苏州浪潮智能科技有限公司 Link testing method, device, system and storage medium
CN115114101B (en) * 2022-06-30 2024-05-10 苏州浪潮智能科技有限公司 Link testing method, device, system and storage medium

Similar Documents

Publication Publication Date Title
CN112015168B (en) Vehicle diagnosis method, system and diagnosis equipment based on automatic switching of communication protocols
CN110768863B (en) Scheme for simulating and testing AIOT equipment
CN108734307B (en) Maintenance method, home terminal, and computer-readable storage medium
CN112256505A (en) Server stability testing method and device and related components
CN114157590A (en) Network card testing method, device and equipment and computer readable storage medium
CN112948189B (en) Margin test method, margin test system and related device
CN115827358A (en) Automatic test system, method and device for PFR function and storage medium
CN111756597A (en) Wireless module testing system, method and device applied to gateway
CN112289345B (en) Visual intelligent terminal voice diagnosis method
CN111078484A (en) Power-off test method, device, equipment and storage medium for system upgrading
CN108802627B (en) Testing method, device and system for BBU independent power supply and readable storage medium
CN110673866A (en) Method and system for displaying online upgrade progress, electronic device and storage medium
CN111240913A (en) Server DQS error-reporting memory batch test method and device
CN115580550A (en) Network card stability testing method, device, equipment and storage medium
CN111722997B (en) Abnormality detection method for automated test and computer-readable storage medium
CN115437264A (en) Intelligent closestool control method and device and intelligent closestool
CN111831551B (en) Non-blocking embedded software testing method, device and storage medium
CN111679943A (en) Server test system
CN110737550B (en) Color identification detection method and device for terminal equipment
CN112698594A (en) Equipment control method and device
CN112908330A (en) Voice wake-up method and device for terminal equipment and computer readable storage medium
CN113656235B (en) Method, device, system and medium for controlling and testing power consumption of whole server
CN109284118B (en) Firmware refreshing method and system, electronic equipment and computer readable storage medium
CN113722181B (en) BMC process monitoring method, device, system and medium of server
CN111752782B (en) Stability testing method, system, device 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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20220308