CN111934945A - Method and system for testing plugging and unplugging of BMC sharelink network port - Google Patents

Method and system for testing plugging and unplugging of BMC sharelink network port Download PDF

Info

Publication number
CN111934945A
CN111934945A CN202010662644.2A CN202010662644A CN111934945A CN 111934945 A CN111934945 A CN 111934945A CN 202010662644 A CN202010662644 A CN 202010662644A CN 111934945 A CN111934945 A CN 111934945A
Authority
CN
China
Prior art keywords
sharelink
test
server
ports
bmc
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.)
Granted
Application number
CN202010662644.2A
Other languages
Chinese (zh)
Other versions
CN111934945B (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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN202010662644.2A priority Critical patent/CN111934945B/en
Publication of CN111934945A publication Critical patent/CN111934945A/en
Application granted granted Critical
Publication of CN111934945B publication Critical patent/CN111934945B/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/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports

Landscapes

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

Abstract

The invention provides a method for testing the plugging and unplugging of a BMC sharelink network port, which comprises the following steps: connecting a server to be tested with a test server through a network, and setting first static IPs of a plurality of sharelink ports of a BMC in the test server; the test server sets the plugging and unplugging test times, and orderly drops the sharelink network ports according to the sequence of the sharelink network ports; the method comprises the steps of setting second static IPs of a plurality of sharelink network ports in a server to be tested, executing up operation, circularly inquiring the connection states of the plurality of sharelink network ports, executing corresponding network port ping operation and outputting a test result.

Description

Method and system for testing plugging and unplugging of BMC sharelink network port
Technical Field
The invention relates to the field of network port testing, in particular to a method and a system for testing plugging and unplugging of a BMC sharelink network port.
Background
Python is a computer programming language, and the most stable version is currently more than Python 3.0. The network cable plugging and unplugging test of a plurality of sharelink (shared port) network ports of the server is to test whether a packet sending error exists or not and whether normal communication can be realized or not.
The network cable plugging and unplugging test process of the conventional sharelink network port is relatively complex, whether the network communication function of a plurality of sharelink ports is influenced by the plugging and unplugging of the network cable or not is tested, one end of the network cable needs to be manually connected to a server, the other end of the network cable needs to be connected to a computer or another server, the IP addresses of the server network port and the computer are manually configured, the network cable plugging and unplugging action of the sharelink network port is repeatedly carried out, and the network communication condition is checked.
Due to the fact that the IP address is manually configured and the network cable is frequently plugged and unplugged, the efficiency of testing plugging and unplugging of a Baseboard Management Controller (BMC) sharelink network port is low, and testing cost is not reduced.
Disclosure of Invention
The invention aims to solve the problems in the prior art, and innovatively provides a method and a system for testing the plugging and unplugging of a BMC sharelink network port, so that the problem of low testing efficiency of the plugging and unplugging of the BMC sharelink network port caused by manual IP address configuration and frequent network cable plugging and unplugging is effectively solved, the testing efficiency is effectively improved, and the testing cost is reduced.
The invention provides a method for testing plugging and unplugging of a BMC sharelink network port, which comprises the following steps:
connecting a server to be tested with a test server through a network, and setting first static IPs of a plurality of sharelink ports of a BMC in the test server;
the test server sets the plugging and unplugging test times, and orderly drops the sharelink network ports according to the sequence of the sharelink network ports;
setting second static IPs of a plurality of sharelink network ports in a server to be tested, executing up operation, circularly inquiring the connection states of the plurality of sharelink network ports after a first time period, executing corresponding network port ping operation, and outputting a test result.
Optionally, the multiple sharelink ports of the BMC in the server to be tested are connected with the multiple sharelink ports of the BMC in the test server in a one-to-one correspondence manner.
Further, the first static IP and the second static IP are in the same network segment.
Optionally, the test server controls the test process of the server to be tested to terminate according to the obtained user instruction.
The second aspect of the present invention provides a BMC sharelink port plugging and unplugging test system, including:
the connection module is used for connecting the server to be tested with the test server through a network and setting first static IPs of a plurality of sharelink ports of the BMC in the test server;
the setting module is used for setting the plugging and unplugging test times by the test server and sequentially dropping the sharelink ports according to the sequence of the sharelink ports;
and the setting and inquiring module is used for setting second static IPs of a plurality of sharelink ports in the server to be tested, executing up operation, circularly inquiring the connection states of the plurality of sharelink ports after a first time period, executing corresponding port ping operation and outputting a test result.
Optionally, the multiple sharelink ports of the BMC in the server to be tested are connected with the multiple sharelink ports of the BMC in the test server in a one-to-one correspondence manner.
Further, the first static IP and the second static IP are in the same network segment.
Optionally, the test server controls the test process of the server to be tested to terminate according to the obtained user instruction.
The technical scheme adopted by the invention comprises the following technical effects:
1. the invention effectively solves the problem of low test efficiency of plugging and unplugging the BMC sharelink network port caused by manually configuring the IP address and frequently plugging and unplugging the network cable, effectively improves the test efficiency, reduces the test cost and saves the test time.
2. According to the technical scheme, the test server controls the test process of the server to be tested to be terminated according to the obtained user instruction, so that the test process can be adjusted in time according to the actual condition of the user.
3. The invention can show the test result to the user through the webpage or other forms, which is convenient for the user to know the test condition.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art 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 that other drawings can be obtained based on these drawings without any creative effort.
FIG. 1 is a schematic flow diagram of a process according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a second system according to an embodiment of the present invention.
Detailed Description
In order to clearly explain the technical features of the present invention, the following detailed description of the present invention is provided with reference to the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention.
Example one
As shown in fig. 1, the present invention provides a method for testing BMC sharelink network port plugging, including:
s1, connecting the server to be tested with the test server through a network, and setting first static IPs of a plurality of sharelink ports of the BMC in the test server;
s2, the test server sets the plugging test times, and orderly drops the sharelink ports according to the sharelink port sequence;
s3, setting second static IPs of the plurality of sharelink ports in the server to be tested, executing up operation, circularly inquiring the connection states of the plurality of sharelink ports after a first time period, executing ping operation of the corresponding ports and outputting test results.
In step S1, the sharelink ports of the BMC in the server to be tested and the sharelink ports of the BMC in the test server are connected in a one-to-one correspondence via the network. Specifically, the connection may be through a network cable, or may be through other ways, and the present invention is not limited herein. In the whole test process, the network cable is plugged and pulled without manual operation. For convenience in description, the embodiment of the present invention is described by taking an example that the BMC includes 4 sharelink ports, where the sharelink ports of the BMC in the four servers to be tested are connected with the plurality of sharelink ports of the BMC in the test server in a one-to-one correspondence manner: eno0 para-eno 0, eno1 para-eno 1, eno2 para-eno 2, eno3 para-eno 3.
The first static IPs are set for four sharelink ports in the test server, for example, ports eno0 to eno3 may be set to 192.168.1.100, 192.168.2.100, 192.168.3.100, and 192.168.4.100, and may specifically be implemented by a program command.
In step S2, the test server determines the number of tests, defaults to 500, and may also flexibly adjust according to the actual situation of the user, and the tests are performed in a loop, where the number of tests and the corresponding test result may be output in a log form and stored in an assigned path, specifically, may be stored in a desktop of the test server user, so as to facilitate the user to view the result. According to the sequence of sharelink net ports eno0, eno1, eno2 and eno3, automatically down-dropping four net ports of the sharelink, namely, not plugging net wires, and turning off net port lamps; specifically, the following commands can be ordered: getoutput ("ifconfig eno% d down"% i).
In step S3, when setting the second static IPs of the multiple sharelink portals in the server to be tested, it is necessary to be in the same network segment as the first static IP, and the second static IPs of the specific 4 sharelink portals may be: the reference numbers eno0 to eno3 are 192.168.1.20, 192.168.2.20, 192.168.3.20 and 192.168.4.20, respectively.
After four sharelink network ports in the server BMC to be tested acquire static IP and complete, the up operation is automatically executed, the ports eno 1-eno 3 sequentially up, which is equivalent to the network cable being plugged again, and the method specifically can be realized by a command: ip _ set ═ cm. getoutput ("ifconfig eno% d 192.168. d.20up"% (i, i + 1)).
Because the network cable is plugged and unplugged with a short delay to acquire the network signal, a first time period is required, the first time period may be 10 seconds, and the first time period may also be flexibly adjusted according to the actual situation.
Circularly checking the connection states of the four sharelink ports eno0, eno1, eno2 and eno 3; if the portal status is yes (connectable), a portal ping operation is performed and the time when the ping operation starts is recorded. The ping operation is specifically to ping 4 sharelink ports of the servers to be tested, wherein the 4 sharelink ports of the servers to be tested correspond to one another one by one. Whether the internet access communication is normal or not is checked, the checking time in actual operation can be 120 seconds, and adjustment can be performed according to actual conditions. If the internet access status is no (disconnected, not connectable), the internet access ping operation is also executed, and the time when the ping operation starts is recorded. Whether the internet access communication is normal or not is checked, the checking time in actual operation can be 120 seconds, and adjustment can be performed according to actual conditions. After the up operation is executed, the sharelink network port connection state of the network cable displays yes, and the network communication is available and can be ping communication; before the up operation is executed, the sharelink network port connection state of the network cable displays no, no network communication exists, and ping communication cannot be achieved, so that the pluggable test of the sharelink network port of the BMC is passed, and otherwise, the pluggable test of the sharelink network port of the BMC is not passed.
The time and communication result in step S3 are output in the form of log file, and stored in a designated location, for example, on the user desktop, so that the tester can conveniently view the test result.
It should be noted that, in the embodiment of the present invention, steps S1 to S3 may all be implemented by program script programming, and specifically may be implemented by Python language, where a script name may be net _ sharelink _ test.py: first copy the script to the test server OS (operating system) desktop, with the python version 2.7.16; opening a test server OS terminal, switching to a user with a corresponding authority, inputting a command \ net _ sharelink _ test.py, and testing; checking the log file of the appointed storage position, and confirming the communication results after different network ports up, wherein the time record of each ping operation is recorded; because the static IP allocated to the four network ports of the sharelink in each cycle test in the script is not changed, it is easy to identify the communication result of which network port, and a tester can check how many times the test is performed, at which time the test is started, and how the communication result of the corresponding time is; the pressure test time can be estimated or defined conveniently, and the test result of each time point can be checked conveniently.
The user can input < ctrl c > to terminate the test process at any time, and the test server controls the test process of the server to be tested to terminate according to the obtained user instruction.
It should be noted that, in the embodiment of the present invention, the BMC includes 4 sharlink ports as an example for description, and in an actual test, other numbers of sharlink ports may also be used, and the present invention is not limited herein.
The invention effectively solves the problem of low test efficiency of plugging and unplugging the BMC sharelink network port caused by manually configuring the IP address and frequently plugging and unplugging the network cable, effectively improves the test efficiency, reduces the test cost and saves the test time.
According to the technical scheme, the test server controls the test process of the server to be tested to be terminated according to the obtained user instruction, so that the test process can be adjusted in time according to the actual condition of the user.
The invention can show the test result to the user through the webpage or other forms, which is convenient for the user to know the test condition.
Example two
As shown in fig. 2, the technical solution of the present invention further provides a BMC sharelink port plugging and unplugging test system, including:
the connection module 101 is used for connecting the server to be tested with the test server through a network cable and setting first static IPs of a plurality of sharelink ports of the BMC in the test server;
the setting module 102 is used for setting the plugging and unplugging test times by the test server and sequentially dropping the sharelink ports according to the sequence of the sharelink ports;
the setting and querying module 103 is configured to set second static IPs of the plurality of sharelink ports in the server to be tested, execute up operation, cyclically query connection states of the plurality of sharelink ports after a first time period, execute corresponding port ping operation, and output a test result.
And the plurality of sharelink network ports of the BMC in the server to be tested are connected with the plurality of sharelink network ports of the BMC in the test server in a one-to-one correspondence manner.
The first static IP and the second static IP are in the same network segment.
And the test server controls the test process of the server to be tested to be terminated according to the acquired user instruction.
The invention effectively solves the problem of low test efficiency of plugging and unplugging the BMC sharelink network port caused by manually configuring the IP address and frequently plugging and unplugging the network cable, effectively improves the test efficiency, reduces the test cost and saves the test time.
According to the technical scheme, the test server controls the test process of the server to be tested to be terminated according to the obtained user instruction, so that the test process can be adjusted in time according to the actual condition of the user.
The invention can show the test result to the user through the webpage or other forms, which is convenient for the user to know the test condition.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.

Claims (8)

1. A BMC sharelink network port plugging and unplugging test method is characterized by comprising the following steps:
connecting a server to be tested with a test server through a network, and setting first static IPs of a plurality of sharelink ports of a BMC in the test server;
the test server sets the plugging and unplugging test times, and orderly drops the sharelink network ports according to the sequence of the sharelink network ports;
setting second static IPs of a plurality of sharelink network ports in a server to be tested, executing up operation, circularly inquiring the connection states of the plurality of sharelink network ports after a first time period, executing corresponding network port ping operation, and outputting a test result.
2. The method as claimed in claim 1, wherein the plurality of sharelink ports of the BMC in the server under test are connected to the plurality of sharelink ports of the BMC in the test server in a one-to-one correspondence.
3. The method of claim 2, wherein the first static IP and the second static IP are in a same network segment.
4. The method for testing the plugging and unplugging of the BMC sharelink network port of claim 1, wherein the test server controls the test process of the server to be tested to be terminated according to the obtained user command.
5. The utility model provides a test system of BMC sharelink net gape plug, characterized by includes:
the connection module is used for connecting the server to be tested with the test server through a network and setting first static IPs of a plurality of sharelink ports of the BMC in the test server;
the setting module is used for setting the plugging and unplugging test times by the test server and sequentially dropping the sharelink ports according to the sequence of the sharelink ports;
and the setting and inquiring module is used for setting second static IPs of a plurality of sharelink ports in the server to be tested, executing up operation, circularly inquiring the connection states of the plurality of sharelink ports after a first time period, executing corresponding port ping operation and outputting a test result.
6. The system of claim 5, wherein the plurality of sharelink ports of the BMC in the server under test are connected to the plurality of sharelink ports of the BMC in the test server in a one-to-one correspondence.
7. The system of claim 6, wherein the first static IP and the second static IP are in the same network segment.
8. The system of claim 5, wherein the test server controls the termination of the test process of the server under test according to the obtained user command.
CN202010662644.2A 2020-07-10 2020-07-10 BMC sharelink network port plugging test method and system Active CN111934945B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010662644.2A CN111934945B (en) 2020-07-10 2020-07-10 BMC sharelink network port plugging test method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010662644.2A CN111934945B (en) 2020-07-10 2020-07-10 BMC sharelink network port plugging test method and system

Publications (2)

Publication Number Publication Date
CN111934945A true CN111934945A (en) 2020-11-13
CN111934945B CN111934945B (en) 2023-07-21

Family

ID=73312951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010662644.2A Active CN111934945B (en) 2020-07-10 2020-07-10 BMC sharelink network port plugging test method and system

Country Status (1)

Country Link
CN (1) CN111934945B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101800669A (en) * 2009-02-06 2010-08-11 英业达股份有限公司 Network port test system and method
US20120304011A1 (en) * 2011-05-23 2012-11-29 Hon Hai Precision Industry Co., Ltd. Server and power supply test method
CN105024849A (en) * 2015-06-02 2015-11-04 浪潮电子信息产业股份有限公司 Method for a high-density equipment cabinet server to perform bulk operation on each node BMC
CN107220061A (en) * 2017-06-16 2017-09-29 郑州云海信息技术有限公司 A kind of method of testing by script remote control exchanger port break-make
CN107995068A (en) * 2017-12-20 2018-05-04 北京百度网讯科技有限公司 Network interface test method and equipment
CN109450682A (en) * 2018-11-07 2019-03-08 郑州云海信息技术有限公司 A kind of IB network interface card connection configuration method, device, terminal and storage medium
CN109802867A (en) * 2019-01-02 2019-05-24 郑州云海信息技术有限公司 A kind of method and system for testing network interface card NCSI connective stability
CN110890995A (en) * 2019-05-14 2020-03-17 研祥智能科技股份有限公司 Network port testing method and network port testing device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101800669A (en) * 2009-02-06 2010-08-11 英业达股份有限公司 Network port test system and method
US20120304011A1 (en) * 2011-05-23 2012-11-29 Hon Hai Precision Industry Co., Ltd. Server and power supply test method
CN105024849A (en) * 2015-06-02 2015-11-04 浪潮电子信息产业股份有限公司 Method for a high-density equipment cabinet server to perform bulk operation on each node BMC
CN107220061A (en) * 2017-06-16 2017-09-29 郑州云海信息技术有限公司 A kind of method of testing by script remote control exchanger port break-make
CN107995068A (en) * 2017-12-20 2018-05-04 北京百度网讯科技有限公司 Network interface test method and equipment
CN109450682A (en) * 2018-11-07 2019-03-08 郑州云海信息技术有限公司 A kind of IB network interface card connection configuration method, device, terminal and storage medium
CN109802867A (en) * 2019-01-02 2019-05-24 郑州云海信息技术有限公司 A kind of method and system for testing network interface card NCSI connective stability
CN110890995A (en) * 2019-05-14 2020-03-17 研祥智能科技股份有限公司 Network port testing method and network port testing device

Also Published As

Publication number Publication date
CN111934945B (en) 2023-07-21

Similar Documents

Publication Publication Date Title
US9348771B1 (en) Cloud-based instrument driver system
CN111404779B (en) Method, device and system for testing role switching of router nodes
CN108809755B (en) Automatic testing method and system for home gateway compatible with command line and WEB interface
CN108234246B (en) Method and system for multi-directionally testing network performance of server
CN104993947A (en) Method for upgrading firmware in batches
SG178186A1 (en) Programmable protocol generator
CN112511370B (en) Signal test system with self-switching PHY (physical layer) mode
CN111130924A (en) Test method, test device and test equipment for Ethernet port of equipment
CN109660386B (en) Software upgrading method for semiconductor memory aging test system
CN110764036A (en) Intelligent distribution transformer terminal test method and system
WO2010008367A1 (en) System for injecting protocol specific errors during the certification of components in a storage area network
CN111934945A (en) Method and system for testing plugging and unplugging of BMC sharelink network port
CN112118159B (en) Network testing method, device, equipment and computer readable storage medium
TWI748652B (en) Server testing system based on baseboard management controller (bmc) and method thereof
CN106598793A (en) Test system and method based on BIOS serial port log data
CN113468054B (en) Automatic test system and method for satellite interface and function test
US7191099B2 (en) System for testing network devices
CN115981928A (en) Processor remote debugging method, system and storage medium
CN112463083B (en) Remote collection method and system for information of substrate control manager
CN111611148B (en) Compatibility concurrent test method and system for iOS system application software
WO2017190544A1 (en) Data transmission cable and data transmission method
CN113572521A (en) Automatic testing method compatible with multi-manufacturer OLT intercommunication testing
CN113419955A (en) Software version automatic test system, method, medium and device
CN116610511B (en) Storage test equipment and test method thereof
Kouřil et al. Data acquisition system for the modern induction motor drive applications

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