Cabinet network cable line sequence detection method, device, system, equipment and storage medium
By automating the detection of the relationship between switch port numbers and MAC addresses, the problem of high human error risk and low efficiency in rack network cable sequence detection has been solved, achieving efficient and accurate cable sequence detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-07
- Publication Date
- 2026-03-03
AI Technical Summary
In existing technologies, the wiring sequence detection of network cables in server racks relies on manual methods, which are prone to errors and inefficient, making it difficult to meet the needs of mass production operations.
By obtaining the switch port number and MAC address, generating a port-MAC address relationship log, initializing detection parameters, and automatically detecting the connection between the port and the network card of the server node, the automated detection of port U-position and network card connection is achieved.
It has enabled automated detection of network cable wiring sequence, improved detection efficiency, reduced labor costs, and ensured the accuracy of wiring sequence in mass production of server racks.
Smart Images

Figure CN116319407B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of server technology, and in particular to a method, apparatus, system, equipment, and storage medium for detecting the wiring sequence of server rack network cables. Background Technology
[0002] With the development of the server industry, the delivery of large data center servers has gradually evolved from complete machine delivery to rack delivery. Rack delivery encompasses the entire process of server production, rack mounting, switch installation, cabling, testing, packaging, transportation, and final installation and use. For suppliers, rack delivery offers significant advantages in terms of cost and timeliness compared to traditional complete machine delivery.
[0003] Then, delivering the entire server rack means moving the original data center cabling work forward to the production process. While this facilitates delivery, it also transfers the risk of incorrect cable connections to the production process. Even a single incorrectly connected network cable can cause significant problems, creating additional obstacles for data center operations and data management, resulting in economic losses. Therefore, checking the cable sequence is crucial during the server rack production process. Traditional methods for checking network cable sequence rely on manual operations such as labeling and cable locators, which are inefficient, prone to errors, and unsuitable for mass production testing. Therefore, there is an urgent need for a method, device, equipment, and readable storage medium for detecting the cable sequence of server rack network cables, adapted to the server rack cable sequence detection workflow, to automate the detection of cable sequence, ensuring accuracy while being suitable for mass production testing of server racks. Summary of the Invention
[0004] To address the problems of error risk, low efficiency, and unsuitability for mass production testing of network cables in existing technologies, the present invention provides a method, apparatus, system, equipment, and storage medium for detecting the wiring sequence of network cables in server racks. This method replaces manual testing, offers high accuracy, and is highly compatible with production line operations. It ensures accurate wiring sequence detection while being suitable for mass production testing of server racks.
[0005] To solve one or more of the above-mentioned technical problems, the present invention adopts the following technical solution:
[0006] Firstly, a method for detecting the wiring sequence of a server rack network cable is provided, including:
[0007] The port number of one or more ports to be tested on the switch to be tested is obtained in sequence, as well as the MAC address corresponding to one or more ports to be tested, and a port-MAC address relationship log is generated. The ports to be tested are connected to the network card of the server via a network cable. The port-MAC address relationship log records at least the following: the port number corresponding to the ports to be tested in sequence, the MAC address corresponding to the ports to be tested, and the U position of the ports to be tested.
[0008] Initialize the detection parameters used to detect the network card connection between the port to be detected and the server node. The detection parameters include: temporary server node parameters and a counter. The temporary server node parameters are used to store the server node number corresponding to the port to be detected, and the counter is used to detect the network card connection between the port to be detected and the server node.
[0009] In the port-MAC address relationship log, the port numbers corresponding to the ports to be tested are sequentially arranged as the current port number, and port U-position detection and network card connection detection of the server node are performed on the port corresponding to the current port number.
[0010] Furthermore, the port numbers of one or more target ports of the switch under test are sequentially obtained, along with the MAC addresses corresponding to the one or more target ports, to generate a port-MAC address relationship log, including:
[0011] Based on the configuration of the rack where the switch under test is located, obtain the manufacturer and model of the switch under test from the bill of materials. The configuration should include at least: the hardware information of the switch under test, and the hardware information of one or more servers connected to the switch under test via network cable. The bill of materials should at least record: the manufacturer of the switch under test and the model of the switch under test.
[0012] Based on the manufacturer and model of the switch under test, obtain the corresponding MAC address capture program for the switch under test;
[0013] The program executes a MAC address capture program on the switch under test via serial port to capture the port number of one or more ports under test, the MAC address corresponding to one or more ports under test, and the U-bit of one or more target ports.
[0014] Record the port number of one or more ports to be tested, and the corresponding MAC address of one or more ports to be tested, and generate a port-MAC address relationship log. The port numbers are arranged in order according to the port definition of the switch to be tested in the port-MAC address relationship log.
[0015] Furthermore, initializing the detection parameters used to detect the network interface card connection between the port to be detected and the server node includes:
[0016] Set the temporary server node parameters to empty;
[0017] Set the counter to 1.
[0018] Furthermore, port U-bit detection is performed on the port corresponding to the current port number, including:
[0019] Search in the port-U bit correspondence dictionary and obtain the current actual U bit of the port corresponding to the current port number. The port-U bit correspondence dictionary shall at least record: the port number of the port to be detected and the actual U bit of the port to be detected.
[0020] Search the port-MAC address relationship log and obtain the MAC address corresponding to the current port number, then use that MAC address as the current MAC address.
[0021] Search the server node-MAC address mapping list and obtain the current server node number corresponding to the current MAC address. The server node-MAC address mapping list shall at least record: server node number, server node network card serial number corresponding to the server node number, and MAC address corresponding to the server node network card serial number.
[0022] Search the server node-U-bit correspondence list and obtain the current expected U-bit corresponding to the current server node number. The server node-U-bit correspondence list shall at least record: the server node number and the expected U-bit corresponding to the server node number.
[0023] Determine whether the current actual U position matches the current expected U position;
[0024] If the current actual U-position matches the current expected U-position, then perform a network card connection test on the server node for the port corresponding to the current port number.
[0025] If the current actual U position is inconsistent with the current expected U position, the check will fail and the check will end.
[0026] Furthermore, the network interface card (NIC) connection of the server node is checked for the port corresponding to the current port number, including:
[0027] Search the server node-MAC address relationship list and obtain the network card serial number of the current server node corresponding to the current server node number;
[0028] Determine if the parameters of the temporary server node are consistent with the current server node number;
[0029] If the temporary server node parameters are the same as the current server node number, then increment the counter by 1 to get the current counter value;
[0030] If the temporary server node parameter is inconsistent with the current server node number, then the temporary server node parameter is assigned the current server node number SN, and the counter is assigned the value 1 as the current value of the counter;
[0031] Determine if the current value of the counter matches the current network interface card number of the server node;
[0032] If the current counter value matches the current server node's network interface card number, then determine whether the current port number is the last port number in the port-MAC address relationship log;
[0033] If the current port number is the last port number in the port-MAC address relationship log, then end the current check;
[0034] If the current port number is not the last port number in the port-MAC address relationship log, then the next port number will be used as the current port number, and port U-position detection and network card connection detection of the server node will be performed on the port corresponding to the current port number.
[0035] If the current counter value is inconsistent with the current server node's network card serial number, the check will fail and the check will end.
[0036] Furthermore, the above-mentioned method for detecting the wiring sequence of network cables in the server rack also includes:
[0037] Generate a list of server node-MAC address mappings;
[0038] Generate a dictionary of port-U bit mappings;
[0039] Generate a list of server node-U-bit mappings;
[0040] The test server connects the switch under test to the rack network cable via a serial port and performs a wiring sequence test.
[0041] Secondly, a wiring sequence detection device for server rack network cables is provided, comprising: a log acquisition module, a parameter initialization module, and a detection execution module;
[0042] The log acquisition module is used to: sequentially acquire the port number of one or more ports to be tested on the switch under test, and the MAC address corresponding to one or more ports to be tested, and generate a port-MAC address relationship log; wherein, the ports to be tested are connected to the network card of the server through a network cable, and the port-MAC address relationship log records at least: the port number corresponding to the ports to be tested in sequence, the MAC address corresponding to the ports to be tested, and the U position of the ports to be tested;
[0043] The parameter initialization module is used to: initialize the detection parameters used to detect the network card connection between the port to be detected and the server node, wherein the detection parameters include: temporary server node parameters and a counter. The temporary server node parameters are used to store the server node number corresponding to the port to be detected, and the counter is used to perform network card connection detection between the port to be detected and the server node.
[0044] The detection execution module is used to: sequentially select the port numbers corresponding to the ports to be detected in the port-MAC address relationship log as the current port number, and perform port U-position detection and network card connection detection on the port corresponding to the current port number.
[0045] Thirdly, a wiring sequence detection system for server rack network cables is provided, comprising at least: a server rack, a switch, one or more servers, and a detection server;
[0046] A switch includes at least: ports and serial ports, wherein the ports are arranged in the order defined by the switch.
[0047] The switch is installed inside the server rack, and the network cards of one or more servers are connected to the port of the switch via network cables.
[0048] Detect the serial port connection between the server and the switch;
[0049] The testing server is used to perform the wiring sequence testing method for the rack network cables described in the first aspect above.
[0050] Fourthly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described in the first aspect.
[0051] Fifthly, a computer-readable storage medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0052] The beneficial effects of the technical solution provided by the embodiments of the present invention are as follows:
[0053] 1. By implementing the wiring sequence detection method for cabinet network cables disclosed in this invention, the wiring sequence inspection of network cables can be automated, production line testing efficiency can be improved, labor costs can be reduced, product quality can be improved, and it is suitable for the wiring sequence detection of large batches of cabinet network cables.
[0054] 2. For the relationship between server device address and server spatial location (MAC address and U-bit) that cannot be obtained intuitively, the method disclosed in this invention can achieve an accurate correspondence between the server device address and physical location. Attached Figure Description
[0055] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0056] Figure 1 This is a schematic diagram of a wiring sequence detection method for a server rack network cable provided in an embodiment of the present invention;
[0057] Figure 2 This is a schematic diagram of a wiring sequence detection device for a server rack network cable provided in an embodiment of the present invention;
[0058] Figure 3 This is a schematic diagram of a wiring sequence detection device for a server rack network cable provided in an embodiment of the present invention. Detailed Implementation
[0059] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0060] Unless otherwise defined, the technical or scientific terms used in this disclosure shall have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms “first,” “second,” and similar terms used in this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an,” “a,” or “the,” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The numbers in the accompanying drawings are only used to distinguish individual functional parts or modules and do not indicate logical relationships between parts or modules. The terms “comprising,” “including,” or “including,” and similar terms mean that the element or object preceding the term encompasses the element or object listed following the term and its equivalents, without excluding other elements or objects. The terms “connected,” “linked,” and similar terms are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. “Above,” “below,” “left,” “right,” etc., are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0061] For the component symbols involved in this application specification, the circuit diagram indicates the type of component and distinguishes each component, such as R1, R2, C, etc.; the corresponding formula represents the magnitude of the corresponding physical quantity of the component, which is distinguished by italics, for example: the resistance value corresponding to resistor R1 is R1.
[0062] The various embodiments according to this disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that in the drawings, the same reference numerals are assigned to components having substantially the same or similar structure and function, and repeated descriptions of them will be omitted.
[0063] In addressing the problem in existing technologies where electromagnetic radiation from clock signals not connected to the substrate management controller exceeds limits due to printed circuit board compatibility design, this invention provides a clock signal electromagnetic radiation suppression circuit, circuit board, and method. This automatically shuts down clock signals not connected to the substrate management controller, reducing electromagnetic radiation levels and ensuring that product electromagnetic radiation meets relevant standards.
[0064] In one embodiment, such as Figure 1 As shown, a method for detecting the wiring sequence of a cabinet network cable includes:
[0065] S10: Sequentially obtain the port number of one or more ports to be tested on the switch under test, and the MAC address corresponding to one or more ports to be tested, and generate a port-MAC address relationship log.
[0066] S20: Initialize the detection parameters used to detect the network card connection between the port to be detected and the server node.
[0067] S30: In the port-MAC address relationship log, the port numbers corresponding to the ports to be tested are sequentially arranged as the current port number, and port U-position detection and network card connection detection of the server node are performed on the port corresponding to the current port number.
[0068] In another embodiment, a method for detecting the wiring sequence of a cabinet network cable specifically includes:
[0069] S10: Sequentially obtain the port number of one or more ports to be tested on the switch under test, and the MAC address corresponding to one or more ports to be tested, and generate a port-MAC address relationship log; wherein, the ports to be tested are connected to the network card of the server through a network cable, and the port-MAC address relationship log records at least: the port number corresponding to the ports to be tested in sequence, the MAC address corresponding to the ports to be tested, and the U position of the ports to be tested.
[0070] Specifically, the port numbers of one or more target ports of the switch under test are obtained sequentially, along with the MAC addresses corresponding to the one or more target ports, to generate a port-MAC address relationship log, including:
[0071] S11: Based on the configuration of the rack where the switch under test is located, obtain the manufacturer and model of the switch under test from the bill of materials. The configuration shall include at least the hardware information of the switch under test and the hardware information of one or more servers connected to the switch under test via network cable. The bill of materials shall at least record the manufacturer and model of the switch under test.
[0072] S12: Obtain the MAC address capture program corresponding to the switch under test based on the manufacturer and model of the switch under test.
[0073] Since different manufacturers and different models of switches use different MAC address capture programs, it is necessary to obtain the corresponding MAC address capture program based on the specific manufacturer and model of the switch to be tested.
[0074] S13: Execute a MAC address capture program on the switch under test via serial port to capture the port number of one or more ports under test, the MAC address corresponding to one or more ports under test, and the U-bit of one or more target ports.
[0075] S14: Record the port number of one or more ports to be tested, and the MAC address corresponding to one or more ports to be tested, and generate a port-MAC address relationship log. The port numbers are arranged in order according to the port definition of the switch to be tested in the port-MAC address relationship log.
[0076] According to the switch port definitions, when connecting switch ports and servers using network cables, a sequential connection method is typically used. Specifically, when multiple server nodes correspond to servers with only one network interface card (NIC), the NICs of the server nodes corresponding to multiple server nodes are connected sequentially using network cables according to the switch port numbers. When a server node corresponds to a server with multiple NICs, the NICs of the corresponding server are connected sequentially according to the switch port numbers. After the NIC of the current server node is connected to the switch port, the server port is then connected to the NIC of the next server node in the same way.
[0077] For example: Server node 1 has one network interface card (NIC) port, NIC1; Server node 2 has two network interface cards (NIC1 and NIC2); Server node 3 has two network interface cards (NIC1 and NIC2).
[0078] The switch ports are arranged in the following order: PORT1, PORT2, PORT3, PORT4, PORT5;
[0079] During connection, PORT1 connects to server NIC1 (number 1), PORT2 connects to server NIC1 (number 2), PORT3 connects to server NIC2 (number 2), PORT4 connects to server NIC1 (number 3), and PORT5 connects to server NIC2 (number 3). Provided the above connection method is followed, this application does not limit the specific numbers of the switch ports or network card port numbers.
[0080] S20: Initialize the detection parameters used to detect the network card connection between the port to be detected and the server node. The detection parameters include: temporary server node parameters and a counter. The temporary server node parameters are used to store the server node number corresponding to the port to be detected, and the counter is used to detect the network card connection status between the port to be detected and the server node.
[0081] Specifically, initializing the detection parameters used to detect the network interface card connection between the port to be detected and the server node includes:
[0082] S21: Set the temporary server node parameters to empty;
[0083] Define temp_SN as the power-on parameter for the temporary server, and assign it an empty value: temp_SN="".
[0084] S22: Set the counter to 1;
[0085] Define SN_count as a counter and assign it the value 1: SN_count = 1.
[0086] The temporary server node parameters are used to detect the current port number and record the current port number when connecting to the server node's network card.
[0087] S30: In the port-MAC address relationship log, the port numbers corresponding to the ports to be tested are sequentially arranged as the current port number, and port U-position detection and network card connection detection of the server node are performed on the port corresponding to the current port number.
[0088] S31: Perform port U-bit detection on the port corresponding to the current port number, specifically including:
[0089] S311: Search in the port-U-bit correspondence dictionary and obtain the current actual U-bit of the port corresponding to the current port number. The port-U-bit correspondence dictionary shall at least record: the port number of the port to be detected and the actual U-bit of the port to be detected.
[0090] S312: Search the port-MAC address relationship log and obtain the MAC address corresponding to the current port number, and use the MAC address as the current MAC address;
[0091] S313: Search the server node-MAC address mapping list and obtain the current server node number corresponding to the current MAC address. The server node-MAC address mapping list shall at least record: the server node number, the server node network card serial number corresponding to the server node number, and the MAC address corresponding to the server node network card serial number.
[0092] The server nodes correspond to the servers connected to the switch being tested.
[0093] S314: Search the server node-U-bit correspondence list and obtain the current expected U-bit corresponding to the current server node number. The server node-U-bit correspondence list shall at least record: the server node number and the expected U-bit corresponding to the server node number.
[0094] S315: Determine whether the current actual U position is consistent with the current expected U position;
[0095] If the current actual U position is consistent with the current expected U position, then execute S32: perform network card connection detection on the server node for the port corresponding to the current port number.
[0096] If the current actual U position is inconsistent with the current expected U position, then execute S316: prompt that the check failed and end the current check.
[0097] S32: Perform network interface card (NIC) connection checks on the port corresponding to the current port number on the server node. Since there may be multiple NICs connected to the switch on the server node, further checks are needed to verify the wiring sequence between the port and the NIC. The specific process is as follows:
[0098] S321: Search the server node-MAC address relationship list and obtain the network card serial number of the current server node corresponding to the current server node number;
[0099] S322: Determine whether the parameters of the temporary server node are consistent with the current server node number;
[0100] If the temporary server node parameters are the same as the current server node number, then execute S323: increment the counter by 1 to get the current counter value;
[0101] If the temporary server node parameter is inconsistent with the current server node number, then execute S323': assign the temporary server node parameter to the current server node number SN, and assign the counter to 1 as the current value of the counter.
[0102] When the detection method is executed for the first time, the value of temp_SN is empty. Since the temporary server node parameter temp_SN is inconsistent with the current server node number, the temporary server node parameter is assigned the current server node number SN, and the counter is assigned the value 1: SN_count++.
[0103] When it is detected that the server corresponding to the current server node has two network interface ports, the temporary server node parameters are consistent with the current server node number, and the counter is incremented by 1. At this time, SN_count = 2. In the next round of detection, the second network interface port of the server corresponding to the current server node will continue to be detected to see if it is connected correctly.
[0104] S324: Determine whether the current value of the counter is consistent with the current network card serial number of the server node.
[0105] If the current value of the counter is inconsistent with the current network card serial number of the server node, then execute S325': prompt that the check failed and end the check.
[0106] If the current counter value matches the current server node's network card serial number, then execute S325: determine whether the current port number is the last port number in the port-MAC address relationship log;
[0107] If the current port number is the last port number in the port-MAC address relationship log, then execute S326': End this check. At this point, it indicates that all ports of the switch under test have passed the wiring sequence test and the connection is normal.
[0108] If the current port number is not the last port number in the port-MAC address relationship log, then execute S326: take the next port number as the current port number, and perform port U-bit detection and network card connection detection on the port corresponding to the current port number.
[0109] In one embodiment, the method for detecting the wiring sequence of a cabinet network cable further includes:
[0110] S01: Generate a list of server node-MAC address mappings;
[0111] The server node-MAC address mapping list should include at least the corresponding server node (SN), MAC address, and server node network interface card (NIC) serial number, as shown in Table 1.
[0112] Table 1 also shows the mapping between server nodes and MAC addresses, which can be either one-to-one or one-to-many. The specific format and content of the table may be adapted to the specific implementation scenario. However, the specific format of the server node-MAC address mapping list will not limit the method for detecting the wiring sequence of a rack network cable claimed in this application.
[0113] S02: Generate a dictionary of port-U bit correspondences;
[0114] Different users may use switches from different vendors in different racks. The correspondence between switch ports and U-positions differs for different configurations (PN). Each configuration (PN) needs to define its own correspondence, as shown in Table 2.
[0115] Table 1. Schematic List of Server Node-MAC Address Correspondence
[0116]
[0117] Table 2. Dictionary of Port-U Position Correspondence
[0118]
[0119] Since there is a one-to-many relationship between server nodes and MAC addresses, the following correspondence may also exist: PNx:port0:ulocation0,port1:ulocation0,……,portx:ulocationx.
[0120] The specific form of the port-U bit correspondence dictionary will not limit the method for detecting the wiring sequence of a cabinet network cable claimed in this application.
[0121] S03: Generate a list of server node-U-position correspondences;
[0122] This table is generated when servers and switches are assembled and racked.
[0123] Table 3. Server Node-U Position Correspondence List
[0124]
[0125] The specific form of the server node-U-bit correspondence list will not limit the method for detecting the wiring sequence of a rack network cable claimed in this application.
[0126] S04: A testing server that connects the switch under test to the rack network cable via a serial port to perform a wiring sequence testing method.
[0127] The wiring should be done sequentially according to the switch ports and the network interface card (NIC) port numbers of the corresponding server nodes. See section S14 for specific connection instructions.
[0128] Since the MAC address capture program needs to be executed on the switch via a serial port, a serial connection needs to be established between the switch and the detection server before implementing a method for detecting the cable sequence of a rack network cable.
[0129] In another embodiment, such as Figure 2 As shown, a wiring sequence detection device for server rack network cables includes: a log acquisition module, a parameter initialization module, and a detection execution module;
[0130] The log acquisition module is used to: sequentially acquire the port number of one or more ports to be tested on the switch under test, and the MAC address corresponding to one or more ports to be tested, and generate a port-MAC address relationship log; wherein, the ports to be tested are connected to the network card of the server through a network cable, and the port-MAC address relationship log records at least: the port number corresponding to the ports to be tested in sequence, the MAC address corresponding to the ports to be tested, and the U position of the ports to be tested;
[0131] The parameter initialization module is used to: initialize the detection parameters used to detect the network card connection between the port to be detected and the server node, wherein the detection parameters include: temporary server node parameters and a counter. The temporary server node parameters are used to store the server node number corresponding to the port to be detected, and the counter is used to perform network card connection detection between the port to be detected and the server node.
[0132] The detection execution module is used to: sequentially select the port numbers corresponding to the ports to be detected in the port-MAC address relationship log as the current port number, and perform port U-position detection and network card connection detection on the port corresponding to the current port number.
[0133] In another embodiment, a cabinet network cable wiring sequence detection system includes at least: a cabinet, a switch, one or more servers, and a detection server.
[0134] A switch includes at least two components: ports and serial ports. The ports are arranged in the order defined by the switch.
[0135] The switch is installed in the rack, and the network cards of one or more servers are connected to the port of the switch via network cables. The hardware devices such as switches and servers connected by network cables constitute a configuration, which is based on the hardware device information such as switch manufacturer and model, server manufacturer and model recorded in the Bill of Materials (BOM).
[0136] Detect the serial port connection between the server and the switch.
[0137] The testing server is used to perform the steps of the above-described method for detecting the wiring sequence of a rack network cable.
[0138] In another embodiment, a computer device, such as Figure 3 As shown, it includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, it implements the steps of the above-mentioned method for detecting the wiring sequence of a cabinet network cable.
[0139] In another embodiment, a computer-readable storage medium stores a computer program that, when executed by a processor, implements the above-described method for detecting the wiring sequence of a cabinet network cable.
[0140] All of the above-mentioned optional technical solutions can be combined in any way to form optional embodiments of the present invention, and will not be described in detail here.
[0141] Example 1
[0142] A method for detecting the wiring sequence of a server rack network cable, such as Figure 1 As shown, it includes:
[0143] S10: Sequentially obtain the port number of one or more ports to be tested on the switch under test, and the MAC address corresponding to one or more ports to be tested, and generate a port-MAC address relationship log.
[0144] S20: Initialize the detection parameters used to detect the network card connection between the port to be detected and the server node.
[0145] S30: In the port-MAC address relationship log, the port numbers corresponding to the ports to be tested are sequentially arranged as the current port number, and port U-position detection and network card connection detection of the server node are performed on the port corresponding to the current port number.
[0146] Example 2
[0147] S10: Sequentially obtain the port numbers of one or more ports to be tested on the switch under test, and the MAC addresses corresponding to one or more ports to be tested, and generate a port-MAC address relationship log, including:
[0148] S11: Based on the configuration of the cabinet where the switch under test is located, obtain the manufacturer and model of the switch under test from the bill of materials;
[0149] S12: Obtain the MAC address capture program corresponding to the switch under test based on the manufacturer and model of the switch under test;
[0150] S13: Execute a MAC address capture program on the switch under test via serial port to capture the port number of one or more ports under test, the MAC address corresponding to one or more ports under test, and the U-bit of one or more target ports.
[0151] S14: Record the port number of one or more ports to be tested, and the MAC address corresponding to one or more ports to be tested, and generate a port-MAC address relationship log. The port numbers are arranged in order according to the port definition of the switch to be tested in the port-MAC address relationship log.
[0152] S20: Initialize the detection parameters used to detect the network interface card connection between the port to be detected and the server node, including:
[0153] S21: Set the temporary server node parameters to empty;
[0154] S22: Set the counter to 1.
[0155] S30: In the port-MAC address relationship log, the port numbers corresponding to the ports to be tested are sequentially listed as the current port number. Then, port U-position detection and network card connection detection of the server node are performed on the port corresponding to the current port number, including:
[0156] S311: Search in the port-U-bit correspondence dictionary and obtain the current actual U-bit of the port corresponding to the current port number;
[0157] S312: Search the port-MAC address relationship log and obtain the MAC address corresponding to the current port number, and use the MAC address as the current MAC address;
[0158] S313: Search the server node-MAC address mapping list and obtain the current server node number corresponding to the current MAC address;
[0159] S314: Search the server node-U-bit correspondence list and obtain the current desired U-bit corresponding to the current server node number;
[0160] S315: Determine whether the current actual U position is consistent with the current expected U position;
[0161] If the current actual U position is consistent with the current expected U position, then execute S32: perform network card connection detection on the server node for the port corresponding to the current port number.
[0162] If the current actual U position is inconsistent with the current expected U position, then execute S316: prompt that the check failed and end the current check.
[0163] S32: Perform network interface card (NIC) connection detection on the port corresponding to the current port number, including:
[0164] S321: Search the server node-MAC address relationship list and obtain the network card serial number of the current server node corresponding to the current server node number;
[0165] S322: Determine whether the parameters of the temporary server node are consistent with the current server node number;
[0166] If the temporary server node parameters are the same as the current server node number, then execute S323: increment the counter by 1 to get the current counter value;
[0167] If the temporary server node parameter is inconsistent with the current server node number, then execute S323': assign the temporary server node parameter to the current server node number SN, and assign the counter to 1 as the current value of the counter;
[0168] S324: Determine whether the current value of the counter is consistent with the current network card serial number of the server node.
[0169] If the current value of the counter is inconsistent with the current network card serial number of the server node, then execute S325': prompt that the check failed and end the check.
[0170] If the current counter value matches the current server node's network card serial number, then execute S325: determine whether the current port number is the last port number in the port-MAC address relationship log;
[0171] If the current port number is the last port number in the port-MAC address relationship log, then execute S326': End this check. At this point, it indicates that all ports of the switch under test have passed the wiring sequence test and the connection is normal.
[0172] If the current port number is not the last port number in the port-MAC address relationship log, then execute S326: take the next port number as the current port number, and perform port U-bit detection and network card connection detection on the port corresponding to the current port number.
[0173] In one embodiment, the method for detecting the wiring sequence of a cabinet network cable further includes:
[0174] S01: Generate a list of server node-MAC address mappings;
[0175] S02: Generate a dictionary of port-U bit correspondences;
[0176] S03: Generate a list of server node-U-position correspondences;
[0177] S04: A testing server that connects the switch under test to the rack network cable via a serial port to perform a wiring sequence testing method.
[0178] Example 3
[0179] A device for detecting the wiring sequence of network cables in a server rack, such as Figure 2 As shown, it includes: a log acquisition module, a parameter initialization module, and a detection and execution module;
[0180] The log acquisition module is used to: sequentially acquire the port number of one or more ports to be tested of the switch under test, and the MAC address corresponding to one or more ports to be tested, and generate a port-MAC address relationship log;
[0181] The parameter initialization module is used to: initialize the detection parameters used to detect the network card connection between the port to be detected and the server node;
[0182] The detection execution module is used to: sequentially select the port numbers corresponding to the ports to be detected in the port-MAC address relationship log as the current port number, and perform port U-position detection and network card connection detection on the port corresponding to the current port number.
[0183] Example 4
[0184] A cabling cable sequence detection system includes at least: a cabinet, a switch, one or more servers, and a detection server.
[0185] A switch includes at least: ports and serial ports, wherein the ports are arranged in the order defined by the switch.
[0186] The switch is installed inside the server rack, and the network cards of one or more servers are connected to the port of the switch via network cables.
[0187] Detect the serial port connection between the server and the switch;
[0188] The testing server is used to perform the above-mentioned method for testing the wiring sequence of network cables in a server rack.
[0189] Example 5
[0190] A computer device, such as Figure 3 As shown, it includes a memory, a processor, and a computer program stored in the memory and executable on the processor. Its characteristic is that when the processor executes the computer program, it implements the aforementioned method for detecting the wiring sequence of a cabinet network cable, specifically including:
[0191] S10: Sequentially obtain the port numbers of one or more ports to be tested on the switch under test, and the MAC addresses corresponding to one or more ports to be tested, and generate a port-MAC address relationship log, including:
[0192] S11: Based on the configuration of the cabinet where the switch under test is located, obtain the manufacturer and model of the switch under test from the bill of materials;
[0193] S12: Obtain the MAC address capture program corresponding to the switch under test based on the manufacturer and model of the switch under test;
[0194] S13: Execute a MAC address capture program on the switch under test via serial port to capture the port number of one or more ports under test, the MAC address corresponding to one or more ports under test, and the U-bit of one or more target ports.
[0195] S14: Record the port number of one or more ports to be tested, and the MAC address corresponding to one or more ports to be tested, and generate a port-MAC address relationship log. The port numbers are arranged in order according to the port definition of the switch to be tested in the port-MAC address relationship log.
[0196] S20: Initialize the detection parameters used to detect the network interface card connection between the port to be detected and the server node, including:
[0197] S21: Set the temporary server node parameters to empty;
[0198] S22: Set the counter to 1.
[0199] S30: In the port-MAC address relationship log, the port numbers corresponding to the ports to be tested are sequentially listed as the current port number. Then, port U-position detection and network card connection detection of the server node are performed on the port corresponding to the current port number, including:
[0200] S311: Search in the port-U-bit correspondence dictionary and obtain the current actual U-bit of the port corresponding to the current port number;
[0201] S312: Search the port-MAC address relationship log and obtain the MAC address corresponding to the current port number, and use the MAC address as the current MAC address;
[0202] S313: Search the server node-MAC address mapping list and obtain the current server node number corresponding to the current MAC address;
[0203] S314: Search the server node-U-bit correspondence list and obtain the current desired U-bit corresponding to the current server node number;
[0204] S315: Determine whether the current actual U position is consistent with the current expected U position;
[0205] If the current actual U position is consistent with the current expected U position, then execute S32: perform network card connection detection on the server node for the port corresponding to the current port number.
[0206] If the current actual U position is inconsistent with the current expected U position, then execute S316: prompt that the check failed and end the current check.
[0207] S32: Perform network interface card (NIC) connection detection on the port corresponding to the current port number, including:
[0208] S321: Search the server node-MAC address relationship list and obtain the network card serial number of the current server node corresponding to the current server node number;
[0209] S322: Determine whether the parameters of the temporary server node are consistent with the current server node number;
[0210] If the temporary server node parameters are the same as the current server node number, then execute S323: increment the counter by 1 to get the current counter value;
[0211] If the temporary server node parameter is inconsistent with the current server node number, then execute S323': assign the temporary server node parameter to the current server node number SN, and assign the counter to 1 as the current value of the counter;
[0212] S324: Determine whether the current value of the counter is consistent with the current network card serial number of the server node.
[0213] If the current value of the counter is inconsistent with the current network card serial number of the server node, then execute S325': prompt that the check failed and end the check.
[0214] If the current counter value matches the current server node's network card serial number, then execute S325: determine whether the current port number is the last port number in the port-MAC address relationship log;
[0215] If the current port number is the last port number in the port-MAC address relationship log, then execute S326': End this check. At this point, it indicates that all ports of the switch under test have passed the wiring sequence test and the connection is normal.
[0216] If the current port number is not the last port number in the port-MAC address relationship log, then execute S326: take the next port number as the current port number, and perform port U-bit detection and network card connection detection on the port corresponding to the current port number.
[0217] In one embodiment, the method for detecting the wiring sequence of a cabinet network cable further includes:
[0218] S01: Generate a list of server node-MAC address mappings;
[0219] S02: Generate a dictionary of port-U bit correspondences;
[0220] S03: Generate a list of server node-U-position correspondences;
[0221] S04: A testing server that connects the switch under test to the rack network cable via a serial port to perform a wiring sequence testing method.
[0222] Example 6
[0223] A computer-readable storage medium storing a computer program thereon, characterized in that, when executed by a processor, the computer program implements the aforementioned method for detecting the wiring sequence of a cabinet network cable, specifically including:
[0224] S10: Sequentially obtain the port numbers of one or more ports to be tested on the switch under test, and the MAC addresses corresponding to one or more ports to be tested, and generate a port-MAC address relationship log, including:
[0225] S11: Based on the configuration of the cabinet where the switch under test is located, obtain the manufacturer and model of the switch under test from the bill of materials;
[0226] S12: Obtain the MAC address capture program corresponding to the switch under test based on the manufacturer and model of the switch under test;
[0227] S13: Execute a MAC address capture program on the switch under test via serial port to capture the port number of one or more ports under test, the MAC address corresponding to one or more ports under test, and the U-bit of one or more target ports.
[0228] S14: Record the port number of one or more ports to be tested, and the MAC address corresponding to one or more ports to be tested, and generate a port-MAC address relationship log. The port numbers are arranged in order according to the port definition of the switch to be tested in the port-MAC address relationship log.
[0229] S20: Initialize the detection parameters used to detect the network interface card connection between the port to be detected and the server node, including:
[0230] S21: Set the temporary server node parameters to empty;
[0231] S22: Set the counter to 1.
[0232] S30: In the port-MAC address relationship log, the port numbers corresponding to the ports to be tested are sequentially listed as the current port number. Then, port U-position detection and network card connection detection of the server node are performed on the port corresponding to the current port number, including:
[0233] S311: Search in the port-U-bit correspondence dictionary and obtain the current actual U-bit of the port corresponding to the current port number;
[0234] S312: Search the port-MAC address relationship log and obtain the MAC address corresponding to the current port number, and use the MAC address as the current MAC address;
[0235] S313: Search the server node-MAC address mapping list and obtain the current server node number corresponding to the current MAC address;
[0236] S314: Search the server node-U-bit correspondence list and obtain the current desired U-bit corresponding to the current server node number;
[0237] S315: Determine whether the current actual U position is consistent with the current expected U position;
[0238] If the current actual U position is consistent with the current expected U position, then execute S32: perform network card connection detection on the server node for the port corresponding to the current port number.
[0239] If the current actual U position is inconsistent with the current expected U position, then execute S316: prompt that the check failed and end the current check.
[0240] S32: Perform network interface card (NIC) connection detection on the port corresponding to the current port number, including:
[0241] S321: Search the server node-MAC address relationship list and obtain the network card serial number of the current server node corresponding to the current server node number;
[0242] S322: Determine whether the parameters of the temporary server node are consistent with the current server node number;
[0243] If the temporary server node parameters are the same as the current server node number, then execute S323: increment the counter by 1 to get the current counter value;
[0244] If the temporary server node parameter is inconsistent with the current server node number, then execute S323': assign the temporary server node parameter to the current server node number SN, and assign the counter to 1 as the current value of the counter;
[0245] S324: Determine whether the current value of the counter is consistent with the current network card serial number of the server node.
[0246] If the current value of the counter is inconsistent with the current network card serial number of the server node, then execute S325': prompt that the check failed and end the check.
[0247] If the current counter value matches the current server node's network card serial number, then execute S325: determine whether the current port number is the last port number in the port-MAC address relationship log;
[0248] If the current port number is the last port number in the port-MAC address relationship log, then execute S326': End this check. At this point, it indicates that all ports of the switch under test have passed the wiring sequence test and the connection is normal.
[0249] If the current port number is not the last port number in the port-MAC address relationship log, then execute S326: take the next port number as the current port number, and perform port U-bit detection and network card connection detection on the port corresponding to the current port number.
[0250] In one embodiment, the method for detecting the wiring sequence of a cabinet network cable further includes:
[0251] S01: Generate a list of server node-MAC address mappings;
[0252] S02: Generate a dictionary of port-U bit correspondences;
[0253] S03: Generate a list of server node-U-position correspondences;
[0254] S04: A testing server that connects the switch under test to the rack network cable via a serial port to perform a wiring sequence testing method.
[0255] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program loaded on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from memory, or installed from ROM. When the computer program is executed by an external processor, it performs the functions defined in the methods of embodiments of this application.
[0256] It should be noted that the computer-readable medium in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the embodiments of this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the embodiments of this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (Radio Frequency), etc., or any suitable combination thereof.
[0257] The aforementioned computer-readable medium may be included in the aforementioned server; or it may exist independently and not assembled into the server. The aforementioned computer-readable medium carries one or more programs that, when executed by the server, cause the server to: in response to detecting that the peripheral mode of the terminal is not activated, acquire the frame rate of the application on the terminal; when the frame rate meets the screen-off condition, determine whether the user is acquiring the terminal's screen information; and in response to the determination that the user is not acquiring the terminal's screen information, control the screen to enter an immediate dimming mode.
[0258] Computer program code for performing the operations of the embodiments of this application can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0259] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0260] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
[0261] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for detecting the wire sequence of a cabinet network cable, characterized in that, The method comprises: sequentially acquiring port numbers of one or more to-be-detected ports of a to-be-detected switch and MAC addresses corresponding to the one or more to-be-detected ports, and generating a port-MAC address relationship log; wherein the to-be-detected ports are connected to network cards of servers through network cables, and the port-MAC address relationship log at least records: sequentially arranged port numbers corresponding to the to-be-detected ports, MAC addresses corresponding to the to-be-detected ports, and U positions where the to-be-detected ports are located; initializing detection parameters for detecting network card connection of the to-be-detected ports and server nodes, wherein the detection parameters comprise: a temporary server node parameter for storing a server node number corresponding to a to-be-detected port, and a counter for performing network card connection detection of the to-be-detected ports and server nodes; in the port-MAC address relationship log, sequentially taking the port numbers corresponding to the to-be-detected ports as current port numbers, and performing port U position detection and network card connection detection of the server nodes on the ports corresponding to the current port numbers; wherein the port U position detection on the ports corresponding to the current port numbers comprises: finding and acquiring a current actual U position of the ports corresponding to the current port numbers in a port-U position correspondence dictionary, wherein the port-U position correspondence dictionary at least records: port numbers of the to-be-detected ports and actual U positions of the to-be-detected ports; finding and acquiring a MAC address corresponding to the current port numbers in the port-MAC address relationship log, and taking the MAC address as a current MAC address; finding and acquiring a current server node number corresponding to the current MAC address in a server node-MAC address correspondence list, wherein the server node-MAC address correspondence list at least records: server node numbers, server node network card serial numbers corresponding to the server node numbers, and MAC addresses corresponding to the server node network card serial numbers; finding and acquiring a current expected U position corresponding to the current server node number in a server node-U position correspondence list, wherein the server node-U position correspondence list at least records: server node numbers and expected U positions corresponding to the server node numbers; determining whether the current actual U position is consistent with the current expected U position; if the current actual U position is consistent with the current expected U position, performing network card connection detection of the server nodes on the ports corresponding to the current port numbers; the network card connection detection of the server nodes on the ports corresponding to the current port numbers comprises: finding and acquiring a current server node network card serial number corresponding to the current server node number in the server node-MAC address relationship list; determining whether the temporary server node parameter is consistent with the current server node number; if the temporary server node parameter is consistent with the current server node number, taking the counter plus 1 as a current value of the counter; If the temporary server node parameter is inconsistent with the current server node number, the temporary server node parameter is assigned as the current server node number SN, and the counter is assigned as 1 as the current value of the counter; It is judged whether the current value of the counter is consistent with the current server node network card serial number; If the current value of the counter is consistent with the current server node network card serial number, it is judged whether the current port number is the last port number in the port-MAC address relationship log; If the current port number is not the last port number in the port-MAC address relationship log, the next port number is taken as the current port number, and the port U bit detection and the network card connection detection of the server node are performed on the port corresponding to the current port number.
2. The method of claim 1, wherein, The port number of one or more target ports of the to-be-detected switch and the MAC address corresponding to the one or more target ports are sequentially obtained, and a port-MAC address relationship log is generated, including: According to the configuration of the cabinet where the to-be-detected switch is located, the manufacturer and the model of the to-be-detected switch are obtained from a material list, wherein the configuration at least includes: hardware information of the to-be-detected switch, hardware information of one or more servers connected to the to-be-detected switch through a network cable, and the material list at least records: the manufacturer of the to-be-detected switch, the model of the to-be-detected switch; According to the manufacturer and the model of the to-be-detected switch, a MAC address grabbing program corresponding to the to-be-detected switch is obtained; The MAC address grabbing program is executed on the to-be-detected switch through a serial port, and the port number of one or more to-be-detected ports of the to-be-detected switch and the MAC address corresponding to the one or more to-be-detected ports are grabbed, and the one or more target ports are in a U bit; The port number of the one or more to-be-detected ports and the MAC address corresponding to the one or more to-be-detected ports are recorded to generate a port-MAC address relationship log, and the port numbers are sequentially arranged in the port-MAC address relationship log according to the port definition of the to-be-detected switch.
3. The method of claim 1, wherein, The initialization of the detection parameter for detecting the connection between the to-be-detected port and the network card of the server node includes: The temporary server node parameter is set as empty; The counter is assigned as 1.
4. The method of claim 1, wherein, The method further includes: Generating a server node-MAC address correspondence list; Generating a port-U bit correspondence dictionary; Generating a server node-U bit correspondence list; Connecting the to-be-detected switch and the detection server performing the line sequence detection method of the cabinet network cable through a serial port.
5. A device for detecting the wire order of a cabinet network cable, characterized by The device includes a log acquisition module, a parameter initialization module, and a detection execution module; The log obtaining module is configured to: sequentially obtain port numbers of one or more to-be-detected ports of a to-be-detected switch and MAC addresses corresponding to the one or more to-be-detected ports, and generate a port-MAC address relationship log; wherein the to-be-detected ports are connected to network cards of servers through network cables, and the port-MAC address relationship log at least records: sequentially arranged port numbers corresponding to the to-be-detected ports, MAC addresses corresponding to the to-be-detected ports, and U positions in which the to-be-detected ports are located; The parameter initialization module is configured to: initialize a detection parameter used for detecting connection of the to-be-detected ports and network cards of server nodes, wherein the detection parameter comprises: a temporary server node parameter and a counter, the temporary server node parameter is used for storing a server node number corresponding to a to-be-detected port, and the counter is used for detecting connection of the to-be-detected port and a network card of a server node; The detection execution module is configured to: in the port-MAC address relationship log, sequentially take the sequentially arranged port numbers corresponding to the to-be-detected ports as current port numbers, and perform port U position detection and server node network card connection detection on the ports corresponding to the current port numbers; The port U position detection on the ports corresponding to the current port numbers comprises: finding and obtaining a current actual U position of the ports corresponding to the current port numbers in a port-U position correspondence dictionary, wherein the port-U position correspondence dictionary at least records: port numbers of the to-be-detected ports and actual U positions of the to-be-detected ports; finding and obtaining a MAC address corresponding to the current port numbers in the port-MAC address relationship log, and taking the MAC address as a current MAC address; finding and obtaining a current server node number corresponding to the current MAC address in a server node-MAC address correspondence list, wherein the server node-MAC address correspondence list at least records: server node numbers, server node network card serial numbers corresponding to the server node numbers, and MAC addresses corresponding to the server node network card serial numbers; finding and obtaining a current expected U position corresponding to the current server node number in a server node-U position correspondence list, wherein the server node-U position correspondence list at least records: server node numbers and expected U positions corresponding to the server node numbers; determining whether the current actual U position is consistent with the current expected U position; if the current actual U position is consistent with the current expected U position, performing server node network card connection detection on the ports corresponding to the current port numbers; The server node network card connection detection on the ports corresponding to the current port numbers comprises: finding and obtaining a current server node network card serial number corresponding to the current server node number in the server node-MAC address relationship list; determining whether the temporary server node parameter is consistent with the current server node number; If the temporary server node parameter is consistent with the current server node number, then add 1 to the counter as the current value of the counter; If the temporary server node parameter is not consistent with the current server node number, then assign the temporary server node parameter as the current server node number SN, and assign the counter as 1 as the current value of the counter; Determine whether the current value of the counter is consistent with the current server node network card serial number; If the current value of the counter is consistent with the current server node network card serial number, then determine whether the current port number is the last port number in the port-MAC address relationship log; If the current port number is not the last port number in the port-MAC address relationship log, then assign the next port number as the current port number, and perform port U bit detection and server node network card connection detection on the port corresponding to the current port number.
6. A system for detecting the wire order of a cabinet patch cord, the system comprising: The system at least comprises: a cabinet, a switch, one or more servers, and a detection server; The switch at least comprises: ports and a serial port, wherein the ports are arranged in a defined order of the switch; The switch is arranged in the cabinet, and the network cards of the one or more servers are connected to the ports of the switch through network cables; The detection server is connected to the serial port of the switch; The detection server is used to execute the line sequence detection method of the cabinet network cable according to any one of claims 1 to 4.
7. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 4.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Server management method and system
CN109412836A
Network cable connection checking method and device
CN109951325A