Switch debugging method and device, server, and computer-readable storage medium
By acquiring switch fault information and generating debugging instructions through the built-in management chip of the server, it solves the problem of remote debugging when the switch fails, achieving fast and economical remote debugging, and is suitable for large data centers or supercomputer clusters.
Patent Information
- Application Number
- CN202111007615.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-30
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2041-08-30
AI Technical Summary
In blade servers, remote debugging equipment cannot be used for remote debugging when a switch fails. As a result, operation and maintenance personnel need to manually go to the computer room to connect debugging tools on site, which is time-consuming and labor-intensive, especially in large-scale data centers.
The fault information of the switch is obtained through the built-in management chip of the server and sent to the test terminal to generate debugging instructions to remotely debug the switch. The management chip is used as an intermediate bridge to establish a serial communication connection to achieve remote debugging.
It greatly saves time and cost, enables rapid remote debugging of faulty switches, reduces the need for manual intervention, and improves the efficiency of remote testing of switches in large data centers or supercomputer clusters.
Smart Images

Figure CN113821390B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of server testing, and in particular to a switch debugging method and device, a server, and a computer-readable storage medium. Background Art
[0002] A blade server is a server that can be equipped with multiple card-type server units in a standard height rack chassis. It is a low-cost server platform that can achieve HAHD (High Availability High Density). The chassis of a blade server generally includes multiple blade server units and switches. Multiple blade server units can communicate with a large switch outside the chassis through the switch. Therefore, the switch in the blade server chassis constitutes the core of the network communication between the entire blade server and external devices. Once the switch fails, it will cause communication failure of the entire blade server.
[0003] Traditionally, when a remote debugging device remotely debugs a switch, it does so by using the service network between the switch and the remote debugging device. However, if a network failure occurs on the switch in the blade server, the service network between the switch and the remote debugging device will also fail, so the remote debugging device cannot use the service network for remote debugging.
[0004] At this time, the operation and maintenance personnel must go to the computer room to find the faulty switch, then connect the debugging tool to the physical serial port of the faulty switch, collect the logs of the faulty switch, and debug the faulty switch. For a large-scale data center, there are a large number of blade servers, and the blade servers include multiple switches. Therefore, when a switch in the data center fails, it takes a lot of time and effort to manually determine the faulty switch and then connect the debugging tool to the physical serial port of the faulty switch. Summary of the invention
[0005] The embodiments of the present application provide a switch debugging method and device, a server, and a computer-readable storage medium, which enable more convenient and quick debugging of a faulty switch, thereby greatly saving time and reducing costs.
[0006] A switch debugging method is applied to a server, wherein the server has a built-in switch and a management chip, and the method comprises:
[0007] Acquire the fault information of the switch from the switch through the management chip, and send the fault information of the switch to the test terminal;
[0008] Controlling the test terminal to generate a debugging instruction based on the fault information of the switch, and sending the debugging instruction to the management chip; the debugging instruction is used to debug the switch;
[0009] The debugging instruction is sent to the switch through the management chip, and the switch is controlled to perform debugging based on the debugging instruction.
[0010] In the traditional method, when the switch built into the server fails to communicate with the external test terminal due to a network failure, the test terminal cannot directly obtain the fault information from the switch, and then debug the switch. Therefore, the debugging tool is manually connected to the physical serial port of the faulty switch to realize switch debugging. Obviously, this process requires a lot of time and effort. The switch debugging method provided by the present application can obtain the fault information of the switch from the switch through the management chip built into the server when the switch built into the server fails to communicate with the external test terminal, and then the management chip sends the fault information to the test terminal. Thus, the test terminal can generate a debugging instruction based on the acquired fault information and send the debugging instruction to the management chip. The debugging instruction is sent to the switch through the management chip, and the switch is controlled to debug based on the debugging instruction. With the help of the management chip in the server as an intermediate bridge, the network connection between the test terminal and the switch built into the server is realized. Thus, it is more convenient and quick to remotely debug the faulty switch, thereby greatly saving time and reducing costs.
[0011] In one embodiment, the method further comprises:
[0012] Establishing a serial communication connection between the management chip and the switch in advance;
[0013] The acquiring the fault information of the switch from the switch through the management chip and sending the fault information of the switch to the test terminal includes:
[0014] The management chip obtains the fault information of the switch from the switch based on the serial port communication connection, and sends the fault information of the switch to the test terminal.
[0015] In the embodiment of the present application, in the case of a failure in the network communication connection between the remote test terminal and the built-in switch of the server, the network connection between the remote test terminal and the built-in switch of the server is realized by means of the management chip in the server as an intermediate bridge. Specifically, the serial port communication connection pre-established between the management chip and the switch is realized. Thus, the switch in the server with a network failure is remotely tested. There is no need to manually connect the debugging tool to the physical serial port of the failed switch to realize switch debugging. Therefore, it is realized that the failed switch can be debugged more conveniently and quickly, thereby greatly saving time and reducing costs.
[0016] In one embodiment, obtaining the fault information of the switch from the switch through the management chip based on the serial port communication connection, and sending the fault information of the switch to the test terminal includes:
[0017] Running a preset serial port driver on the management chip, and obtaining serial port data from the switch based on the serial port communication connection through the preset serial port driver; the serial port data is used to represent the fault information of the switch;
[0018] The management chip performs format conversion on the serial port data based on the IPMI protocol to generate network port data corresponding to the serial port data;
[0019] The network port data is sent to the test terminal through the management chip.
[0020] In an embodiment of the present application, a serial port communication connection is pre-established between the management chip and the switch, and the management chip obtains serial port data corresponding to the fault information from the switch based on the serial port communication connection through the preset serial port driver. The network port data corresponding to the fault information can be converted into network port data based on the IPMI protocol through the management chip. Then, the network port data corresponding to the fault information can be sent to the test terminal through the management chip. In this way, in the event of a failure in the network communication connection between the remote test terminal and the server's built-in switch, the network connection between the remote test terminal and the server's built-in switch is achieved with the help of the management chip in the server as an intermediate bridge.
[0021] In one embodiment, sending the network port data to the test terminal through the management chip includes:
[0022] Sending the network port data to the first external switch through the management chip;
[0023] The network port data is sent to the test terminal through the first external switch.
[0024] In the embodiment of the present application, when the test terminal performs remote testing on a large data center or supercomputer cluster composed of a large number of servers, the management chip built into each server first sends the network port data corresponding to the acquired fault information to the external switch, and then the external switch forwards it to the test terminal. In this way, the built-in switches in multiple servers can be remotely tested at the same time through the external switch. Therefore, the efficiency of remote testing of the built-in switches in the large data center or supercomputer cluster is greatly improved.
[0025] In one embodiment, the step of controlling the test terminal to generate a debugging instruction based on the fault information of the switch and sending the debugging instruction to the management chip includes:
[0026] Controlling the test terminal to analyze the fault information of the switch to generate an analysis result, and generating a debugging instruction according to the analysis result;
[0027] The test terminal is controlled to run an IPMITOOL tool, and the debugging instruction is sent to the management chip through the IPMITOOL tool.
[0028] In an embodiment of the present application, the test terminal receives a data packet corresponding to the network port data sent by the management chip, and the data packet corresponding to the network port data includes the fault information of the switch. Therefore, the server controls the test terminal to parse the data packet corresponding to the network port data and generate a parsing result. Based on the parsing result, the specific fault type can be determined, and then the corresponding debugging instruction can be matched from the data table based on the specific fault type. After the test terminal generates the debugging instruction, the test terminal can be triggered to run the IPMITOOL tool based on the debugging instruction. The test terminal can send the debugging instruction to the management chip through the IPMITOOL tool. Thereby, the debugging instruction is sent to the management chip so that the management chip sends the debugging instruction to the switch through the serial port communication connection. Finally, when the switch built into the server has a network failure and cannot communicate with the external test terminal, the network communication between the test terminal and the switch is not realized, and the test terminal remotely tests the switch.
[0029] In one embodiment, sending the debugging instruction to the management chip through the IPMITOOL tool includes:
[0030] Sending the debugging instruction to the second external switch through the IPMITOOL tool;
[0031] The debugging instruction is sent to the management chip through the second external switch.
[0032] In the embodiment of the present application, for a large data center or supercomputer cluster composed of a large number of servers, a large switch is required to transmit data. Therefore, through the IPMITOOL tool running on the test terminal, the test instruction can be sent to the second external switch, and then the second external switch sends the debug instruction to the management chip, so that the management chip sends the debug instruction to the switch through the serial port communication connection. In this way, the built-in switches in multiple servers can be remotely tested at the same time through the external switch. Therefore, the efficiency of remote testing of the built-in switches in the large data center or supercomputer cluster is greatly improved.
[0033] In one embodiment, sending the debugging instruction to the switch through the management chip, and controlling the switch to perform debugging based on the debugging instruction, includes:
[0034] The management chip performs format conversion on the debugging instruction based on the IPMI protocol to generate serial port data corresponding to the debugging instruction;
[0035] Running a preset serial port driver on the management chip, and sending serial port data corresponding to the debugging instruction to the switch through the preset serial port driver based on the serial port communication connection;
[0036] The switch is controlled to perform debugging based on the serial port data corresponding to the debugging instruction.
[0037] In the embodiment of the present application, the process of the management chip sending the debugging instruction to the switch is similar to the process of the management chip obtaining fault information from the switch and sending the fault information to the test terminal. The management chip first converts the network port data corresponding to the debugging instruction into serial port data through the IPMI service module. Then, the management chip can send the serial port data corresponding to the debugging instruction to the switch based on the serial port communication connection through the preset serial port driver, so that the serial port data corresponding to the debugging instruction can be sent to the switch. In this way, in the event that the network communication connection between the remote test terminal and the built-in switch of the server fails, the management chip in the server is used as an intermediate bridge to send the debugging instruction to the switch, and finally the remote test terminal sends the test instruction to the switch, realizing remote debugging of the switch in the server.
[0038] A switch debugging device is applied to a server, wherein the server has a built-in switch and a management chip, and the device comprises:
[0039] A fault information acquisition module, used to acquire the fault information of the switch from the switch through the management chip, and send the fault information of the switch to the test terminal;
[0040] A debugging instruction generating module, used for controlling the test terminal to generate a debugging instruction based on the fault information of the switch, and sending the debugging instruction to the management chip; the debugging instruction is used to debug the switch;
[0041] The debugging module is used to send the debugging instruction to the switch through the management chip, and control the switch to perform debugging based on the debugging instruction.
[0042] A server includes a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the Bluetooth communication method described above.
[0043] A computer-readable storage medium stores a computer program, which implements the steps of the Bluetooth communication method described above when executed by a processor.
[0044] The switch debugging method and device, server, and computer-readable storage medium are provided. The server has a built-in switch and a management chip. The switch debugging method includes: obtaining the switch fault information from the switch through the management chip, and sending the switch fault information to the test terminal. The test terminal is controlled to generate a debugging instruction based on the switch fault information, and the debugging instruction is sent to the management chip. The debugging instruction is sent to the switch through the management chip, and the switch is controlled to debug based on the debugging instruction.
[0045] In the traditional method, when the built-in switch of the server fails to communicate with the external test terminal due to a network failure, the test terminal cannot directly obtain the fault information from the switch, and then debug the switch. Therefore, the debugging tool is manually connected to the physical serial port of the faulty switch to realize switch debugging. Obviously, this process requires a lot of time and effort. The switch debugging method provided by the present application can obtain the fault information of the switch from the switch through the built-in management chip of the server when the built-in switch of the server fails to communicate with the external test terminal, and then the management chip sends the fault information to the test terminal. Thus, the test terminal can generate a debugging instruction based on the acquired fault information and send the debugging instruction to the management chip. The debugging instruction is sent to the switch through the management chip, and the switch is controlled to debug based on the debugging instruction. With the help of the management chip in the server as an intermediate bridge, the network connection between the test terminal and the built-in switch of the server is realized. Thus, it is more convenient and quick to remotely debug the faulty switch, thereby greatly saving time and reducing costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 An application environment diagram of a switch debugging method in an embodiment;
[0048] Figure 2 A flow chart of a switch debugging method in one embodiment;
[0049] Figure 3 A flow chart of a switch debugging method in another embodiment;
[0050] Figure 4 for Figure 3 A flowchart of a method for obtaining switch fault information from a switch through a management chip based on a serial communication connection, and sending the switch fault information to a test terminal;
[0051] Figure 5 is a schematic diagram of the structure of a management chip in one embodiment;
[0052] Figure 6 A diagram showing an application environment of a switch debugging method in another embodiment;
[0053] Figure 7 for Figure 2 A flowchart of a method for sending a debugging instruction to a switch through a management chip to control the switch to perform debugging based on the debugging instruction;
[0054] Figure 8 A flowchart of a switch debugging method in a specific embodiment;
[0055] Fig. 9 A structural block diagram of a switch debugging device in one embodiment;
[0056] Fig.10 for Fig. 9 The structural block diagram of the fault information acquisition module;
[0057] Fig.11 FIG. 1 is a schematic diagram of the internal structure of a server in an embodiment. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0059] The servers involved in this application can be classified into tower servers, rack servers, blade servers, high-density servers, etc. according to their appearance. The following description will be made by taking a blade server as an example.
[0060] A blade server is a server that can be equipped with multiple card-type server units in a standard height rack chassis. It is a low-cost server platform that can achieve HAHD (High Availability High Density). The chassis of a blade server generally includes multiple blade server units and switches. Multiple blade server units can communicate with a large switch outside the chassis through the switch. Therefore, the switch in the blade server chassis constitutes the core of the network communication between the entire blade server and external devices. Once the switch fails, it will cause communication failure of the entire blade server.
[0061] Traditionally, when a remote debugging device remotely debugs a switch, it does so by using the service network between the switch and the remote debugging device. However, if a network failure occurs on the switch in the blade server, the service network between the switch and the remote debugging device will also fail, so the remote debugging device cannot use the service network for remote debugging.
[0062] At this time, the operation and maintenance personnel must go to the computer room to find the faulty switch, then connect the debugging tool to the physical serial port of the faulty switch, collect the logs of the faulty switch, and debug the faulty switch. For a large-scale data center, there are a large number of blade servers, and the blade servers include multiple switches. Therefore, when a switch in the data center fails, it takes a lot of time and effort to manually determine the faulty switch and then connect the debugging tool to the physical serial port of the faulty switch.
[0063] In order to solve the above problems, a switch debugging method is proposed in an embodiment of the present application, which can debug a faulty switch more conveniently and quickly, thereby greatly saving time and reducing costs.
[0064] Figure 1 FIG. 1 is an application scenario diagram of a switch debugging method in an embodiment. Figure 1As shown, the application environment includes a test terminal 120 and a server 140. The server 140 has a built-in management chip 142 and a switch 144. The management chip 142 in the server 140 is connected to the test terminal 120 through a network. The fault information of the switch is obtained from the switch 144 through the management chip 142, and the fault information of the switch is sent to the test terminal 120. The control test terminal 120 generates a debugging instruction based on the fault information of the switch, and sends the debugging instruction to the management chip; the debugging instruction is used to debug the switch. The debugging instruction is sent to the switch through the management chip, and the switch is controlled to debug based on the debugging instruction. Among them, the server here can be a server including a built-in switch, such as a blade server. Of course, this application does not limit the specific server.
[0065] Figure 2 FIG. 1 is a flow chart of a switch debugging method in an embodiment. The switch debugging method in this embodiment is to run on Figure 1 The method is described by taking the server 140 in the example, wherein the server has a built-in switch and a management chip. The method includes the following steps 220 to 260, wherein:
[0066] Step 220: Obtain the fault information of the switch from the switch through the management chip, and send the fault information of the switch to the test terminal.
[0067] When the switch built into the server does not have a network failure, a network communication connection can be established between the switch and the external device, and the network communication connection can also be called a business network. Therefore, the server can exchange information with external devices (such as remote test equipment) based on the network communication connection (business network) through the built-in switch. The switch built into the server can also be called a chassis switch.
[0068] If a network failure occurs in the switch in the server, the service network between the switch and the external device will also be paralyzed. Therefore, the remote debugging device cannot exchange information with the server's built-in switch through the service network, thereby realizing remote debugging of the server's built-in switch.
[0069] Therefore, a switch debugging method is proposed, and the server can obtain the fault information of the switch from the switch through its built-in management chip. Since the management chip and the switch are both built-in devices of the server, the management chip can directly obtain the fault information of the switch from the switch. Then, the management chip can establish a network communication connection with the external device, so that the management chip can send the acquired fault information of the switch to the test terminal. Here, the fault information of the switch can be transmitted in the form of a data packet, and the fault information of the switch includes the address information (IP) of the switch, the network fault information of the switch and other fault information, which is not limited in this application.
[0070] Among them, the management chip can be an embedded controller of a server, such as an embedded ARM controller. Of course, this application does not limit the specific type of the management chip. An embedded controller is a control system used to perform specified independent control functions and has the ability to process data. An embedded controller is an electronic device or device controlled by an embedded microelectronic technology chip (including a series of microelectronic devices such as a microprocessor chip, a timer, a sequencer or a controller), which can complete various automated processing tasks such as monitoring and control.
[0071] Step 240: Control the test terminal to generate a debugging instruction based on the fault information of the switch, and send the debugging instruction to the management chip; the debugging instruction is used to debug the switch.
[0072] After the management chip sends the acquired fault information of the switch to the test terminal, the test terminal receives the fault information of the switch. The server controls the test terminal to generate a debugging instruction based on the fault information of the switch, and the debugging instruction is used to debug the switch. The corresponding relationship between different fault information of the switch in the server and the corresponding debugging instruction is stored on the test terminal, for example, it can be pre-stored in the test terminal or other database in the form of a data table.
[0073] In this way, the server controls the test terminal to read the debugging instruction corresponding to the fault information of the switch from the data table based on the fault information of the switch. Then, the test terminal sends the debugging instruction to the management chip of the server. Here, the debugging instruction can also be transmitted in the form of a data packet. Among them, if the fault information of the switch is the network fault information of the switch, then the debugging instruction can be an instruction for debugging the switch network. If the fault information of the switch is other fault information, then the debugging instruction can be an instruction for debugging other fault information.
[0074] Step 260: Send the debugging instruction to the switch through the management chip, and control the switch to perform debugging based on the debugging instruction.
[0075] Since the management chip and the switch are both built-in devices of the server, the management chip can directly send debugging instructions to the switch. In this way, the switch with a network failure can receive the debugging instructions sent by the test terminal and control the switch to perform corresponding debugging tasks based on the debugging instructions. The debugging tasks here specifically include power on / off testing, performance testing, status testing, etc. of the switch, which are not limited in this application.
[0076] In the embodiment of the present application, when a network failure occurs in the switch built into the server and the switch cannot communicate with the external test terminal, the fault information of the switch can be obtained from the switch through the management chip built into the server, and then the management chip sends the fault information to the test terminal. Thus, the test terminal can generate a debugging instruction based on the acquired fault information and send the debugging instruction to the management chip. The debugging instruction is sent to the switch through the management chip, and the switch is controlled to debug based on the debugging instruction.
[0077] In the case of a network communication connection failure between the remote test terminal and the server's built-in switch, the management chip in the server is used as an intermediate bridge to achieve network connection between the remote test terminal and the server's built-in switch. As a result, remote testing of the switch in the server with a network failure is achieved. There is no need to manually connect the debugging tool to the physical serial port of the failed switch to debug the switch, so the failed switch can be debugged more conveniently and quickly, which greatly saves time and reduces costs.
[0078] In one embodiment, Figure 3 As shown, a switch debugging method is provided, which also includes:
[0079] Establish a serial communication connection between the management chip and the switch in advance;
[0080] Obtain the fault information of the switch from the switch through the management chip and send the fault information of the switch to the test terminal, including:
[0081] The management chip is connected based on the serial port communication to obtain the fault information of the switch from the switch, and the fault information of the switch is sent to the test terminal.
[0082] Specifically, Figure 3 As shown, a switch debugging method is provided, including:
[0083] Step 320: Establish a serial port communication connection between the management chip and the switch in advance.
[0084] The server has a built-in management chip and switch. Generally, multiple serial ports are set between the management chip and the switch. These serial ports are used to transmit various data between the management chip and the switch. Before transmitting data, you first need to establish a serial communication connection between the management chip and the switch.
[0085] The serial port here refers to the serial interface, which is a device that can convert the parallel data characters received from the CPU into a continuous serial data stream and send it out, and at the same time can convert the received serial data stream into parallel data characters to supply the CPU. The communication connection realized through the serial port can be called a serial communication connection.
[0086] Specifically, pre-establishing a serial communication connection between the management chip and the switch may refer to pre-establishing a serial communication connection between the management chip and the switch when the server is turned on, or pre-establishing a serial communication connection between the management chip and the switch when the switch is tested. This application does not make specific limitations on this.
[0087] Step 340: Obtain the fault information of the switch from the switch through the management chip based on the serial port communication connection, and send the fault information of the switch to the test terminal.
[0088] When performing remote testing of a switch, the management chip obtains the fault information of the switch from the switch based on the serial port communication connection pre-established between the management chip and the switch. Specifically, the management chip sends a fault information request instruction to the switch through the serial port, and after receiving the fault information request instruction, the switch replies with the fault information to the management chip.
[0089] After receiving the fault information, the management chip may send the fault information to the test terminal through the network communication connection between the management chip and the test terminal.
[0090] Step 360: Control the test terminal to generate a debugging instruction based on the fault information of the switch, and send the debugging instruction to the management chip; wherein the debugging instruction is used to debug the switch.
[0091] Step 380: Send the debugging instruction to the switch through the management chip, and control the switch to perform debugging based on the debugging instruction.
[0092] After the management chip sends the acquired fault information of the switch to the test terminal, the test terminal receives the fault information of the switch. The server controls the test terminal to generate a debugging instruction based on the fault information of the switch, and the debugging instruction is used to debug the switch. The corresponding relationship between different fault information of the switch in the server and the corresponding debugging instruction is stored on the test terminal, for example, it can be pre-stored in the test terminal or other database in the form of a data table.
[0093] In this way, the server controls the test terminal to read the debugging instructions corresponding to the switch fault information from the data table based on the switch fault information. Then, the test terminal sends the debugging instructions to the management chip of the server. Since the management chip and the switch are both built-in devices of the server, the management chip can directly send the debugging instructions to the switch. In this way, the switch with a network fault can receive the debugging instructions sent by the test terminal and control the switch to perform the corresponding debugging tasks based on the debugging instructions.
[0094] In the embodiment of the present application, in the case of a failure in the network communication connection between the remote test terminal and the server's built-in switch, the network connection between the remote test terminal and the server's built-in switch is achieved by means of the management chip in the server as an intermediate bridge. Specifically, the serial port communication connection pre-established between the management chip and the switch is used. Thus, remote testing of the switch in the server with a network failure is achieved. There is no need to manually connect the debugging tool to the physical serial port of the failed switch to achieve switch debugging. Therefore, it is possible to debug the failed switch more conveniently and quickly, thereby greatly saving time and reducing costs.
[0095] In one embodiment, Figure 4 As shown, step 340, obtaining the fault information of the switch from the switch through the management chip based on the serial port communication connection, and sending the fault information of the switch to the test terminal, includes:
[0096] Step 342, running a serial port driver on the management chip, and obtaining serial port data from the switch through the serial port driver based on the serial port communication connection; the serial port data is used to represent the fault information of the switch.
[0097] Combination Figure 5 , which is a schematic diagram of the structure of a management chip in an embodiment. The management chip 142 includes a serial port driver 142a, an IPMI service module 142b and a network card 142c. The serial port driver 142a, the IPMI service module 142b and the network card 142c are connected through an interface, such as a serial port connection.
[0098] After the serial port between the management chip and the switch establishes a serial port communication connection, a serial port driver is further run on the management chip. The serial port driver is used to control the management chip to send a fault information request instruction to the switch through the serial port. After receiving the fault information request instruction, the switch replies with fault information to the management chip, so that the management chip obtains the fault information. Among them, the fault information request instruction sent by the management chip to the switch through the serial port, and the fault information replied by the switch to the management chip are all transmitted in the form of serial port data. That is, the serial port data replied by the switch to the management chip contains the fault information.
[0099] Step 344: The management chip performs format conversion on the serial port data based on the IPMI protocol to generate network port data corresponding to the serial port data.
[0100] After the management chip obtains the fault information, it needs to send the fault information to the test terminal. Since the test terminal and the management chip are connected through the network, the fault information in the form of serial port data obtained by the management chip needs to be converted into network port data before the management chip can send the network port data corresponding to the fault information to the test terminal.
[0101] Therefore, an IPMI service module can also be run on the management chip, and the IPMI service module can convert the serial port data format based on the IPMI protocol to generate network port data. In this way, the network port data corresponding to the fault information can be converted into network port data through the IPMI service module. Here, the serial port data or the network port data can be transmitted in the form of data packets. The network port data here can be data that can be transmitted through the IPMI network interface. Among them, the IPMI service module can also continuously read the serial port data from the switch and record it in the log file. When the switch fails, the operation and maintenance personnel can download the log file from the IPMI service module in the management chip as soon as possible to quickly analyze and locate the cause of the switch failure.
[0102] IPMI is the abbreviation of Intelligent Platform Management Interface, which is an industrial standard for managing peripheral devices used in enterprise systems based on Intel architecture. IPMI can be used to monitor the physical health characteristics of the server, such as temperature, voltage, fan working status, power supply status, etc.
[0103] Step 346: Send the network port data to the test terminal via the management chip.
[0104] The management chip also includes a network card, which can realize communication between the management chip and the external test terminal, specifically transmitting network port data. Therefore, through the network card on the management chip, the network port data corresponding to the fault information can be sent to the test terminal.
[0105] In the embodiment of the present application, a serial port communication connection is pre-established between the management chip and the switch, and the management chip obtains the serial port data corresponding to the fault information from the switch based on the serial port communication connection through a preset serial port driver, and sends the serial port data corresponding to the fault information to the IPMI service module. The network port data corresponding to the fault information can be converted into network port data based on the IPMI protocol through the IPMI service module. Then, through the network card on the management chip, the network port data corresponding to the fault information can be sent to the test terminal. In this way, in the event that the network communication connection between the remote test terminal and the built-in switch of the server fails, the network connection between the remote test terminal and the built-in switch of the server is realized with the help of the management chip in the server as an intermediate bridge.
[0106] In one embodiment, the network port data is sent to the test terminal through the management chip, including:
[0107] Sending the network port data to the first external switch through the management chip;
[0108] The network port data is sent to the test terminal through the first external switch.
[0109] like Figure 6 As shown in FIG. 1 , another application scenario diagram of a machine replacement debugging method is provided. Figure 6 As shown, the application environment includes a test terminal 120, a server 140 and a first external switch 160. If the server 140 is a blade server, the server 140 has a built-in management chip 142 and a switch 144, and also includes a plurality of blade server units 146. The plurality of blade server units 146 can be connected to the management chip 142 and the switch 144 respectively (not shown), which is not limited in the present application. The management chip 142 in the server 140 is connected to the first external switch 160 via a network, and the first external switch 160 is connected to the test terminal 120 via a network. Among them, the first external switch is a large switch outside the server. When the test terminal performs remote testing on a large number of servers, it is necessary to use the large switch to transmit data. For example, for a large data center or supercomputer cluster composed of a large number of servers, a large switch is required to transmit data.
[0110] The fault information of the switch is obtained from the switch through the management chip, specifically, the management chip obtains the serial port data corresponding to the fault information of the switch from the switch, and converts the serial port data corresponding to the fault information into the network port data corresponding to the fault information. After that, the server sends the network port data corresponding to the fault information to the first external switch based on the management chip through the network connection between the management chip 142 and the first external switch 160.
[0111] The first external switch then sends the network port data corresponding to the fault information to the test terminal based on the network communication connection between the first external switch and the test terminal.
[0112] In the embodiment of the present application, when the test terminal performs remote testing on a large data center or supercomputer cluster composed of a large number of servers, the management chip built into each server first sends the network port data corresponding to the acquired fault information to the external switch, and then the external switch forwards it to the test terminal. In this way, the built-in switches in multiple servers can be remotely tested at the same time through the external switch. Therefore, the efficiency of remote testing of the built-in switches in the large data center or supercomputer cluster is greatly improved.
[0113] In one embodiment, step 240, controlling the test terminal to generate a debugging instruction based on the fault information of the switch and sending the debugging instruction to the management chip includes:
[0114] The control test terminal analyzes the fault information of the switch to generate an analysis result, and generates a debugging instruction according to the analysis result;
[0115] The control test terminal runs the IPMITOOL tool, and sends the debugging instructions to the management chip through the IPMITOOL tool.
[0116] Specifically, the test terminal receives a data packet corresponding to the network port data sent by the management chip, and the data packet corresponding to the network port data includes the fault information of the switch. Therefore, the server controls the test terminal to parse the data packet corresponding to the network port data and generate a parsing result. The parsing result includes the address information (IP) of the switch, the fault type of the switch, etc. Among them, the correspondence between different fault types of the switch in the server and the corresponding debugging instructions is stored on the test terminal, for example, it can be pre-stored in the test terminal or other databases in the form of a data table. Therefore, the specific fault type can be determined based on the parsing result, and then the corresponding debugging instruction can be matched from the data table based on the specific fault type. The debugging instruction carries the address information (IP) of the switch.
[0117] After the test terminal generates the debugging instructions, the test terminal can be triggered to run the IPMITOOL tool based on the debugging instructions. Among them, the IPMITOOL tool is a command line IPMI platform management tool that can be used in the Linux system. The IPMITOOL tool supports the IPMI specification. Through the IPMITOOL tool, you can obtain sensor information, display system log content, and remotely switch on and off the network.
[0118] After the test terminal runs the IPMITOOL tool, the test terminal can send the debugging instructions to the management chip through the IPMITOOL tool. If the number of servers is small, the server's built-in management chip is directly connected to the test terminal, and the test terminal sends the debugging instructions directly to the management chip through the IPMITOOL tool. If the number of servers is large, the server's built-in management chip is directly connected to the test terminal, and the test terminal sends the debugging instructions to the external switch through the IPMITOOL tool, and then the external switch forwards it to the management chip. Specifically, based on the address information (IP) of the switch carried in the debugging information, the debugging instructions are sent to the management chip corresponding to the address information (IP) of the switch.
[0119] The IPMITOOL tool is deployed on the test terminal, which can be understood as the IPMITOOL client. The IPMI service module running on the management chip can be understood as the IPMITOOL server. The IPMITOOL client and the IPMITOOL server jointly implement remote testing of the switch in the server.
[0120] In an embodiment of the present application, the test terminal receives a data packet corresponding to the network port data sent by the management chip, and the data packet corresponding to the network port data includes the fault information of the switch. Therefore, the server controls the test terminal to parse the data packet corresponding to the network port data and generate a parsing result. Based on the parsing result, the specific fault type can be determined, and then the corresponding debugging instruction can be matched from the data table based on the specific fault type. After the test terminal generates the debugging instruction, the test terminal can be triggered to run the IPMITOOL tool based on the debugging instruction. The test terminal can send the debugging instruction to the management chip through the IPMITOOL tool. Thereby, the debugging instruction is sent to the management chip so that the management chip sends the debugging instruction to the switch through the serial port communication connection. Finally, when the switch built into the server has a network failure and cannot communicate with the external test terminal, the network communication between the test terminal and the switch is not realized, and the test terminal remotely tests the switch.
[0121] In one embodiment, sending the debugging instruction to the management chip through the IPMITOOL tool includes:
[0122] Sending the debugging command to the second external switch through the IPMITOOL tool;
[0123] The debugging instruction is sent to the management chip through the second external switch.
[0124] Combination Figure 6 As shown, for a large data center or supercomputer cluster composed of a large number of servers, a large external switch is required to transmit data. Therefore, through the IPMITOOL tool running on the test terminal, the test instruction can be sent to the second external switch, and then the second external switch sends the debug instruction to the management chip corresponding to the debug instruction, so that the management chip sends the debug instruction to the switch through the serial port communication connection. Among them, the debug instruction carries the address information (IP) of the switch. Specifically, based on the address information (IP) of the switch carried in the debug information, the debug instruction is sent to the management chip corresponding to the address information (IP) of the switch. The second external switch here can be the same as or different from the first external switch in the above embodiment, and this application does not limit this.
[0125] In the embodiment of the present application, for a large data center or supercomputer cluster composed of a large number of servers, a large switch is required to transmit data. Therefore, through the IPMITOOL tool running on the test terminal, the test instruction can be sent to the second external switch, and then the second external switch sends the debug instruction to the management chip, so that the management chip sends the debug instruction to the switch through the serial communication connection. In this way, the built-in switches in multiple servers can be remotely tested at the same time through the external switch. Therefore, the efficiency of remote testing of the built-in switches in the large data center or supercomputer cluster is greatly improved.
[0126] In one embodiment, Figure 7 As shown, step 260, sending the debugging instruction to the switch through the management chip, and controlling the switch to debug based on the debugging instruction, includes:
[0127] Step 262: The management chip performs format conversion on the debugging instruction based on the IPMI protocol to generate serial port data corresponding to the debugging instruction.
[0128] After the management chip obtains the debugging instruction, the management chip needs to send the debugging instruction to the switch. Because the management chip and the switch establish a serial communication connection, and the debugging instruction is network port data, the management chip needs to convert the format of the debugging instruction based on the IPMI protocol to generate the serial port data corresponding to the debugging instruction, so that the serial port data corresponding to the debugging instruction can be sent to the switch.
[0129] Specifically, an IPMI service module can be run on the management chip, and the IPMI service module can convert the format of the network port data based on the IPMI protocol to generate serial port data. In this way, the network port data corresponding to the debugging instruction can be converted into network port data through the IPMI service module. The network port data here can be data that can be transmitted through the IPMI network interface.
[0130] Step 264 , running a serial port driver on the management chip, and sending serial port data corresponding to the debugging instruction to the switch through the serial port driver based on the serial port communication connection.
[0131] A serial port driver is run on the management chip, and the serial port driver is used to control the management chip to send debugging instructions to the switch through the serial port, that is, the serial port data corresponding to the debugging instructions are sent to the switch through the serial port driver based on the serial port communication connection.
[0132] Step 266: Control the switch to perform debugging based on the serial port data corresponding to the debugging instruction.
[0133] After the switch receives the serial port data corresponding to the debugging instruction sent by the management chip, it can directly execute the debugging task based on the serial port data. The debugging task here specifically includes power on / off test, performance test, status test, etc. of the switch, which is not limited in this application.
[0134] In the embodiment of the present application, the process of the management chip sending the debugging instruction to the switch is similar to the process of the management chip obtaining fault information from the switch and sending the fault information to the test terminal. The management chip first converts the network port data corresponding to the debugging instruction into serial port data through the IPMI service module. Then, the management chip can send the serial port data corresponding to the debugging instruction to the switch based on the serial port communication connection through the preset serial port driver, so that the serial port data corresponding to the debugging instruction can be sent to the switch. In this way, in the event of a failure in the network communication connection between the remote test terminal and the built-in switch of the server, the debugging instruction is sent to the switch with the help of the management chip in the server as an intermediate bridge, and finally the remote test terminal sends the test instruction to the switch, realizing remote debugging of the switch in the server.
[0135] In a specific embodiment, Figure 8 As shown, a switch testing method is provided, comprising:
[0136] Step 802, pre-establishing a serial communication connection between the management chip and the switch;
[0137] Step 804, running a preset serial port driver on the management chip, obtaining serial port data from the switch based on the serial port communication connection through the preset serial port driver, and sending the serial port data to the IPMI service module; the serial port data is used to represent the fault information of the switch;
[0138] Step 806, converting the serial port data into a format based on the IPMI protocol by the management chip to generate network port data corresponding to the serial port data;
[0139] Step 808, sending the network port data to the first external switch through the management chip;
[0140] Step 810, sending the network port data to the test terminal through the first external switch;
[0141] Step 812, controlling the test terminal to parse the fault information of the switch to generate a parsing result, and generating a debugging instruction according to the parsing result;
[0142] Step 814, controlling the test terminal to run the IPMITOOL tool, and sending the debugging instruction to the second external switch through the IPMITOOL tool;
[0143] Step 816: Send the debugging instruction to the management chip through the second external switch.
[0144] Step 818, converting the format of the debugging instruction based on the IPMI protocol through the management chip to generate serial port data corresponding to the debugging instruction;
[0145] Step 820, running a preset serial port driver on the management chip, and sending serial port data corresponding to the debugging instruction to the switch through the preset serial port driver based on the serial port communication connection;
[0146] Step 822: Control the switch to perform debugging based on the serial port data corresponding to the debugging instruction.
[0147] In an embodiment of the present application, when a network failure occurs in a switch built into a server and the switch cannot communicate with an external test terminal, the fault information of the switch can be obtained from the switch through a management chip built into the server, and then the management chip sends the fault information to the test terminal. Thus, the test terminal can generate a debugging instruction based on the acquired fault information and send the debugging instruction to the management chip. The debugging instruction is sent to the switch through the management chip, and the switch is controlled to debug based on the debugging instruction. With the help of the management chip in the server as an intermediate bridge, a network connection between the test terminal and the switch built into the server is realized. Thus, a more convenient and quick remote debugging of the faulty switch is realized, thereby greatly saving time and reducing costs.
[0148] In one embodiment, Fig. 9 As shown, a switch debugging device 900 is provided, which is applied to a server, and the server has a built-in switch and a management chip. The device includes:
[0149] A fault information acquisition module 920 is used to acquire the fault information of the switch from the switch through the management chip, and send the fault information of the switch to the test terminal;
[0150] The debugging instruction generation module 940 is used to control the test terminal to generate debugging instructions based on the fault information of the switch, and send the debugging instructions to the management chip; the debugging instructions are used to debug the switch;
[0151] The debugging module 960 is used to send the debugging instruction to the switch through the management chip, and control the switch to perform debugging based on the debugging instruction.
[0152] In one embodiment, a switch debugging device 900 is provided, further comprising:
[0153] The serial communication connection module 910 is used to establish a serial communication connection between the management chip and the switch in advance;
[0154] The fault information acquisition module 920 is further used to obtain the fault information of the switch from the switch through the management chip based on the serial port communication connection, and send the fault information of the switch to the test terminal.
[0155] In one embodiment, Fig.10 As shown, the fault information acquisition module 920 further includes:
[0156] The serial port data acquisition unit 922 is used to run a preset serial port driver on the management chip, and obtain serial port data from the switch based on the serial port communication connection through the preset serial port driver; the serial port data is used to represent the fault information of the switch;
[0157] The first data format conversion unit 924 is used to convert the serial port data into a format based on the IPMI protocol through the management chip to generate network port data corresponding to the serial port data;
[0158] The network port data sending unit 926 is used to send the network port data to the test terminal through the management chip.
[0159] In one embodiment, the network port data sending unit 926 is further configured to send the network port data to the first external switch via the management chip; and send the network port data to the test terminal via the first external switch.
[0160] In one embodiment, the debugging instruction generation module 940 is further used to control the test terminal to parse the fault information of the switch to generate a parsing result, and generate a debugging instruction according to the parsing result; control the test terminal to run the IPMITOOL tool, and send the debugging instruction to the management chip through the IPMITOOL tool.
[0161] In one embodiment, the debugging instruction generating module 940 is further configured to send the debugging instruction to the second external switch through the IPMITOOL tool; and send the debugging instruction to the management chip through the second external switch.
[0162] In one embodiment, the debugging module 960 includes:
[0163] A second data format conversion unit is used to convert the format of the debugging instruction based on the IPMI protocol through the management chip to generate serial port data corresponding to the debugging instruction;
[0164] A serial port data sending unit, used to run a preset serial port driver on the management chip, and send serial port data corresponding to the debugging instruction to the switch through the preset serial port driver based on the serial port communication connection;
[0165] The debugging unit is used to control the switch to debug based on the serial port data corresponding to the debugging instruction.
[0166] It should be understood that, although the various steps in the flowcharts in the above-mentioned figures are displayed in sequence according to the indications of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the above-mentioned figures may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0167] The division of the modules in the above switch debugging device is only for illustration. In other embodiments, the switch debugging device may be divided into different modules as needed to complete all or part of the functions of the above switch debugging device.
[0168] For the specific definition of the switch debugging device, please refer to the definition of the switch debugging method above, which will not be repeated here. Each module in the above switch debugging device can be implemented in whole or in part by software, hardware and their combination. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0169] In one embodiment, a server is further provided, including a memory and a processor. A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of a switch debugging method provided in the above embodiments.
[0170] Fig.11 FIG. 1 is a schematic diagram of the internal structure of a server in an embodiment. Fig.11 As shown, the server includes a processor and a memory connected via a system bus. The processor is used to provide computing and control capabilities to support the operation of the entire server. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement a switch debugging method provided in each of the above embodiments. The internal memory provides a cache operating environment for the operating system computer program in the non-volatile storage medium. The server can be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, etc.
[0171] The implementation of each module in the switch debugging device provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on a server. The program modules constituted by the computer program may be stored in a memory of the server. When the computer program is executed by a processor, the steps of the method described in the embodiment of the present application are implemented.
[0172] The embodiment of the present application also provides a computer-readable storage medium, which is one or more non-volatile computer-readable storage media containing computer-executable instructions, and when the computer-executable instructions are executed by one or more processors, the processors execute the steps of the switch debugging method.
[0173] A computer program product comprising instructions, when the computer program product is run on a computer, enables the computer to execute a switch debugging method.
[0174] Any reference to memory, storage, database or other media used in the embodiments of the present application may include non-volatile and / or volatile memory. Suitable non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM) and memory bus dynamic RAM (RDRAM).
[0175] The above switch debugging embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the attached claims.
Claims
1. A switch debugging method, characterized in that: Applied to a server, the server has a built-in switch and a management chip, and the method includes: Acquire the fault information of the switch from the switch through the management chip, and send the fault information of the switch to the test terminal; Controlling the test terminal to generate a debugging instruction based on the fault information of the switch, and sending the debugging instruction to the management chip; the debugging instruction is used to debug the switch; The management chip performs format conversion on the debugging instruction based on the IPMI protocol to generate serial port data corresponding to the debugging instruction; Running a preset serial port driver on the management chip, and sending the serial port data corresponding to the debugging instruction to the switch through the preset serial port driver based on a serial port communication connection; the serial port communication connection is pre-established between the management chip and the switch; The switch is controlled to perform debugging based on the serial port data corresponding to the debugging instruction.
2. The switch debugging method according to claim 1, characterized in that: The acquiring the fault information of the switch from the switch through the management chip and sending the fault information of the switch to the test terminal includes: The management chip obtains the fault information of the switch from the switch based on the serial port communication connection, and sends the fault information of the switch to the test terminal.
3. The switch debugging method according to claim 2, characterized in that: The acquiring the fault information of the switch from the switch through the management chip based on the serial port communication connection, and sending the fault information of the switch to the test terminal includes: Running a preset serial port driver on the management chip, and obtaining serial port data from the switch based on the serial port communication connection through the preset serial port driver; the serial port data is used to represent the fault information of the switch; The management chip performs format conversion on the serial port data based on the IPMI protocol to generate network port data corresponding to the serial port data; The network port data is sent to the test terminal through the management chip.
4. The switch debugging method according to claim 3, characterized in that: The sending the network port data to the test terminal through the management chip includes: Sending the network port data to the first external switch through the management chip; The network port data is sent to the test terminal through the first external switch.
5. The switch debugging method according to any one of claims 1 to 4, characterized in that: The data table of the test terminal stores the correspondence between different fault information of the switch in the server and the corresponding debugging instructions; The method further comprises: The test terminal is controlled to read a debugging instruction corresponding to the fault information of the switch from the data table based on the fault information of the switch.
6. The switch debugging method according to any one of claims 1 to 4, characterized in that: The controlling the test terminal to generate a debugging instruction based on the fault information of the switch, and sending the debugging instruction to the management chip includes: Controlling the test terminal to analyze the fault information of the switch to generate an analysis result, and generating a debugging instruction according to the analysis result; The test terminal is controlled to run an IPMITOOL tool, and the debugging instruction is sent to the management chip through the IPMITOOL tool.
7. The switch debugging method according to claim 6, characterized in that: The step of sending the debugging instruction to the management chip through the IPMITOOL tool includes: Sending the debugging instruction to the second external switch through the IPMITOOL tool; The debugging instruction is sent to the management chip through the second external switch.
8. A switch debugging device, characterized in that: Applied to a server, the server has a built-in switch and a management chip, and the device includes: A fault information acquisition module, used to acquire the fault information of the switch from the switch through the management chip, and send the fault information of the switch to the test terminal; A debugging instruction generating module, used for controlling the test terminal to generate a debugging instruction based on the fault information of the switch, and sending the debugging instruction to the management chip; the debugging instruction is used to debug the switch; The debugging module is used to convert the format of the debugging instruction based on the IPMI protocol through the management chip to generate serial port data corresponding to the debugging instruction; run a preset serial port driver on the management chip, and send the serial port data corresponding to the debugging instruction to the switch through the preset serial port driver based on a serial port communication connection; the serial port communication connection is pre-established between the management chip and the switch; and control the switch to debug based on the serial port data corresponding to the debugging instruction.
9. A server comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the computer program is executed by the processor, the processor executes the steps of the switch debugging method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the switch debugging method according to any one of claims 1 to 7 are implemented.
