In-band communication method and device, computer equipment and storage medium
By using the internal communication bus to establish a communication link between the operating system and the substrate management controller at the hardware level, the dependence of Redfish in-band communication on the IP network is solved, and efficient server management and security risks are achieved in different network environments.
Patent Information
- Application Number
- CN202411712138.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-18
AI Technical Summary
Redfish in-band communication relies on IP network communication, resulting in many challenges in environments with network failures, IP address conflicts or high security requirements, increasing the risk of configuration errors and security threats.
Through an internal communication bus, such as a universal serial bus (USB), a communication link between the operating system and the substrate management controller (BMC) is directly established at the hardware level, realizing in-band communication that is separated from IP communication management.
Efficient server management is achieved without the need to configure complex network routing and firewall rules. It is suitable for a variety of network environments, including networkless, limited network or high security requirements, reducing IP communication dependency and security risks.
Smart Images

Figure CN119645683A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to an in-band communication method, apparatus, computer equipment and storage medium. Background Art
[0002] Redfish in-band communication technology uses existing hardware resources, such as Universal Serial Bus (USB) interface to implement LAN Over USB configuration. This configuration converts the USB interface into a virtual network interface through specific software adaptation and configuration steps, allowing system administrators to use USB connection to directly build a temporary and secure network communication channel without relying on traditional network hardware to achieve communication between the operating system and the baseboard management controller (BMC).
[0003] However, the Redfish in-band communication based on Lan Over USB configuration requires complex configuration of the user system's network environment, which increases the risk of configuration errors and may cause server network configuration problems and service blockages. Secondly, although placing the BMC and the operating system in the same network segment simplifies management, it also increases security risks. Attackers may freely attack the BMC through communications within the same network segment and gain full control of the server. In addition, traditional Redfish interface management relies on IP network communication, which may encounter many challenges in environments with network failures, IP address conflicts, or high security requirements. These problems limit the application effect of Redfish technology in certain specific scenarios. Summary of the invention
[0004] Based on this, it is necessary to provide an in-band communication method, apparatus, computer equipment and storage medium that can be independent of IP communication management in order to address the above technical problems.
[0005] In one aspect, an in-band communication method is provided, the method comprising:
[0006] Establishing a communication link between the operating system and the baseboard management controller via an internal communication bus;
[0007] In response to the operating system receiving a user instruction inputted using a command line tool, sending the user instruction to the baseboard management controller via the communication link;
[0008] Performing data verification on the user instruction through the agent process of the baseboard management controller to determine whether the user instruction is valid;
[0009] In response to the user instruction being valid, the user instruction is analyzed and executed to obtain an execution result, and the execution result is returned to the operating system through the communication link.
[0010] In one embodiment, the internal communication bus includes a universal serial bus, and establishing a communication link between the operating system and the baseboard management controller through the internal communication bus includes:
[0011] Connecting the operating system to the baseboard management controller via a universal serial bus;
[0012] In response to the operating system requesting access to the baseboard management controller, determining whether the operating system has access rights;
[0013] In response to the operating system having access rights, a communication link between the operating system and the baseboard management controller is established by accessing a management interface of the baseboard management controller.
[0014] In one embodiment, before inputting the user command in the operating system using the command line tool and sending the user command to the baseboard management controller through the communication link, the method further includes:
[0015] Input a request command using the command line tool, and convert the request command into an intelligent platform management interface command and send it to the baseboard management controller, wherein the request command is used to turn on the control switch of the communication link;
[0016] In response to the baseboard management controller receiving the intelligent platform management interface command, opening the communication link and starting the agent process according to the intelligent platform management interface command;
[0017] The communication link opening message is returned to the operating system, so that the operating system loads the driver of the universal serial bus.
[0018] In one embodiment, the step of inputting a user command in the operating system using a command line tool and sending the user command to the baseboard management controller through the communication link includes:
[0019] determining whether a uniform resource identifier exists in the user instruction, the user instruction including a management instruction;
[0020] In response to the absence of a uniform resource identifier in the management instruction, encapsulating the management instruction in text form, and sending the encapsulated Redfish instruction to the baseboard management controller through the communication link and the intelligent platform management interface command;
[0021] In response to the existence of a uniform resource identifier in the management instruction, the uniform resource identifier is encapsulated, and the encapsulated uniform resource identifier is sent to the baseboard management controller through the communication link and the intelligent platform management interface command.
[0022] In one embodiment, the performing data verification on the user instruction by the agent process of the baseboard management controller to determine whether the user instruction is valid includes:
[0023] In response to the proxy process receiving the user instruction, performing data verification on the user instruction, the data verification including one or more of format verification, integrity verification, source verification and authority verification;
[0024] In response to the user instruction passing the data verification, determining that the user instruction is valid;
[0025] In response to the user instruction failing the data verification, an error message is returned.
[0026] In one embodiment, in response to the user instruction being valid, analyzing and executing the user instruction to obtain an execution result, and returning the execution result to the operating system through the communication link, includes:
[0027] In response to the user instruction being valid, extracting key information in the user instruction through the agent process;
[0028] Convert the extracted key information into standard management instructions as target instructions;
[0029] Determining an instruction type, a target path, and a target operation according to the target instruction, wherein the instruction type includes real-time monitoring, configuration update, fault diagnosis, and remote management;
[0030] Create a data table and establish a mapping relationship between the data table and the target instruction;
[0031] For the target instruction, query from a preset data table whether there is a unique index that is consistent with the target path and the target operation;
[0032] In response to the unique index existing in the data table, sending the target instruction to a web page server, so that the web page server executes a corresponding target operation according to the target path to obtain an execution result;
[0033] Returning the timestamp, target instruction and execution result corresponding to the user instruction to the command line data through the communication link, and updating the data table according to the execution result;
[0034] In response to the unique index not existing in the data table, an error message is returned.
[0035] In one embodiment, the method further comprises:
[0036] Polling the data table by the baseboard management controller to determine whether the data table is updated;
[0037] In response to the data table being updated, the updated data is written into the audit log.
[0038] In another aspect, an in-band communication device is provided, the device comprising:
[0039] A communication module, used to establish a communication link between the operating system and the baseboard management controller through an internal communication bus;
[0040] a control module, configured to send the user instruction to the baseboard management controller through the communication link in response to the operating system receiving the user instruction input by using the command line tool;
[0041] An analysis module, used to perform data verification on the user instruction through the proxy process of the baseboard management controller to determine whether the user instruction is valid;
[0042] The execution module is used for analyzing and executing the user instruction to obtain an execution result in response to the user instruction being valid, and returning the execution result to the operating system through the communication link.
[0043] In another aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0044] Establishing a communication link between the operating system and the baseboard management controller via an internal communication bus;
[0045] In response to the operating system receiving a user instruction inputted using a command line tool, sending the user instruction to the baseboard management controller via the communication link;
[0046] Performing data verification on the user instruction through the agent process of the baseboard management controller to determine whether the user instruction is valid;
[0047] In response to the user instruction being valid, the user instruction is analyzed and executed to obtain an execution result, and the execution result is returned to the operating system through the communication link.
[0048] In another aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0049] Establishing a communication link between the operating system and the baseboard management controller via an internal communication bus;
[0050] In response to the operating system receiving a user instruction inputted using a command line tool, sending the user instruction to the baseboard management controller via the communication link;
[0051] Performing data verification on the user instruction through the agent process of the baseboard management controller to determine whether the user instruction is valid;
[0052] In response to the user instruction being valid, the user instruction is analyzed and executed to obtain an execution result, and the execution result is returned to the operating system through the communication link.
[0053] The above-mentioned in-band communication method, device, computer equipment and storage medium directly establish a communication link between the operating system and the baseboard management controller at the hardware level through an internal communication bus, and can achieve efficient server management without configuring complex network routing and firewall rules. It is suitable for various network environments, including scenarios with no network, limited network or high security requirements, thereby getting rid of the IP communication limitations and network fault recovery difficulties encountered by customers when using traditional management interfaces, and meeting the diverse needs of different customers. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 is a flow chart of an in-band communication method in one embodiment;
[0055] Figure 2 A block diagram of a management framework structure of in-band communication in one embodiment;
[0056] Figure 3 is a flow chart of an in-band communication method according to another embodiment;
[0057] Figure 4 is a structural block diagram of an in-band communication device in one embodiment;
[0058] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0059] 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.
[0060] According to the background technology, Redfish is based on the HTTPS protocol framework and adopts the JSON data format. It is simple and easy to read and has the characteristics of clear structure, easy to understand, convenient to expand, high security, easy compatibility, etc. With the continuous development and improvement of Redfish, it has become the preferred standard for server and data center management.
[0061] The advantages of Redfish in-band communication technology are its convenience and compatibility. Whether it is a large device in a server room or a small workstation in a desktop office environment, as long as it is equipped with a USB interface, it is possible to quickly enable the Redfish in-band communication function through simple settings. By configuring LAN OVER USB for USB, configure the same network segment IP for the USB ports on the OS and BMC. Redfish in-band communication usually uses IP addresses for C / S access, and the default port is 443.
[0062] Therefore, traditional Redfish interface management often relies on IP network communication, which may encounter many challenges in certain scenarios, such as network failures, IP address conflicts, or environments with high security isolation requirements.
[0063] To overcome these limitations, this application proposes an innovative solution, namely, to implement Redfish interface management in-band on the server, independent of IP communication management. This technology directly establishes a communication link between the Redfish management interface and the server management software at the hardware level by utilizing the communication channels inside the server, such as PCIe, USB or other high-speed buses. In this way, even in the case of network interruption or limited IP communication, administrators can still use these internal channels to monitor the server in real time, update configurations, diagnose faults and remotely manage it.
[0064] In one embodiment, Figure 1-3 As shown, an in-band communication method is provided, comprising the following steps:
[0065] Step S1, establishing a communication link between an operating system and a baseboard management controller via an internal communication bus.
[0066] In an optional embodiment, the internal communication bus includes a universal serial bus, and establishing a communication link between the operating system and the baseboard management controller through the internal communication bus includes: connecting the operating system and the baseboard management controller through the universal serial bus; in response to the operating system requesting access to the baseboard management controller, determining whether the operating system has access rights; in response to the operating system having access rights, establishing a communication link between the operating system and the baseboard management controller by accessing a Redfish management interface of the baseboard management controller.
[0067] Among them, the Universal Serial Bus (USB) is a universal interface standard used to connect various devices, and SCSI data transmission can be performed using the USB channel. SCSI (Small Computer System Interface) is a data transmission method of existing USB technology. When using the USB channel for SCSI data transmission, an important advantage is that it does not rely on the client-server (CS) mode between a specific operating system OS and the baseboard management controller BMC. This means that whether it is Windows, Linux or other operating systems, or even embedded systems without an operating system, as long as they support USB and SCSI protocols, efficient data transmission can be achieved through this method.
[0068] Based on the above in-band communication steps, the communication link between the Redfish management interface and the server management software is established directly at the hardware level by using the server's internal communication channels, such as PCIe, USB or other high-speed buses, without the need to configure complex network routing and firewall rules. In this way, even in the case of network interruption or IP communication restriction, administrators can still use these internal channels to monitor the server in real time, update configurations, diagnose faults and remotely manage, eliminating the reliance on IP networks. In addition, internal communication channels are usually more secure than external networks, and can effectively prevent external attackers from invading the server management system through IP networks.
[0069] Step S2: inputting user instructions into the operating system using a command line tool, and sending the user instructions to the baseboard management controller through the communication link.
[0070] In an optional embodiment, before using the command line tool to input user instructions in the operating system and sending the user instructions to the baseboard management controller through the communication link, it also includes: using the command line tool to input a request command, and converting the request command into an intelligent platform management interface command and sending it to the baseboard management controller, wherein the request command is used to turn on the control switch of the communication link; in response to the baseboard management controller receiving the intelligent platform management interface command, opening the communication link and starting the agent process according to the intelligent platform management interface command; returning the communication link opening message to the operating system, so that the operating system loads the driver of the universal serial bus.
[0071] Among them, the command line tool can use IMSCLI (InManage Server CLI), which is a server operation and maintenance tool that can provide command line mode to manage server operation and maintenance. Users can open a command channel through IMSCLI. The agent process inside the BMC plays a vital role in the server management system. It is not only a bridge for BMC to communicate with the outside world, but also the core of data processing and command execution. When the BMC agent process receives the document sent from the operating system via the communication link, its data processing and overall processing flow are officially started.
[0072] Specifically, IMCLI uses the Intelligent Platform Management Interface (IPMI) command to send instructions to the BMC to request to open the USB in-band communication channel. After receiving the instruction from IMSCLI, the BMC immediately starts the proxy process to prepare for the upcoming communication. Among them, the proxy process is an important component inside the BMC. It is responsible for processing Redfish instructions from the outside (such as IMSCLI) and interacting with other management components inside the server through the USB in-band communication channel.
[0073] Based on the above in-band communication steps, the user opens the USB in-band communication channel through the IMSCLI input request command, and the BMC agent process is started to accurately process the upcoming Redfish command, thereby ensuring that even when the network is interrupted or restricted, the server can still be efficiently managed and monitored through the USB in-band communication channel.
[0074] In an optional embodiment, the method of inputting user instructions in the operating system using a command line tool and sending the user instructions to the baseboard management controller through the communication link includes: determining whether a uniform resource identifier exists in the user instructions, the user instructions including management instructions; in response to the absence of a uniform resource identifier in the management instructions, encapsulating the management instructions in text form, and sending the encapsulated management instructions to the baseboard management controller through the communication link and using an intelligent platform management interface command; in response to the presence of a uniform resource identifier in the management instructions, encapsulating the uniform resource identifier, and sending the encapsulated uniform resource identifier to the baseboard management controller through the communication link and using an intelligent platform management interface command.
[0075] The management instructions in this embodiment adopt Redfish instructions. During the transmission of Redfish instructions, IMSCLI supports two instruction forms, including text form transmission and actual instruction transmission.
[0076] Specifically, users can input standard Redfish commands through IMSCLI. These commands are encapsulated in text form and transmitted to BMC through IPMI commands and USB in-band communication channels. After receiving these text commands, the BMC agent process will parse them and perform corresponding management operations according to the command content. In addition to the text form, IMSCLI also supports direct transmission of the URL (Uniform Resource Locator) of Redfish commands, such as https: / / 127.0.0.1:port / xxxxxxxx. In this transmission mode, IMSCLI will encapsulate the complete URL command and send it to BMC. The BMC agent process will parse the command information in the URL and communicate with the management components inside the server through the USB in-band communication channel to complete the corresponding management tasks.
[0077] Based on the above in-band communication steps, in addition to the traditional actual command transmission, users can also transmit commands in text form. There is no need to perform complex network routing configuration on the BMC. Only basic IPMI commands need to be supported to achieve efficient server management, thus getting rid of dependence on the IP network. Even in a complex network environment, the availability and stability of the Redfish management interface can be ensured.
[0078] Step S3, performing data verification on the user instruction through the agent process of the baseboard management controller to determine whether the user instruction is valid.
[0079] In an optional embodiment, the agent process of the baseboard management controller performs data verification on the user instruction to determine whether the user instruction is valid, including: in response to the agent process receiving the user instruction, performing data verification on the user instruction, the data verification including one or more of format verification, integrity verification, source verification and permission verification; in response to the user instruction passing the data verification, determining that the user instruction is valid; in response to the user instruction failing the data verification, returning an error message.
[0080] Among them, data verification includes integrity verification and security verification. Integrity verification is used to check the integrity of data to ensure that the data is not lost or damaged during transmission. It can be achieved through checksums (such as CRC, MD5, etc.). Security verification is used to verify the source and authenticity of data to ensure that the data comes from a trusted source. It can be achieved through digital signatures, encryption, etc.
[0081] Based on the above in-band communication steps, the BMC agent process will strictly check and verify the received documents to ensure the integrity and security of the data and prevent malicious data or invalid instructions from posing potential threats to the server management system.
[0082] In an optional embodiment, the method further includes: in response to the proxy process receiving the user instruction, determining whether the user instruction requires authentication; capturing the message header, target path, network link and method name in the user instruction through the proxy process; extracting the target path and the message header in the user instruction, and determining whether the data source of the user instruction is in-band or out-of-band based on the target path and the message header; in response to the data source of the user instruction being in-band, extracting the network link and the method name in the user instruction; obtaining a pre-set target table, the target table being used to determine whether each Redfish request whose data source is in-band requires authentication; querying the network link and the method name in the user request from the pre-set target table, and determining whether the user request requires authentication based on the query result; in response to the presence of the network link and the method name in the target table, determining that the user request requires authentication.
[0083] Step S4, in response to the user instruction being valid, analyzing and executing the user instruction to obtain an execution result, and returning the execution result to the operating system through the communication link.
[0084] In an optional embodiment, in response to the user instruction being valid, analyzing and executing the user instruction to obtain an execution result, and returning the execution result to the operating system through the communication link, includes: in response to the user instruction being valid, extracting key information from the user instruction through the agent process; converting the extracted key information into a standard management instruction as a target instruction; determining the instruction type, target path and target operation according to the target instruction, the instruction type including real-time monitoring, configuration update, fault diagnosis and remote management; creating a data table, and establishing a mapping relationship between the data table and the target instruction; for the target instruction, querying from a preset data table whether there is a unique index consistent with the target path and the target operation; in response to the existence of the unique index in the data table, sending the target instruction to a web page server, so that the web page server executes the corresponding target operation according to the target path to obtain an execution result; returning the timestamp, target instruction and execution result corresponding to the user instruction to the command line data through the communication link, and updating the data table according to the execution result; in response to the absence of the unique index in the data table, returning an error message.
[0085] Specifically, once the data verification is passed, the BMC agent process will begin to parse it. It uses advanced parsing algorithms and powerful processing capabilities to extract information from the document and convert it into standard Redfish instructions as target instructions. As a modern hardware management standard, Redfish has a strict and standardized instruction format, which ensures the accuracy and executability of the instructions. The agent process sends the target instruction to the network server through the network (such as HTTP / HTTPS), thereby parsing the target instruction, and calling the corresponding internal module or external interface according to the parsed instruction to perform management operations and generate HTTP responses as execution results.
[0086] In an optional implementation, the method further includes: polling the data table by the baseboard management controller to determine whether the data table is updated; and in response to the data table being updated, writing the updated data into an audit log.
[0087] It should be understood that although Figure 1-3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0088] In one embodiment, Figure 4 As shown, an in-band communication device is provided, comprising: a communication module, a control module, an analysis module and an execution module, wherein:
[0089] A communication module, used to establish a communication link between the operating system and the baseboard management controller via a universal serial bus;
[0090] a control module, configured to send the user instruction to the baseboard management controller through the communication link in response to the operating system receiving the user instruction input by using the command line tool;
[0091] An analysis module, used for verifying and analyzing the user instructions by using the proxy process of the baseboard management controller;
[0092] The execution module is used for executing the user instruction to obtain an execution result in response to the user instruction passing the verification, and returning the execution result to the operating system through the communication link.
[0093] In one embodiment, the communication module is also used to connect the operating system and the baseboard management controller through a universal serial bus; in response to the operating system requesting access to the baseboard management controller, determine whether the operating system has access rights; in response to the operating system having access rights, establish a communication link between the operating system and the baseboard management controller by accessing the management interface of the baseboard management controller.
[0094] In one embodiment, the control module is also used to input a request command using the command line tool, and convert the request command into an intelligent platform management interface command and send it to the baseboard management controller, wherein the request command is used to turn on the control switch of the communication link; in response to the baseboard management controller receiving the intelligent platform management interface command, the communication link is opened and the agent process is started according to the intelligent platform management interface command; and the message of opening the communication link is returned to the operating system, so that the operating system loads the driver of the universal serial bus.
[0095] In one embodiment, the control module is also used to determine whether a uniform resource identifier exists in the user instruction, and the user instruction includes a management instruction; in response to the absence of a uniform resource identifier in the management instruction, the management instruction is encapsulated in text form, and the encapsulated management instruction is sent to the baseboard management controller through the communication link and the intelligent platform management interface command; in response to the presence of a uniform resource identifier in the management instruction, the uniform resource identifier is encapsulated, and the encapsulated uniform resource identifier is sent to the baseboard management controller through the communication link and the intelligent platform management interface command.
[0096] In one embodiment, the analysis module is also used to perform data verification on the user instruction in response to the proxy process receiving the user instruction, and the data verification includes one or more of format verification, integrity verification, source verification and authority verification; in response to the user instruction passing the data verification, determine that the user instruction is valid; in response to the user instruction failing the data verification, return an error message.
[0097] In one embodiment, the execution module is also used to extract key information from the user instruction through the proxy process in response to the user instruction being valid; convert the extracted key information into a standard management instruction as a target instruction; determine the instruction type, target path and target operation according to the target instruction, and the instruction type includes real-time monitoring, configuration update, fault diagnosis and remote management; create a data table and establish a mapping relationship between the data table and the target instruction; for the target instruction, query from a preset data table whether there is a unique index consistent with the target path and the target operation; in response to the existence of the unique index in the data table, send the target instruction to the web server, so that the web server executes the corresponding target operation according to the target path to obtain an execution result; return the timestamp, target instruction and execution result corresponding to the user instruction to the command line data through the communication link, and update the data table according to the execution result; in response to the non-existence of the unique index in the data table, return an error message.
[0098] In one embodiment, a statistical module is further included, and the statistical module is used to poll the data table through the baseboard management controller to determine whether the data table is updated; in response to the data table being updated, write the updated data into the audit log.
[0099] For the specific definition of the in-band communication device, please refer to the definition of the in-band communication method above, which will not be repeated here. Each module in the above-mentioned in-band communication device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned 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 in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0100] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data table data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an in-band communication method is implemented.
[0101] Those skilled in the art will understand that Figure 5The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0102] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0103] Establishing a communication link between the operating system and the baseboard management controller via an internal communication bus;
[0104] In response to the operating system receiving a user instruction inputted using a command line tool, sending the user instruction to the baseboard management controller via the communication link;
[0105] Performing data verification on the user instruction through the agent process of the baseboard management controller to determine whether the user instruction is valid;
[0106] In response to the user instruction being valid, the user instruction is analyzed and executed to obtain an execution result, and the execution result is returned to the operating system through the communication link.
[0107] In one embodiment, when the processor executes the computer program, the following steps are also implemented: connecting the operating system and the baseboard management controller via a universal serial bus; in response to the operating system requesting access to the baseboard management controller, determining whether the operating system has access rights; in response to the operating system having access rights, establishing a communication link between the operating system and the baseboard management controller by accessing the management interface of the baseboard management controller.
[0108] In one embodiment, when the processor executes the computer program, the following steps are also implemented: using the command line tool to input a request command, and converting the request command into an intelligent platform management interface command and sending it to the baseboard management controller, wherein the request command is used to turn on the control switch of the communication link; in response to the baseboard management controller receiving the intelligent platform management interface command, opening the communication link and starting the agent process according to the intelligent platform management interface command; returning the communication link opening message to the operating system, so that the operating system loads the driver of the universal serial bus.
[0109] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining whether a uniform resource identifier exists in the user instruction, the user instruction including a management instruction; in response to the absence of a uniform resource identifier in the management instruction, encapsulating the management instruction in text form, and sending the encapsulated management instruction to the baseboard management controller through the communication link and the intelligent platform management interface command; in response to the presence of a uniform resource identifier in the management instruction, encapsulating the uniform resource identifier, and sending the encapsulated uniform resource identifier to the baseboard management controller through the communication link and the intelligent platform management interface command.
[0110] In one embodiment, the processor further implements the following steps when executing the computer program: in response to the proxy process receiving the user instruction, performing data verification on the user instruction, the data verification including one or more of format verification, integrity verification, source verification and authority verification; in response to the user instruction passing the data verification, determining that the user instruction is valid; in response to the user instruction failing the data verification, returning an error message.
[0111] In one embodiment, when the processor executes the computer program, the following steps are also implemented: in response to the user instruction being valid, extracting key information from the user instruction through the proxy process; converting the extracted key information into a standard management instruction as a target instruction; determining the instruction type, target path and target operation according to the target instruction, the instruction type including real-time monitoring, configuration update, fault diagnosis and remote management; creating a data table, and establishing a mapping relationship between the data table and the target instruction; for the target instruction, querying from a preset data table whether there is a unique index consistent with the target path and the target operation; in response to the existence of the unique index in the data table, sending the target instruction to a web page server, so that the web page server executes the corresponding target operation according to the target path to obtain an execution result; returning the timestamp, target instruction and execution result corresponding to the user instruction to the command line data through the communication link, and updating the data table according to the execution result; in response to the absence of the unique index in the data table, returning an error message.
[0112] In one embodiment, when the processor executes the computer program, the following steps are also implemented: polling the data table through the baseboard management controller to determine whether the data table is updated; in response to the data table being updated, writing the updated data into the audit log.
[0113] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0114] Establishing a communication link between the operating system and the baseboard management controller via an internal communication bus;
[0115] In response to the operating system receiving a user instruction inputted using a command line tool, sending the user instruction to the baseboard management controller via the communication link;
[0116] Performing data verification on the user instruction through the agent process of the baseboard management controller to determine whether the user instruction is valid;
[0117] In response to the user instruction being valid, the user instruction is analyzed and executed to obtain an execution result, and the execution result is returned to the operating system through the communication link.
[0118] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: connecting the operating system and the baseboard management controller via a universal serial bus; in response to the operating system requesting access to the baseboard management controller, determining whether the operating system has access rights; in response to the operating system having access rights, establishing a communication link between the operating system and the baseboard management controller by accessing the management interface of the baseboard management controller.
[0119] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: using the command line tool to input a request command, and converting the request command into an intelligent platform management interface command and sending it to the baseboard management controller, wherein the request command is used to turn on the control switch of the communication link; in response to the baseboard management controller receiving the intelligent platform management interface command, opening the communication link and starting the agent process according to the intelligent platform management interface command; returning the communication link opening message to the operating system, so that the operating system loads the driver of the universal serial bus.
[0120] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining whether a uniform resource identifier exists in the user instruction, the user instruction including a management instruction; in response to the absence of a uniform resource identifier in the management instruction, encapsulating the management instruction in text form, and sending the encapsulated management instruction to the baseboard management controller through the communication link and the intelligent platform management interface command; in response to the presence of a uniform resource identifier in the management instruction, encapsulating the uniform resource identifier, and sending the encapsulated uniform resource identifier to the baseboard management controller through the communication link and the intelligent platform management interface command.
[0121] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in response to the proxy process receiving the user instruction, performing data verification on the user instruction, the data verification including one or more of format verification, integrity verification, source verification and authority verification; in response to the user instruction passing the data verification, determining that the user instruction is valid; in response to the user instruction failing the data verification, returning an error message.
[0122] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in response to the user instruction being valid, extracting key information from the user instruction through the proxy process; converting the extracted key information into a standard management instruction as a target instruction; determining the instruction type, target path and target operation according to the target instruction, wherein the instruction type includes real-time monitoring, configuration update, fault diagnosis and remote management; creating a data table, and establishing a mapping relationship between the data table and the target instruction; for the target instruction, querying from a preset data table whether there is a unique index consistent with the target path and the target operation; in response to the existence of the unique index in the data table, sending the target instruction to a web page server, so that the web page server executes the corresponding target operation according to the target path to obtain an execution result; returning the timestamp, target instruction and execution result corresponding to the user instruction to the command line data through the communication link, and updating the data table according to the execution result; in response to the absence of the unique index in the data table, returning an error message.
[0123] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: polling the data table by the baseboard management controller to determine whether the data table is updated; in response to the data table being updated, writing the updated data into the audit log.
[0124] In one embodiment, a computer product is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0125] Establishing a communication link between the operating system and the baseboard management controller via an internal communication bus;
[0126] In response to the operating system receiving a user instruction inputted using a command line tool, sending the user instruction to the baseboard management controller via the communication link;
[0127] Performing data verification on the user instruction through the agent process of the baseboard management controller to determine whether the user instruction is valid;
[0128] In response to the user instruction being valid, the user instruction is analyzed and executed to obtain an execution result, and the execution result is returned to the operating system through the communication link.
[0129] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: connecting the operating system and the baseboard management controller via a universal serial bus; in response to the operating system requesting access to the baseboard management controller, determining whether the operating system has access rights; in response to the operating system having access rights, establishing a communication link between the operating system and the baseboard management controller by accessing the management interface of the baseboard management controller.
[0130] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: using the command line tool to input a request command, and converting the request command into an intelligent platform management interface command and sending it to the baseboard management controller, wherein the request command is used to turn on the control switch of the communication link; in response to the baseboard management controller receiving the intelligent platform management interface command, opening the communication link and starting the agent process according to the intelligent platform management interface command; returning the communication link opening message to the operating system, so that the operating system loads the driver of the universal serial bus.
[0131] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining whether a uniform resource identifier exists in the user instruction, the user instruction including a management instruction; in response to the absence of a uniform resource identifier in the management instruction, encapsulating the management instruction in text form, and sending the encapsulated management instruction to the baseboard management controller through the communication link and using an intelligent platform management interface command; in response to the presence of a uniform resource identifier in the management instruction, encapsulating the uniform resource identifier, and sending the encapsulated uniform resource identifier to the baseboard management controller through the communication link and using an intelligent platform management interface command.
[0132] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in response to the proxy process receiving the user instruction, performing data verification on the user instruction, the data verification including one or more of format verification, integrity verification, source verification and authority verification; in response to the user instruction passing the data verification, determining that the user instruction is valid; in response to the user instruction failing the data verification, returning an error message.
[0133] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in response to the user instruction being valid, extracting key information from the user instruction through the proxy process; converting the extracted key information into a standard management instruction as a target instruction; determining the instruction type, target path and target operation according to the target instruction, wherein the instruction type includes real-time monitoring, configuration update, fault diagnosis and remote management; creating a data table, and establishing a mapping relationship between the data table and the target instruction; for the target instruction, querying from a preset data table whether there is a unique index consistent with the target path and the target operation; in response to the existence of the unique index in the data table, sending the target instruction to a web page server, so that the web page server executes the corresponding target operation according to the target path to obtain an execution result; returning the timestamp, target instruction and execution result corresponding to the user instruction to the command line data through the communication link, and updating the data table according to the execution result; in response to the absence of the unique index in the data table, returning an error message.
[0134] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: polling the data table by the baseboard management controller to determine whether the data table is updated; in response to the data table being updated, writing the updated data into the audit log.
[0135] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), 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).
[0136] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0137] The above-mentioned 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 invention patent. It should be pointed out that, for a person of ordinary skill in the art, 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 patent of the present application shall be subject to the attached claims.
Claims
1. An in-band communication method, characterized in that: include: Establishing a communication link between the operating system and the baseboard management controller via an internal communication bus; In response to the operating system receiving a user instruction input through a command line tool, sending the user instruction to the baseboard management controller through the communication link; Performing data verification on the user instruction through the agent process of the baseboard management controller to determine whether the user instruction is valid; In response to the user instruction being valid, the user instruction is analyzed and executed to obtain an execution result, and the execution result is returned to the operating system through the communication link.
2. The in-band communication method according to claim 1, characterized in that: The internal communication bus includes a universal serial bus, and the communication link between the operating system and the baseboard management controller is established through the internal communication bus, including: Connecting the operating system to the baseboard management controller via a universal serial bus; In response to the operating system requesting access to the baseboard management controller, determining whether the operating system has access rights; In response to the operating system having access rights, a communication link between the operating system and the baseboard management controller is established by accessing a management interface of the baseboard management controller.
3. The in-band communication method according to claim 2, characterized in that: Before inputting the user command in the operating system by using the command line tool and sending the user command to the baseboard management controller through the communication link, the method further includes: Input a request command using the command line tool, and convert the request command into an intelligent platform management interface command and send it to the baseboard management controller, wherein the request command is used to turn on the control switch of the communication link; In response to the baseboard management controller receiving the intelligent platform management interface command, opening the communication link and starting the agent process according to the intelligent platform management interface command; The communication link opening message is returned to the operating system, so that the operating system loads the driver of the universal serial bus.
4. The in-band communication method according to claim 2 or 3, characterized in that: The step of inputting a user command in the operating system using a command line tool and sending the user command to the baseboard management controller through the communication link includes: Determining whether a uniform resource identifier exists in the user instruction, the user instruction including a management instruction; In response to the absence of a uniform resource identifier in the management instruction, encapsulating the management instruction in text form, and sending the encapsulated management instruction to the baseboard management controller through the communication link and intelligent platform management interface command; In response to the existence of a uniform resource identifier in the management instruction, the uniform resource identifier is encapsulated, and the encapsulated uniform resource identifier is sent to the baseboard management controller through the communication link and the intelligent platform management interface command.
5. The in-band communication method according to claim 4, characterized in that: The performing data verification on the user instruction by the agent process of the baseboard management controller to determine whether the user instruction is valid includes: In response to the proxy process receiving the user instruction, performing data verification on the user instruction, the data verification including one or more of format verification, integrity verification, source verification and authority verification; In response to the user instruction passing the data verification, determining that the user instruction is valid; In response to the user instruction failing the data verification, an error message is returned.
6. The in-band communication method according to claim 1, characterized in that: In response to the user instruction being valid, analyzing and executing the user instruction to obtain an execution result, and returning the execution result to the operating system through the communication link, comprises: In response to the user instruction being valid, extracting key information in the user instruction through the agent process; Convert the extracted key information into standard management instructions as target instructions; Determining an instruction type, a target path, and a target operation according to the target instruction, wherein the instruction type includes real-time monitoring, configuration update, fault diagnosis, and remote management; Create a data table and establish a mapping relationship between the data table and the target instruction; For the target instruction, query from a preset data table whether there is a unique index that is consistent with the target path and the target operation; In response to the unique index existing in the data table, sending the target instruction to a web page server, so that the web page server executes a corresponding target operation according to the target path to obtain an execution result; Returning the timestamp, target instruction and execution result corresponding to the user instruction to the command line data through the communication link, and updating the data table according to the execution result; In response to the unique index not existing in the data table, an error message is returned.
7. The in-band communication method according to claim 6, characterized in that: The method further comprises: Polling the data table by the baseboard management controller to determine whether the data table is updated; In response to the data table being updated, the updated data is written into the audit log.
8. An in-band communication device, characterized in that: The device comprises: A communication module, used to establish a communication link between the operating system and the baseboard management controller through an internal communication bus; a control module, configured to send the user instruction to the baseboard management controller through the communication link in response to the operating system receiving the user instruction input by using the command line tool; An analysis module, used to perform data verification on the user instruction through the proxy process of the baseboard management controller to determine whether the user instruction is valid; The execution module is used for analyzing and executing the user instruction to obtain an execution result in response to the user instruction being valid, and returning the execution result to the operating system through the communication link.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
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 method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Data processing method and device, electronic equipment and storage medium
CN119847570A
Configuration recovery method of substrate management controller and substrate management controller
CN120086834A