Serial port information acquisition method, controller, system and storage medium

WO2026188666A1PCT designated stage Publication Date: 2026-09-17INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/099116
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-03-14
Filing Date
2025-06-04
Publication Date
2026-09-17

Smart Images

  • Figure CN2025099116_17092026_PF_FP_ABST
    Figure CN2025099116_17092026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a serial port information acquisition method, a controller, a system and a storage medium, relating to the technical field of servers. A target component among a plurality of components is configured to execute the serial port information acquisition method, and debugging is achieved merely by the interaction between the target component and an upper computer; after receiving a serial port access instruction sent by the upper computer, the target component can select, on the basis of a preset configuration rule and identification information of a component to be processed carried in the serial port access instruction, a communication link construction element corresponding to the component to be processed, and on this basis, establish a communication link corresponding to the component to be processed, so as to obtain serial port information of the component to be processed. In the method provided in the present solution, by means of merely providing a single physical serial port for the target component or enabling direct network access, the host computer can access serial ports of all the components, and it is not necessary to provide different physical serial ports for different components, thereby saving hardware resources and achieving greater convenience.
Need to check novelty before this filing date? Find Prior Art

Description

Serial port information acquisition methods, controllers, systems, and storage media

[0001] Cross-references to related applications

[0002] This application claims priority to Chinese Patent Application No. 202510308054.2, filed on March 14, 2025, entitled “Serial Port Information Acquisition Method, Controller, System, and Storage Medium”, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of server technology, and in particular to serial port information acquisition methods, controllers, systems, and storage media. Background Technology

[0004] In the field of server technology, servers can be monitored and managed through their own configured baseboard management controller or external smart network interface cards (NICs). When the baseboard management controller, smart NIC, or central processing unit (CPU) in the server malfunctions, debugging is usually required via a physical serial port. However, different components may require different serial port types. If each component has its own dedicated serial port on the server's panel, it would consume significant panel hardware resources, which is inconvenient. Summary of the Invention

[0005] This application provides a method, apparatus, controller, system, storage medium, and program product for acquiring serial port information, in order to at least solve the problem of excessive hardware resource consumption in related technologies.

[0006] This application provides a method for acquiring serial port information. This method is applied to a serial port information acquisition system, which includes multiple components. The method is executed by a target component among the multiple components. The method includes:

[0007] Receive serial port access command sent by host computer, wherein the serial port access command includes the identification information of the component to be processed, and the component to be processed is any one of multiple components;

[0008] Based on the preset configuration rules and the identification information of the component to be processed, the communication link construction element corresponding to the component to be processed is selected from the communication link construction elements corresponding to multiple components, and the communication link corresponding to the component to be processed is established using the communication link construction element corresponding to the component to be processed.

[0009] The serial port information of the component to be processed is read via the communication link corresponding to the component to be processed.

[0010] The serial port information of the component to be processed is fed back to the host computer, which then performs debugging operations on the component based on the serial port information.

[0011] This application also provides a serial port information acquisition device, including:

[0012] The receiving module is used to receive serial port access commands sent by the host computer. The serial port access commands include the identification information of the component to be processed, which can be any one of multiple components.

[0013] The module is used to select the communication link construction element corresponding to the component to be processed from the communication link construction elements corresponding to multiple components according to the preset configuration rules and the identification information of the component to be processed, and to establish the communication link corresponding to the component to be processed using the communication link construction element corresponding to the component to be processed.

[0014] The reading module is used to read the serial port information of the component to be processed via the communication link corresponding to the component to be processed;

[0015] The feedback module is used to send the serial port information of the component to be processed back to the host computer, so that the host computer can perform debugging operations on the component to be processed based on the serial port information.

[0016] This application also provides a controller, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described serial port information acquisition methods.

[0017] This application also provides a serial port information acquisition system, which includes multiple components, including the controller described above, and the controller is the target component described above; the target component is used to execute any of the serial port information acquisition methods described above.

[0018] This application also provides a computer non-volatile readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described serial port information acquisition methods.

[0019] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described serial port information acquisition methods.

[0020] This application establishes a target component for executing the serial port information acquisition method among multiple components. Only the target component interacts with the host computer. Upon receiving a serial port access command from the host computer, the target component can select the corresponding communication link construction element based on preset configuration rules and the identifier information of the component to be processed carried in the command. The target component then establishes the corresponding communication link and obtains the serial port information of the component to be processed through this link. This method only requires providing one physical serial port for the target component or enabling network access through the target component to allow the host computer to access the serial ports of all components. It eliminates the need to configure different physical serial ports for different components, saving hardware resources and offering greater convenience. Attached Figure Description

[0021] To more clearly illustrate some embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 is a schematic diagram of the architecture of a serial port information acquisition system provided in some embodiments of this application;

[0023] Figure 2 is a flowchart illustrating a serial port information acquisition method provided in some embodiments of this application;

[0024] Figure 3 is a diagram of a serial port information display interface provided in some embodiments of this application;

[0025] Figure 4 is a diagram showing a firmware information display interface provided in some embodiments of this application;

[0026] Figure 5 is a schematic diagram of the architecture of another serial port information acquisition system provided in some embodiments of this application;

[0027] Figure 6 is a schematic diagram of the architecture of another serial port information acquisition system provided in some embodiments of this application;

[0028] Figure 7 is a schematic diagram of the session path provided in some embodiments of this application;

[0029] Figure 8 is a schematic diagram of the architecture of a serial port information acquisition device provided in some embodiments of this application;

[0030] Figure 9 is a schematic diagram of the architecture of the controller provided in some embodiments of this application. Detailed Implementation

[0031] The technical solutions of some embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on some embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0032] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0033] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0034] The specific application environment architecture or specific hardware architecture on which the serial port information acquisition method depends is described here.

[0035] The serial port information acquisition method provided in some embodiments of this application can be implemented by a serial port information acquisition system. As shown in Figure 1, the serial port information acquisition system may include multiple components, among which a target component executes the serial port information acquisition method. These multiple components may be components included in a server, and each component is connected to the target component. The target component can establish a physical communication link with the host computer through a physical serial port provided on the server panel, or it can establish a network communication link with the host computer.

[0036] The target component can be a controller, specifically a management controller and a logic controller. For example, the management controller could be a Baseboard Management Controller (BMC) in a server used to monitor and manage server operation. The logic controller could be a Complex Programmable Logic Device (CPLD) in the server. Other components besides the target component could include a second baseboard management controller and a system-on-a-chip in a smart network interface card (NIC), as well as a Central Processing Unit (CPU) and a Platform Controller Hub (PCH). The host computer could be a laptop computer, etc.

[0037] The first baseboard management controller can be equipped with multiple serial communication interfaces. Each of the other components can be connected to one or more serial communication interfaces on the first baseboard management controller. Specifically, the complex programmable logic controller (CPL) can be electrically connected to each serial communication interface, and any other component besides the CPL can be indirectly connected to one serial communication interface on the baseboard management controller in the server. The serial communication interface can be a Universal Asynchronous Receiver / Transmitter (UART).

[0038] Some embodiments of this application provide a serial port information acquisition method, which can be executed by the target component described above, as shown in FIG2, and may include the following steps:

[0039] Step S201: Receive the serial port access command sent by the host computer.

[0040] The serial port access command includes the identification information of the component to be processed, which can be any one of multiple components. A serial port, short for Serial Communication Interface, is a standard interface used for data transmission between devices.

[0041] Specifically, since components within a server may experience hardware or firmware failures, technicians can use a host computer to debug the malfunctioning component to identify and resolve the problem. First, technicians can input the identification information of the component to be processed into the host computer; this information can be a number or a string. Then, the host computer can generate a serial port access command based on the input identification information and send it to the target component that has established a communication connection with the host computer. The target component can then receive the serial port access command from the host computer, parse it, and obtain the serial port information of the component to be processed, which is used for subsequent acquisition of the component's serial port information.

[0042] Step S202: Based on the preset configuration rules and the identification information of the component to be processed, select the communication link construction element corresponding to the component to be processed from the communication link construction elements corresponding to multiple components, and establish the communication link corresponding to the component to be processed using the communication link construction element corresponding to the component to be processed.

[0043] The preset configuration rules include rules for selecting communication link building elements corresponding to the component to be processed, and rules for establishing a first communication link corresponding to the component to be processed using the communication link building elements corresponding to the component to be processed.

[0044] Specifically, the target component can be a component with control functions, which can connect to other components through relevant control functions; it is generally referred to as a controller. The following sections will detail the process of establishing a communication link with the component to be processed, using the target component as both a logic controller and a management controller as examples.

[0045] Scenario 1: The target component is a logic controller.

[0046] When the component to be processed is not the target component, the target component can construct a communication link corresponding to the component to be processed through the following specific steps.

[0047] Step 1: Using the identification information of the component to be processed, determine the communication enable branch corresponding to the identification information of the component to be processed in the communication enable circuit included in the logic controller as the communication link construction element corresponding to the component to be processed.

[0048] The communication enabling circuit can be a selection circuit, including communication enabling branches corresponding to the identification information of multiple components. For example, the communication enabling circuit can be a multiplexer, and the communication enabling branches can be switches.

[0049] Step 2: Adjust the communication enable branch corresponding to the identification information of the component to be processed to the first state to connect the physical communication link between the component to be processed and the target component.

[0050] The physical communication link is the communication link corresponding to the component to be processed.

[0051] Specifically, the target component can use the identification information of the component to be processed to determine the communication enable branch corresponding to the identification information of the component to be processed from among the multiple communication enable branches included in its own communication enable circuit. Then, the target component can adjust the communication enable branch corresponding to the identification information of the component to be processed to a first state (e.g., adjust the corresponding switch to a high level). In this way, the physical communication link between the target component and the component to be processed is established, that is, the communication link between the host computer and the component to be processed is established.

[0052] When the component to be processed is the target component, the target component can use the communication enable branches in its own communication enable circuit that correspond to all components as the building elements of the communication link corresponding to itself, and adjust the communication enable branches that correspond to all components to the second state (for example, adjust all switches to the low level state) to disconnect the link between the target component and other components, so that the target component can establish a communication link between its own processor and memory (that is, the communication link corresponding to the component to be processed), thereby directly reading serial port information from its own memory.

[0053] In this way, only one physical serial port needs to be connected to the target component to enable debugging operations on different components, which can save hardware resources on the server panel.

[0054] Scenario 2: The target component is the management controller.

[0055] Step 1: Using the identification information of the component to be processed, determine the first network monitoring queue corresponding to the component to be processed from the network monitoring queues corresponding to the multiple components, determine the first session monitoring queue corresponding to the component to be processed from the pre-built serial port virtual function monitoring queues corresponding to the multiple components, determine the first serial port descriptor corresponding to the component to be processed from the pre-built serial port descriptors corresponding to the multiple components, and determine the first data buffer corresponding to the component to be processed from the pre-built data buffers corresponding to the multiple components.

[0056] The serial port descriptor, also known as the underlying serial port descriptor, is used to represent the serial communication port. The first network monitoring queue, the first session monitoring queue, the first serial port descriptor, and the first data buffer together serve as the building blocks of the communication link corresponding to the component to be processed.

[0057] Step 2: Based on the first network monitoring queue, the first session monitoring queue, the first data buffer, and the first serial port descriptor, construct the first session path corresponding to the component to be processed.

[0058] The first session path is the communication link corresponding to the component to be processed. The network monitoring queue can be used to schedule data packets received through the network interface and data packets sent to the network interface. The session monitoring queue can be used to process data related to session functions. For example, the network monitoring queue could be "lanifcq", the session monitoring queue could be "solifcq", the first network monitoring queue could be "lanifcq1", and the first session monitoring queue could be "solifcq1".

[0059] Specifically, the management controller is typically configured with network management and session management functions. To facilitate debugging of different components, this solution sets up corresponding network monitoring queues for different components based on the network management function, and corresponding session monitoring queues for different components based on the session management function. For example, the session management function can be Serial Over LAN (SOL). Furthermore, since continuous data transmission is involved during debugging, this solution sets up corresponding data buffers for different components for temporary data storage.

[0060] After the management controller parses the identification information of the component to be processed from the serial port access command, it can determine the first network monitoring queue, the first session monitoring queue, and the first data buffer corresponding to the component based on the identification information. Simultaneously, the management controller can determine the first serial port descriptor corresponding to the component from a pre-built set of serial port descriptors for each component, based on the identification information, for subsequent configuration operations on the component.

[0061] Step S203: Read the serial port information of the component to be processed via the communication link corresponding to the component to be processed.

[0062] In scenario one, when the target component is a logic controller, the target component can directly read serial port information from the component to be processed via a physical communication link.

[0063] In scenario two, when the target component is a management controller, the target component can read the serial port information of the component to be processed through the first session path.

[0064] Step 1: Open the file corresponding to the first serial port descriptor.

[0065] Step 2: Configure at least one serial port parameter for the first session path in the file.

[0066] The serial port parameters can include baud rate, transmission rate, data buffer size, and port number. The port number can be a User Datagram Protocol (UDP) port number.

[0067] Step 3: Pack all serial port parameters in at least one serial port parameter to obtain the serial port information of the component to be processed, and store it in the first data buffer.

[0068] Step four: Transmit the serial port information of the component to be processed in the first data buffer to the first session monitoring queue.

[0069] Step 5: Read the serial port information of the component to be processed from the first session monitoring queue and add it to the first network monitoring queue.

[0070] Step 6: Read the serial port information of the component to be processed from the first network monitoring queue.

[0071] Specifically, the target component can first open the file corresponding to the component to be processed (i.e., open the session port corresponding to the first serial port descriptor) according to the first serial port descriptor. Then, according to preset configuration rules, it can configure at least one serial port parameter of the first session path in the session port. After packaging all serial port parameters, a session data packet is obtained, which is the serial port information of the component to be processed, and stored in the first data buffer. In this way, the target component can determine when it is time to process the serial port information of the component to be processed according to the pre-configured data reading rules, and transmit the serial port information of the component to be processed in the first data buffer to the first session monitoring queue. Then, the target component can determine when it is time to process the serial port information of the component to be processed according to the session management function, read the serial port information of the component to be processed from the first session monitoring queue, and add it to the first network monitoring queue for transmission. Finally, the target component can determine when it is time to process the serial port information of the component to be processed according to the network management function, read the serial port information of the component to be processed from the first network monitoring queue and transmit it to the network interface to feed back the serial port information of the component to be processed to the host computer.

[0072] This eliminates the need for technicians to physically switch physical serial ports; instead, components can be remotely debugged via Ethernet, which is quite convenient. Furthermore, with this solution, technicians only need to input commands to obtain the serial port information of the corresponding component, without needing to perform physical link switching operations. The serial port information for multiple components can be displayed simultaneously, facilitating debugging. Additionally, by using network monitoring queues, session monitoring queues, and data buffers to feed serial port information back to the host computer in multiple steps, data can be safely and accurately transmitted to its destination. Moreover, in the event of a fault, information from each node (queue and buffer) can be used to accurately pinpoint the problem.

[0073] In some embodiments, when the target component is a management controller, the management controller may be pre-configured with serial port information acquisition plugins corresponding to each component. These plugins handle the serial communication protocol, baud rate, data format, etc., of a specific component. Accordingly, the target component can determine the first plugin corresponding to the component to be processed from the serial port information acquisition plugins corresponding to each component based on the identification information of the component to be processed. Using the first plugin, a session port corresponding to the component to be processed is opened. The target component can configure at least one serial port parameter on this session port to obtain the serial port information of the component to be processed. In this way, since each plugin can independently handle the communication tasks of a specific component, even if one plugin malfunctions, it will not affect the normal communication of other devices, thus enhancing the reliability of the system.

[0074] Step S204: Feed back the serial port information of the component to be processed to the host computer.

[0075] Specifically, after the target component feeds back the serial port information of the component to be processed to the host computer, the host computer can send debugging instructions to the component to be processed through the first communication link based on the serial port information and the relevant operations of the technicians, so as to complete the relevant debugging operations of the component to be processed.

[0076] In some embodiments, when a firmware information acquisition instruction is received from a host computer, the firmware information on the component to be processed is read through the established first communication link.

[0077] Among them, the firmware information acquisition instruction is generated and sent by the host computer when it detects the target input operation in the serial port information display interface of the component to be processed.

[0078] Specifically, Figure 3 shows the display interface of the serial port information of the component to be processed in the host computer. The component to be processed is the management controller itself, including its port number, baud rate, and data buffer size. In the host computer display interface shown in Figure 3, technicians can perform target input operations. After detecting the target input operation, the host computer can generate a firmware information retrieval command and send it to the target component. The target component can then read the firmware information on the component to be processed through the first communication link. For example, the display interface can be the command line interface (CLI) provided by SOL, and the target input operation can be clicking the "Shift key". Furthermore, the host computer can display the firmware information, as shown in Figure 4, which displays the firmware information of the Basic Input / Output System (BIOS), including the manufacturer name, firmware version number, release date, starting address loaded into memory, runtime memory size, and supported features.

[0079] When the first communication link is a physical communication link between the component to be processed and the target component, the target component can directly read firmware information from the component through the first communication link. Alternatively, when the first communication link is the aforementioned first session path, firmware information can be read from a file of the component to be processed and stored in a first buffer. In this way, the target component, according to pre-configured data reading rules, determines when it is time to process the serial port information of the component to be processed and transmits the firmware information from the first data buffer to the first session monitoring queue. Then, based on the session management function, the target component can determine when it is time to process the firmware information, read the firmware information from the first session monitoring queue, and add it to the first network monitoring queue. Finally, based on the network management function, the target component can determine when it is time to process the firmware information, read the firmware information from the first network monitoring queue, and transmit it to the network interface to feed back the serial port information of the component to be processed to the host computer.

[0080] In some embodiments, technicians can also obtain hardware and software information of the component to be processed from the component by inputting other operation instructions.

[0081] In some embodiments, when the failure to establish the first session path is detected and the component to be processed is not the management controller or the logic controller, the identification information of the component to be processed is sent to the logic controller so that the logic controller can connect the physical communication link between itself and the component to be processed, and read the serial port information of the component to be processed and feed it back to the management controller.

[0082] Specifically, the session function of the target component may malfunction, thus the first session path will fail to be established in this case. The communication enable branch corresponding to the management controller in the communication enable circuit of the logic controller can be kept in the first state by default, meaning the physical communication link between the logic controller and the management controller is active. When the component to be processed is neither the management controller nor the logic controller, and after the logic controller receives the identification information of the component to be processed sent by the management controller, it can determine the communication enable branch corresponding to the identification information of the component to be processed in the communication enable circuit of the logic controller as the communication link building element corresponding to the component to be processed, based on the identification information of the component to be processed. The communication enable branch corresponding to the identification information of the component to be processed is adjusted to the first state to establish the physical communication link between the component to be processed and the logic controller. The logic controller can then directly read serial port information from the component to be processed through this physical communication link. After reading the serial port information, the logic controller can adjust the communication enable branch corresponding to the identification information of the component to be processed to the second state, and adjust its own communication enable branch corresponding to the management controller to the first state, thereby establishing a physical communication link between itself and the management controller, and sending the serial port information of the component to be processed to the management controller through this physical communication link. The management controller then feeds back the serial port information of the component to be processed to the host computer.

[0083] In this way, if one transmission method fails, other alternative methods can be used to transmit serial port information in a timely manner, without the need for technicians to troubleshoot and reacquire the serial port information. This can improve the transmission efficiency of serial port information and thus improve debugging efficiency.

[0084] In some embodiments, after a failure is detected in the communication link corresponding to the component to be processed, the target component can send a fault indication message to the host computer so that technicians can switch the debugging mode in a timely manner.

[0085] In some embodiments, after obtaining the identification information of the component to be processed, the target component can first identify its own current load indication value, and determine the priority of the component to be processed based on the identification information of the component to be processed and the correspondence between the component identification information and the priority (wherein the priority can be determined based on the average daily data volume processed by the component to be processed, i.e., the more data volume processed per day, the higher the priority). Then, the target component can determine the queue size and buffer size of the component to be processed based on the load indication information and the priority of the component to be processed (for example, the target component can predefine the basic queue size and basic buffer size, first determine the difference between the load indication value and the preset load threshold, then determine the ratio of the difference to the first preset difference, the sum of the ratio and the priority is determined as the target coefficient value, the product of the target coefficient value and the basic queue size is used as the queue size of the component to be processed, and the product of the target coefficient value and the basic buffer size is used as the buffer size of the component to be processed). Then, based on the queue size of the component to be processed, a first network monitoring queue and a first session monitoring queue with the same queue size are constructed, and based on the buffer size, a first data buffer with the same buffer size is constructed. In this way, the target component can construct the first session path based on the first network monitoring queue, the first session monitoring queue, the first data buffer, and the first serial port descriptor built in real time. This allows for the determination of queue and buffer sizes based on real-time load conditions and the characteristics of the component being processed, providing high flexibility and reducing the impact of the debugging process on other services in the management controller.

[0086] The serial port information acquisition method provided in some embodiments of this application sets a target component to execute the serial port information acquisition method among multiple components. Only the target component interacts with the host computer. After receiving a serial port access command from the host computer, the target component can select the communication link construction element corresponding to the component to be processed according to preset configuration rules and the identification information of the component to be processed carried in the serial port access command. Based on this, a communication link corresponding to the component to be processed is established, and the target component can obtain the serial port information of the component to be processed through the communication link corresponding to the component to be processed. With the method provided by this solution, only one physical serial port needs to be provided for the target component, or the target component can be accessed directly through the network, enabling the host computer to access the serial ports of all components. It is not necessary to set different physical serial ports for different components, thus saving hardware resources. Taking smart network cards as an example, smart network cards produced by different manufacturers have different models and serial port interface forms. When technicians debug smart network cards, they need to prepare serial cables corresponding to different interface forms, which is inconvenient. With this solution, there is no need to prepare serial cables; instead, the smart network card can be debugged indirectly through the controller.

[0087] The following section uses a serial port information acquisition system, which includes a logic controller, a first baseboard management controller, a central processing unit, a second baseboard management controller in a smart network card, and a system-on-a-chip, with a complex programmable logic controller as the target component, as an example to explain the serial port information acquisition method in detail.

[0088] As shown in Figure 5, the first baseboard management controller can be equipped with four universal asynchronous transceivers (UARTs), labeled UART1, UART2, UART3, and UART4. A UART is a serial communication interface. A multiplexer can be installed on the logic controller. The central processing unit (CPU) 1 is electrically connected to UART1, and UART1 is electrically connected to the multiplexer. The second baseboard management controller is electrically connected to UART2, and UART2 is electrically connected to the multiplexer. The system-on-a-chip (SoC) in the smart network interface card (NIC) is electrically connected to UART3, and UART3 is electrically connected to the multiplexer. The complex programmable logic controller (PLC) is electrically connected to UART1, UART2, UART3, and UART4, respectively.

[0089] In the structure shown in Figure 5, the serial port information of the central processing unit is connected to the first substrate management controller via an Embedded Serial Peripheral Interface (ESPI) physical link. The ESPI processor in the first substrate management controller routes this information to a Universal Asynchronous Receiver / Transmitter (UART). The serial port information of the second substrate management controller can be transmitted to UART 2 via TX / RX signals, and the serial port information of the on-chip system can be transmitted to UART 3 via TX / RX signals. The UART in the first substrate management controller is for its own serial port debugging information. The Complex Programmable Logic Controller (CPL) controls the communication enable branch corresponding to the identification information of the component to be processed in the multiplexer to adjust to the first state based on the received identification information of the component to be processed, thereby establishing the physical communication link from the component to be processed to the CPL and reading the identification information of the component to be processed.

[0090] For example, when the identification information of the component to be processed is “&*1”, the serial port information of the first baseboard management controller is output; when the identification information of the component to be processed is “&*0”, the serial port information of the central processing unit is output; when the identification information of the component to be processed is “&*2”, the serial port information of the on-chip system of the smart network card is output; and when the identification information of the component to be processed is “&*3”, the serial port information of the second baseboard management controller is output.

[0091] The serial port information acquisition method provided in some embodiments of this application has its own universal asynchronous transceiver for each component to output debugging information, which facilitates independent debugging and diagnosis by technicians and improves the efficiency of troubleshooting. In addition, by using a complex programmable logic controller to dynamically adjust the state of the multiplexer according to the identification information of the component to be processed, the correct communication link is selected. This design allows the system to easily add or remove components as needed without reconfiguring the entire communication architecture.

[0092] The following describes the serial port information acquisition method in detail, using a serial port information acquisition system comprising a first management controller, a central processing unit, a second baseboard management controller, and a system-on-a-chip (SoC), with the management controller as the target component. The serial port information acquisition system can be illustrated as shown in Figure 6. The management controller can be equipped with three universal asynchronous transceivers (UARTs), labeled UART 5, UART 6, and UART 7. The central processing unit 1 is electrically connected to UART 5. The second baseboard management controller is electrically connected to UART 6. The SoC in the smart network interface card (NIC) is electrically connected to UART 7. Under the above structure, serial port information and firmware information can be acquired according to the following steps:

[0093] Step 1: After obtaining the Internet Protocol (IP) address of the first baseboard management controller, the host computer can access the first baseboard management controller via the network based on the IP address.

[0094] Step 2: Establish an Intelligent Platform Management Interface (IPMI) session. The host computer can send specified IPMI and Remote Management Control Protocol Plus (RMCP+) / Remote Access Keyed Payload (RAAKP) messages to the first baseboard management controller to establish a session path. For example, issuing the command `ipmitool sol activate instance=1` establishes a connection, and the BMC transmits messages internally through the monitoring queue lanifcq1.

[0095] Step 3: Obtain Channel Payload Support Information. After recognizing the establishment of an IPMI session with the first baseboard management controller, the host computer can send a first retrieval command to the first baseboard management controller to read the availability and version information of the SOL (Single Opinion Loading). For example, the first retrieval command could be the Get Channel Payload Support command. The availability information can be used to indicate whether the SOL function is being used by other sessions.

[0096] Step 4: Activate the payload. After the host computer receives the availability and version information of the SOL sent by the first baseboard management controller, it can determine whether the SOL has been activated on other sessions based on the availability information. If it is determined that the SOL has not been activated on other sessions, a first activation command can be sent to the server's management controller. For example, the first activation command could be the Activate Payload command.

[0097] Step 5, as shown in Figure 7, involves the central processing unit (CPU) corresponding to network session instance 1, the first baseboard management controller (BDC) corresponding to network session instance 2, the second baseboard management controller (BDC) corresponding to network session instance 3, and the on-chip system (SoC) corresponding to network session instance 4. Each session instance corresponds to a network queue, session ID, session queue, data buffer, and a corresponding serial port descriptor (i.e., / dev / ttys1, / dev / ttys2, / dev / ttys3, and / dev / ttys4 in the figure).

[0098] When the first baseboard management controller receives the first activation command, it can send a preset message to session queue 1 to enter the SOL process processing logic. At this time, the first baseboard management controller can open the SOL port and perform serial port parameter configuration operations. That is, according to the identifier information "1" in "ipmitool sol activate instance=1", the serial port descriptor " / dev / ttys1" corresponding to the central processing unit can be obtained. Based on " / dev / ttys1", the port corresponding to the central processing unit can be opened. The first baseboard management controller can configure serial port parameters such as data buffer size, UDP port number, baud rate and transmission rate in this port, and package these serial port parameters to obtain SOL data packets (serial port information), cache them in data buffer 1 corresponding to the central processing unit, and then send them to session queue 1, then through network queue 1, and finally through the Socket network connection to send them to the host computer.

[0099] For example, after the host computer sends `ipmitool sol activate instance=1`, it displays the serial port information of the central processing unit; after sending `ipmitool sol activate instance=2`, it displays the serial port information of the first baseboard management controller; after sending `ipmitool sol activate instance=3`, it displays the serial port information of the second baseboard management controller; and after sending `ipmitool sol activate instance=4`, it displays the serial port information of the smart network card's on-chip system.

[0100] Step 6: After the technician performs the target input operation in the SOL command line interface provided by the host computer, the data stream (firmware information) continues to be sent to the host computer according to the flow of Step 5 above.

[0101] The serial port information acquisition method provided in some embodiments of this application allows administrators to access various components of a server from a remote location and obtain their serial port information via IPMI and SOL, simplifying management and maintenance. Furthermore, this solution eliminates the need for hardware link switching and can simultaneously display serial port information corresponding to multiple components.

[0102] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0103] Some embodiments of this application also provide a serial port information acquisition device, as shown in Figure 8, including:

[0104] The receiving module 801 is used to receive the serial port access command sent by the host computer. The serial port access command includes the identification information of the component to be processed, and the component to be processed is any one of multiple components.

[0105] The module 802 is used to select the communication link construction element corresponding to the component to be processed from the communication link construction elements corresponding to multiple components according to the preset configuration rules and the identification information of the component to be processed, and to establish the communication link corresponding to the component to be processed using the communication link construction element corresponding to the component to be processed.

[0106] The reading module 803 is used to read the serial port information of the component to be processed via the communication link corresponding to the component to be processed;

[0107] The feedback module 804 is used to feed back the serial port information of the component to be processed to the host computer, so that the host computer can perform debugging operations on the component to be processed based on the serial port information.

[0108] In some embodiments, when the target component is a logic controller and the component to be processed is not the target component, the establishment module 802 is specifically used for:

[0109] Using the identification information of the component to be processed, the communication enable branch corresponding to the identification information of the component to be processed is determined in the communication enable circuit included in the logic controller as the communication link construction element corresponding to the component to be processed;

[0110] The communication enable branch corresponding to the identification information of the component to be processed is adjusted to the first state to connect the physical communication link between the component to be processed and the target component. The physical communication link is the communication link corresponding to the component to be processed.

[0111] In some embodiments, when the target component is a management controller, the establishment module 802 is specifically used for:

[0112] Using the identification information of the component to be processed, the first network monitoring queue corresponding to the component to be processed is determined from the network monitoring queues corresponding to multiple components, the first session monitoring queue corresponding to the component to be processed is determined from the serial port virtual function monitoring queues corresponding to multiple components, the first serial port descriptor corresponding to the component to be processed is determined from the serial port descriptors corresponding to multiple components, and the first data buffer corresponding to the component to be processed is determined from the data buffers corresponding to multiple components. The first network monitoring queue, the first session monitoring queue, the first serial port descriptor, and the first data buffer together serve as the communication link construction elements corresponding to the component to be processed.

[0113] Based on the first network monitoring queue, the first session monitoring queue, the first data buffer, and the first serial port descriptor, a first session path corresponding to the component to be processed is constructed, wherein the first session path is the communication link corresponding to the component to be processed.

[0114] In some embodiments, the reading module 803 is specifically used for:

[0115] Serial port information is read directly from the component to be processed via a physical communication link.

[0116] In some embodiments, the reading module 803 is specifically used for:

[0117] Open the file corresponding to the first serial port descriptor;

[0118] Configure at least one serial port parameter of the first session path in the file;

[0119] After packaging all serial port parameters in at least one serial port parameter, the serial port information of the component to be processed is obtained and stored in the first data buffer.

[0120] Transmit the serial port information of the component to be processed in the first data buffer to the first session monitoring queue;

[0121] Read the serial port information of the component to be processed from the first session monitoring queue and transmit it to the first network monitoring queue;

[0122] Read the serial port information of the component to be processed from the first network monitoring queue.

[0123] In some embodiments, the reading module 803 is further configured to:

[0124] When a firmware information acquisition command is received from the host computer, the firmware information on the component to be processed is read through the established communication link corresponding to the component to be processed. The firmware information acquisition command is generated and sent by the host computer when it detects a target input operation in the serial port information display interface of the component to be processed.

[0125] In some embodiments, the device further includes a monitoring module 805, which is used for:

[0126] When the failure to establish the first session path is detected, and the component to be processed is not the management controller or the logic controller, the identification information of the component to be processed is sent to the logic controller so that the logic controller can connect the physical communication link between itself and the component to be processed, and read the serial port information of the component to be processed and feed it back to the management controller.

[0127] For a description of the features in the embodiment corresponding to the serial port information acquisition device, please refer to the relevant description of the embodiment corresponding to the serial port information acquisition method, which will not be repeated here.

[0128] Some embodiments of this application also provide a controller, as shown in FIG9, including a memory 10 and a processor 20. The memory 10 stores a computer program, and the processor 20 is configured to run the computer program to perform the steps in any of the above-described embodiments of the serial port information acquisition method.

[0129] Some embodiments of this application also provide a computer non-volatile readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described serial port information acquisition method embodiments when running.

[0130] In some embodiments, the aforementioned non-volatile readable storage media may include, but are not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0131] Some embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described serial port information acquisition method embodiments.

[0132] Some embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described serial port information acquisition method embodiments.

[0133] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0134] The foregoing has provided a detailed description of a serial port information acquisition method, apparatus, controller, system, storage medium, and program product provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A serial port information acquisition method characterized by comprising: The method is applied to a serial port information acquisition system, which includes multiple components. The method is executed by a target component among the multiple components, and the method includes: Receive a serial port access command sent by the host computer, wherein the serial port access command includes the identification information of the component to be processed, and the component to be processed is any one of the multiple components; According to the preset configuration rules and the identification information of the component to be processed, a communication link construction element corresponding to the component to be processed is selected from the communication link construction elements corresponding to the multiple components respectively, and a communication link corresponding to the component to be processed is established using the communication link construction element corresponding to the component to be processed. The serial port information of the component to be processed is read via the communication link corresponding to the component to be processed; The serial port information of the component to be processed is fed back to the host computer, so that the host computer can perform debugging operations on the component to be processed based on the serial port information.

2. The serial port information acquisition method according to claim 1, characterized by, The target component is a controller, which includes at least a management controller and a logic controller.

3. The serial port information acquisition method according to claim 1, characterized by, When the target component is a logic controller and the component to be processed is not the target component, the step of selecting a communication link construction element corresponding to the component to be processed from multiple communication link construction elements corresponding to the components according to preset configuration rules and the identification information of the component to be processed, and establishing a communication link corresponding to the component to be processed using the communication link construction element corresponding to the component to be processed, includes: Using the identification information of the component to be processed, a communication enable branch corresponding to the identification information of the component to be processed is determined in the communication enable circuit included in the logic controller as a communication link building element corresponding to the component to be processed; The communication enable branch corresponding to the identification information of the component to be processed is adjusted to the first state to connect the physical communication link between the component to be processed and the target component, wherein the physical communication link is the communication link corresponding to the component to be processed.

4. The serial port information acquisition method according to claim 3, characterized by, The method further includes: When the component to be processed is the target component, the communication enable branch in the communication enable circuit of the target component that corresponds to each of the components is used as the communication link building element corresponding to the target component, and the communication enable branch that corresponds to each of the components is adjusted to the second state to disconnect the link between the target component and other components.

5. The serial port information acquisition method according to claim 1, wherein When the target component is a management controller, the step of selecting a communication link construction element corresponding to the target component from multiple communication link construction elements corresponding to the target component according to preset configuration rules and the identification information of the component to be processed, and establishing a communication link corresponding to the target component using the communication link construction element corresponding to the target component, includes: Using the identification information of the component to be processed, a first network monitoring queue corresponding to the component to be processed is determined from the network monitoring queues corresponding to the components, a first session monitoring queue corresponding to the component to be processed is determined from the serial port virtual function monitoring queues corresponding to the components, a first serial port descriptor corresponding to the component to be processed is determined from the serial port descriptors corresponding to the components, and a first data buffer corresponding to the component to be processed is determined from the data buffers corresponding to the components. The first network monitoring queue, the first session monitoring queue, the first serial port descriptor, and the first data buffer together serve as communication link building elements corresponding to the component to be processed. Based on the first network monitoring queue, the first session monitoring queue, the first data buffer, and the first serial port descriptor, a first session path corresponding to the component to be processed is constructed, wherein the first session path is the communication link corresponding to the component to be processed.

6. The serial port information acquisition method according to claim 5, wherein The management controller is configured with network management functions and session management functions, and the method further includes: Based on the network management function, set up a corresponding network monitoring queue for the component to be processed; Based on the session management function, a corresponding session monitoring queue is set for the component to be processed.

7. The serial port information acquisition method according to claim 5, wherein The management controller is pre-configured with a serial port information acquisition plugin corresponding to each component, and the method further includes: Based on the identification information of the component to be processed, determine the first plugin corresponding to the component to be processed in the serial port information acquisition plugin corresponding to each component; The first plugin is used to open a session port corresponding to the component to be processed, and the session port is configured with at least one serial port parameter. Based on the serial port parameters, the serial port information of the component to be processed is obtained.

8. The serial port information acquisition method according to claim 3, wherein The step of reading the serial port information of the component to be processed via the communication link corresponding to the component to be processed includes: Serial port information is read directly from the component to be processed via the physical communication link.

9. The serial port information acquisition method according to claim 5, wherein The step of reading the serial port information of the component to be processed via the communication link corresponding to the component to be processed includes: Open the file corresponding to the first serial port descriptor according to the first serial port descriptor; Configure at least one serial port parameter of the first session path in the file; After packaging all the serial port parameters in at least one of the serial port parameters, the serial port information of the component to be processed is obtained and stored in the first data buffer. The serial port information of the component to be processed in the first data buffer is transmitted to the first session monitoring queue; Read the serial port information of the component to be processed from the first session monitoring queue and transmit it to the first network monitoring queue; Read the serial port information of the component to be processed from the first network monitoring queue.

10. The serial port information acquisition method according to claim 9, wherein The serial port parameters include at least the baud rate, transmission rate, data buffer size, and port number.

11. The serial port information acquisition method according to claim 5 or 9, wherein After feeding back the serial port information of the component to be processed to the host computer, the method further includes: When the host computer receives the firmware information acquisition instruction, it reads the firmware information on the component to be processed through the established communication link corresponding to the component to be processed. The firmware information acquisition instruction is generated and sent by the host computer when it detects a target input operation in the serial port information display interface of the component to be processed.

12. The serial port information acquisition method according to claim 5, wherein The method further includes: When the failure to establish the first session path is detected, and the component to be processed is not the management controller or the logic controller, the identification information of the component to be processed is sent to the logic controller so that the logic controller can connect the physical communication link between itself and the component to be processed, and read the serial port information of the component to be processed and feed it back to the management controller.

13. The serial port information acquisition method according to claim 5, wherein The method further includes: Obtain the load indication information of the target component; The priority of the component to be processed is determined based on the identification information of the component to be processed and the correspondence between the identification information and the priority. Based on the load indication information and the priority of the component to be processed, determine the queue size and buffer size of the component to be processed; Based on the queue size of the component to be processed, construct a first network monitoring queue and a first session monitoring queue corresponding to the queue size; Based on the buffer size, a first data buffer corresponding to the buffer size is constructed.

14. The serial port information acquisition method according to claim 13, wherein The method further includes: The priority of the component to be processed is determined based on the average daily data volume processed by the component to be processed.

15. The serial port information acquisition method according to claim 1, wherein The method further includes: When a communication link failure is detected corresponding to the component to be processed, a fault prompt message is sent to the host computer.

16. The serial port information acquisition method according to claim 1, wherein The identification information can be a numerical value or a string.

17. The serial port information acquisition method according to claim 1, wherein The plurality of components are components included in the server, and each of the components is connected to the target component respectively; the target component establishes a physical communication link with the host computer through a physical serial port provided on the server panel, or establishes a network communication link with the host computer.

18. A controller characterized by comprising: include: Memory, configured to store computer programs; The processor is configured to implement the steps of the serial port information acquisition method as described in any one of claims 1 to 17 when executing the computer program.

19. A serial port information acquisition system characterized by comprising: The serial port information acquisition system includes multiple components, among which is the controller as described in claim 18, wherein the controller is the target component as described in any one of claims 1-17; The target component is configured to perform the serial port information acquisition method as described in any one of claims 1 to 7.

20. A computer non-volatile readable storage medium characterized in that, The computer non-volatile readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of the serial port information acquisition method as described in any one of claims 1 to 17.