SOL-based BIOS serial port log test system and method

The SOL-based BIOS serial port log testing system solves the problems of physical connection dependence and complex operation in traditional testing methods. It enables simultaneous capture and intuitive debugging of serial port logs from multiple servers, making it suitable for server BIOS development and debugging.

CN118916249AActive Publication Date: 2024-11-08百信信息技术有限公司
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410929141.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-11-08
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

Traditional BIOS serial port error checking tests require a physical connection to the serial cable, making it impossible to perform long-term tests on multiple servers simultaneously. The operation is complex and cannot save serial port information locally, resulting in an inability to perform intuitive debugging.

Method used

A BIOS serial port log testing system based on SOL is adopted. Through the SOL configuration policy platform, data acquisition platform, communication connection platform, intermediate platform, command platform and test platform, it is possible to simultaneously capture and save serial port logs of multiple servers without the need for physical serial port cable connection.

Benefits of technology

This feature allows for the simultaneous capture of serial port logs from multiple servers on a single client, which are then saved and displayed on the screen in real time. This simplifies operations, improves testing efficiency and intuitiveness, and is suitable for BIOS debugging of servers within a local area network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916249A_ABST
    Figure CN118916249A_ABST
Patent Text Reader

Abstract

The invention discloses an SOL-based BIOS serial port log test system and method, and the system comprises a log test system body which comprises an SOL configuration strategy platform, a data acquisition platform, a communication connection platform, an intermediate platform, an instruction platform, and a test platform. The SOL configuration strategy platform configures a unified UCS so as to record a console of the server from a blade on a UCS B infrastructure to an SoL function, and the data acquisition platform solves and stores a BMC IP, a user name and a password of the server. According to the method and the system, serial port logs of a plurality of servers are captured at the same time, physical connection of serial port lines is not needed, the client machine and the server BMC IP are in the same local area network, the serial port logs are printed on a window screen in real time while serial port information check is stored, and the general reason for crash of the machine is more visually debugged under the condition of crash.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field, and in particular to a BIOS serial port log testing system and method based on SOL. Background Art

[0002] Currently, when the BIOS starts to initialize the hardware and boot the OS, the BIOS operation log will be printed through the serial port. In this way, during the server development and debugging process, technicians can output the serial port log through the COM port, that is, connect the serial port line to view the output of the BIOS log in real time, and develop and debug the BIOS based on the BIOS log.

[0003] However, the traditional BIOS serial port error checking test has the following disadvantages:

[0004] (1) It mainly relies on the server under test to connect to the client through a serial port line. The client uses Putty and other serial port software to capture the serial port to check whether there are Error and Fail words on the serial port, and check whether the machine stops outputting at a specific position due to a crash;

[0005] (2) This method has the obvious disadvantage of relying on a physical serial line connection. One machine under test requires one client machine to capture it, which is not conducive to long-term testing of multiple servers at the same time and is complicated to operate.

[0006] (3) The client can log in to the BMC client through SSH and manually enable SOL through complex commands to print the serial port log, but the serial port information cannot be saved locally, or the serial port information saved locally cannot be printed on the screen, resulting in the inability to perform intuitive debugging and BIOS serial port log testing. Summary of the Invention

[0007] The object of the present invention is to provide a BIOS serial port log testing system and method based on SOL, so as to solve the problem proposed in the above background technology that it mainly relies on the tested server to be connected to the client through a serial port line, and the client captures the serial port through Putty serial port software to check whether there is Error or Fail on the serial port, and checks whether the serial port stops outputting at a specific position due to a machine crash; this method has obvious disadvantages: it must rely on the physical connection of the serial port line, and one client machine is required to capture one tested machine, which is not conducive to long-term testing of multiple servers at the same time, and the operation is complicated; the client logs in to the BMC client through SSH and manually uses complex instructions to start SOL to print the serial port log, but cannot save the serial port information locally, or the serial port information saved locally cannot be printed on the screen, resulting in the inability to perform intuitive debugging and BIOS serial port log testing.

[0008] To achieve the above object, the present invention provides the following technical solutions: a BIOS serial port log test system based on SOL, comprising a log test system body, wherein the log test system body comprises an SOL configuration policy platform, a data acquisition platform, a communication connection platform, an intermediate platform, an instruction platform and a test platform;

[0009] The SOL configuration policy platform configures the unified UCS to log the console of the server from the blade on the UCS B infrastructure to the SoL function;

[0010] The data acquisition platform obtains the server BMC IP, user name, and password and saves them;

[0011] The communication connection platform creates an SSH client using the paramiko library, sets `MissingHostKeyPolicy` as the default policy, which automatically adds and saves the remote host's SSH public key, and finally establishes an SSH connection using the information in step 1.

[0012] The intermediate platform defines a function for reading output in real time and saving it to a file;

[0013] The command platform executes commands and obtains outputs, and parameter commands are customized and modified according to BMCs of different manufacturers;

[0014] The test platform opens this application in different path windows of the client, enters different server information, and realizes simultaneous capture and inspection of serial port logs of multiple servers.

[0015] As a preferred technical solution of the present invention, the SOL configuration policy platform includes an SOL startup module, an SOL allocation module, and an SOL test module. The SOL startup module creates SoL policies to enable the SoL function. Log in to UCS Manager, select Servers>Policies>Serial Over LAN Policies, and click the [+] / New icon. The SOL allocation module applies SoL and BIOS changes to the service profile in use. Please note that if the SP is bound to a template, it must be unbound and then re-associated. The SOL test module performs real-time testing of the operational status of the SOL.

[0016] As a preferred technical solution of the present invention, the data acquisition platform includes a data acquisition module, a serial port switching module, a data reading module, a data comparison module, a data sending module and a data storage module. The data acquisition module acquires data from a data source, and after CPU processing, sends the acquired data from the serial port to the network card interface of the network card via a fixed path. The serial port switching module switches the serial port to SOL mode and establishes an SOL session through a standard IPMI command. The data reading module sets a time interval according to the performance of the motherboard and reads data from the network card interface. The data comparison module determines whether the data read from the network card interface is the same as the data sent from the serial port. The data sending module sends the acquired data from the network card to the serial port via a reverse path of the fixed path after CPU processing. The data storage module saves the server BMC IP, user name and password in the collected data.

[0017] As a preferred technical solution of the present invention, the communication connection platform includes a client creation module, a policy setting module, a public key addition module and a connection establishment module. The client creation module creates an SSH client through the Paramiko library, the policy setting module sets `MissingHostKeyPolicy` as the default policy, the public key addition module automatically adds and saves the SSH public key of the remote host, and the connection establishment module uses the information in step 1 to establish an SSH connection.

[0018] As a preferred technical solution of the present invention, the intermediate platform includes a function definition module and a file establishment module. The function definition module defines a function for real-time reading and output, and the file establishment module establishes files to be saved and opened for reading.

[0019] As an optimal technical solution of the present invention, the instruction platform includes an instruction acquisition module, an instruction output module and an instruction modification module. The instruction acquisition module acquires the executed commands, the instruction output module outputs the relevant instructions, and the instruction modification module customizes and modifies according to the BMC of different manufacturers.

[0020] As an optimal technical solution of the present invention, the test platform includes an information input module and a test extraction module. The information input module opens this application in different path windows of the client and inputs different server information. The test extraction module performs simultaneous capture and inspection tests on the serial port logs of multiple servers.

[0021] The present invention provides a method for using a BIOS serial port log testing system based on SOL, comprising the following steps:

[0022] Step 1: Data acquisition: The data acquisition platform requests the server BMC IP, username, and password and saves them;

[0023] Step 2: Establish a connection: The communication connection platform creates an SSH client using the Paramiko library, sets `MissingHostKeyPolicy` to the default policy, which automatically adds and saves the remote host's SSH public key, and finally establishes an SSH connection using the information in step 1.

[0024] Step 3. File setting: The intermediate platform defines a function to read the output in real time and save it to a file;

[0025] Step 4: Command setting: The command platform executes the command and obtains the output. The parameter command is customized according to the BMC of different manufacturers.

[0026] Step 5. Extraction test: The test platform opens this application in different path windows of the client, enters different server information, and realizes simultaneous capture and inspection of serial port logs of multiple servers.

[0027] Compared with the prior art, the present invention has the following beneficial effects:

[0028] By using this technical method, the invented software can be opened in multiple windows with different file paths on a client, and serial port logs of multiple servers can be captured at the same time without the need for physical connection of serial cables. It only requires that the client machine and the server BMC IP are in the same local area network. While saving the serial port information for inspection, the serial port log will be printed on the window screen in real time. In the event of a machine freeze, the general cause of the machine freeze can be debugged more intuitively. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 This is a schematic diagram of the architecture of the log test system of the present invention;

[0030] Figure 2 This is a schematic diagram of the architecture of the SOL configuration strategy platform of the present invention;

[0031] Figure 3 This is a schematic diagram of the architecture of the data acquisition platform of the present invention;

[0032] Figure 4 Schematic diagram of the architecture of the communication connection platform of the present invention;

[0033] Figure 5 This is a schematic diagram of the architecture of the intermediate platform of the present invention;

[0034] Figure 6 Schematic diagram of the architecture of the instruction platform of the present invention;

[0035] Figure 7 Schematic diagram of the architecture of the test platform of the present invention;

[0036] Figure 8 is a flow chart of the present invention;

[0037] Figure 9 This is a diagram of the operating results of the present invention. DETAILED DESCRIPTION

[0038] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0039] See also Figure 1-9 , the present invention provides a BIOS serial port log test system based on SOL, including a log test system body, the log test system body includes an SOL configuration policy platform, a data acquisition platform, a communication connection platform, an intermediate platform, an instruction platform and a test platform;

[0040] The SOL configuration policy platform configures the Unified UCS to log the console of the server from the blade on the UCS B infrastructure to the SoL function;

[0041] The data acquisition platform asks for the server BMC IP, username, and password and saves them;

[0042] The communication connection platform creates an SSH client using the Paramiko library, sets the MissingHostKeyPolicy policy to the default policy, which automatically adds and saves the remote host's SSH public key, and finally establishes an SSH connection using the information in step 1.

[0043] The intermediate platform defines a function for reading output in real time and saving it to a file;

[0044] The command platform executes commands and obtains outputs. Parameter commands are customized and modified according to BMCs of different manufacturers.

[0045] The test platform opens this application in different path windows on the client, enters different server information, and realizes simultaneous capture, inspection and testing of serial port logs of multiple servers.

[0046] The SOL configuration policy platform includes the SOL startup module, the SOL allocation module, and the SOL test module. The SOL startup module creates SoL policies to enable the SoL function. Log in to UCS Manager, select Servers>Policies>Serial Over LAN Policies, and click the [+] / New icon. The SOL allocation module applies SoL and BIOS changes to the service profile in use. Please note that if the SP is bound to the template, it must be unbound and then re-associated. The SOL test module performs real-time testing of the operational status of SOL.

[0047] The data acquisition platform includes a data acquisition module, a serial port switching module, a data reading module, a data comparison module, a data sending module and a data storage module. The data acquisition module acquires data from the data source, and after the acquired data is processed by the CPU, it is sent from the serial port to the network card interface of the network card via a fixed path. The serial port switching module switches the serial port to SOL mode and establishes an SOL session through a standard IPMI command. The data reading module sets the time interval according to the performance of the motherboard and reads data from the network card interface. The data comparison module determines whether the data read from the network card interface is the same as the data sent from the serial port. The data sending module processes the acquired data by the CPU and sends it from the network card to the serial port via the reverse path of the fixed path. The data storage module saves the server BMC IP, user name and password in the collected data.

[0048] The communication connection platform includes a client creation module, a policy setting module, a public key addition module, and a connection establishment module. The client creation module creates an SSH client using the Paramiko library. The policy setting module sets the `MissingHostKeyPolicy` as the default policy. The public key addition module automatically adds and saves the remote host's SSH public key. The connection establishment module uses the information in step 1 to establish an SSH connection.

[0049] The intermediate platform includes a function definition module and a file establishment module. The function definition module defines a function for real-time reading and output, and the file establishment module establishes files to be saved and opened for reading.

[0050] The instruction platform includes an instruction acquisition module, an instruction output module and an instruction modification module. The instruction acquisition module acquires the executed commands, the instruction output module outputs the relevant instructions, and the instruction modification module customizes and modifies according to the BMC of different manufacturers.

[0051] The test platform includes an information input module and a test extraction module. The information input module opens this application in different path windows of the client and inputs different server information. The test extraction module simultaneously captures and checks the serial port logs of multiple servers.

[0052] The present invention provides a method for using a BIOS serial port log testing system based on SOL, comprising the following steps:

[0053] Step 1: Data acquisition: The data acquisition platform requests the server BMC IP, username, and password and saves them;

[0054] Step 2: Establish a connection: The communication connection platform creates an SSH client using the Paramiko library, sets `MissingHostKeyPolicy` to the default policy, which automatically adds and saves the remote host's SSH public key, and finally establishes an SSH connection using the information in step 1.

[0055] Step 3. File setting: The intermediate platform defines a function to read the output in real time and save it to a file;

[0056] Step 4: Command setting: The command platform executes the command and obtains the output. The parameter command is customized according to the BMC of different manufacturers.

[0057] Step 5. Extraction test: The test platform opens this application in different path windows of the client, enters different server information, and realizes simultaneous capture and inspection of serial port logs of multiple servers.

[0058] In the present invention, the data acquisition platform requests the server BMC IP, username, and password and saves them; the communication connection platform creates an SSH client through the paramiko library, sets the `MissingHostKeyPolicy` as the default policy, that is, automatically adds and saves the remote host's SSH public key, and finally uses the information in step 1 to establish an SSH connection; the intermediate platform defines a function for reading the output in real time and saving it to a file; the instruction platform executes the command and obtains the output, and the parameter instructions are customized and modified according to different manufacturers' BMCs; the test platform opens this application in different path windows on the client, enters different server information, and realizes the simultaneous capture, inspection and testing of serial port logs of multiple servers.

[0059] In this invention, the server BMC IP, username, and password are requested and saved. The SSH client is created through the paramiko library. The `MissingHostKeyPolicy` is set as the default policy, which automatically adds and saves the remote host's SSH public key. Finally, the SSH connection is established using the information in step 1:

[0060] #Create SSH client

[0061] client = paramiko.SSHClient()

[0062] #Set `MissingHostKeyPolicy` to the default policy, which automatically adds and saves the SSH public key of the remote host

[0063] client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

[0064] #Connect to remote server

[0065] client.connect(server_ip,username=username,password=password)

[0066] Define a function to read the output in real time and save it to a file: def read_output(output):

[0067] now = datetime.now().strftime("%Y%m%d_%H%M%S") #Get the current time as the file name

[0068] filename=f"BIOS_log_{now}.txt"#Build log file name

[0069] with open(filename,'w')as file:

[0070] for line in output:

[0071] line = line.strip()

[0072] print(line)

[0073] file.write(line+'\n')

[0074] Execute the command and obtain the output. The parameter instructions are customized according to the BMC of different manufacturers:

[0075] stdin,stdout,stderr=client.exec_command('ipmcset-t sol-dactivate-v10',get_pty=True), open this application in different path windows of the client, enter different server information, and realize the simultaneous capture and inspection of serial port logs of multiple servers. Figure 9 Double-click Test.exe and click Start in the UI window that appears. Enter the BMC related information and start collecting the BIOS serial port log and save it to the same directory as the software.

[0076] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A BIOS serial port log test system based on SOL, comprising a log test system body, characterized in that: The log test system body includes a SOL configuration strategy platform, a data acquisition platform, a communication connection platform, an intermediate platform, an instruction platform and a test platform; The SOL configuration policy platform configures the unified UCS to log the console of the server from the blade on the UCS B infrastructure to the SoL function; The data acquisition platform obtains and saves the server BMC IP, user name, and password; The communication connection platform creates an ssh client through the paramiko library, sets `MissingHostKeyPolicy` as the default policy, that is, automatically adds and saves the SSH public key of the remote host, and finally uses the information in step 1 to establish an ssh connection; The intermediate platform defines a function for reading output in real time and saving it to a file; The command platform executes commands and obtains outputs, and parameter commands are customized and modified according to BMCs of different manufacturers; The test platform opens the application in different path windows of the client, inputs different server information, and realizes simultaneous capture and inspection of serial port logs of multiple servers.

2. A BIOS serial port log test system based on SOL according to claim 1, characterized in that: The SOL configuration policy platform includes the SOL startup module, the SOL allocation module and the SOL test module. The SOL startup module creates the SoL policy to enable the SoL function. Log in to UCS Manager, select Servers>Policies>Serial Over LAN Policies, and click the [+] / New icon. The SOL allocation module applies SoL and BIOS changes to the service profile in use. Please note that if the SP is bound to a template, it must be unbound and then reassociated. The SOL test module performs real-time testing of the operational status of the SOL.

3. A BIOS serial port log test system based on SOL according to claim 1, characterized in that: The data acquisition platform includes a data acquisition module, a serial port switching module, a data reading module, a data comparison module, a data sending module and a data storage module. The data acquisition module acquires data from a data source, and sends the acquired data from the serial port to the network card interface of the network card via a fixed path after being processed by the CPU. The serial port switching module switches the serial port to SOL mode and establishes a SOL session through a standard IPMI command. The data reading module sets a time interval according to the performance of the motherboard and reads data from the network card interface. The data comparison module determines whether the data read from the network card interface is the same as the data sent from the serial port. The data sending module sends the acquired data from the network card to the serial port via a reverse path of the fixed path after being processed by the CPU. The data storage module saves the server BMC IP, user name and password in the collected data.

4. A BIOS serial port log test system based on SOL according to claim 1, characterized in that: The communication connection platform includes a client creation module, a policy setting module, a public key adding module and a connection establishment module. The client creation module creates an ssh client through the paramiko library, the policy setting module sets `MissingHostKeyPolicy` as the default policy, the public key adding module automatically adds and saves the SSH public key of the remote host, and the connection establishment module uses the information in step 1 to establish an ssh connection.

5. A BIOS serial port log test system based on SOL according to claim 1, characterized in that: The intermediate platform includes a function definition module and a file establishment module. The function definition module defines a function for real-time reading and output, and the file establishment module establishes files to be saved and opened for reading.

6. A BIOS serial port log test system based on SOL according to claim 1, characterized in that: The instruction platform includes an instruction acquisition module, an instruction output module and an instruction modification module. The instruction acquisition module acquires the executed commands, the instruction output module outputs the relevant instructions, and the instruction modification module performs customization and modification according to BMCs of different manufacturers.

7. A BIOS serial port log test system based on SOL according to claim 1, characterized in that: The test platform includes an information input module and a test extraction module. The information input module opens the application in different path windows of the client and inputs different server information. The test extraction module performs simultaneous capture and inspection tests of serial port logs of multiple servers.

8. A method for using a BIOS serial port log test system based on SOL according to any one of claims 1 to 7, characterized in that: The following steps are involved: Step 1: Data acquisition: The data acquisition platform requests the server BMC IP, user name, and password and saves them; Step 2: Establish a connection: The communication connection platform creates an ssh client through the paramiko library, sets `MissingHostKeyPolicy` as the default policy, which automatically adds and saves the SSH public key of the remote host, and finally uses the information in step 1 to establish an ssh connection; Step 3: File setting: The intermediate platform defines a function to read the output in real time and save it to a file; Step 4: Command setting: The command platform executes the command and obtains the output. The parameter command is customized according to the BMC of different manufacturers. Step 5. Extraction test: The test platform opens this application in different path windows of the client, enters different server information, and realizes simultaneous capture and inspection of serial port logs of multiple servers.

Citation Information

Patent Citations

  • Method for out-of-band obtaining and recording of server serial interface log independent of SOL

    CN104572421A

  • SOL-based signal screen capture information collection method and device

    CN112463517A

  • Batch synchronous detection method and system for multiple computers

    CN112905403A

  • Serial port information monitoring method and system based on BMC, terminal and storage medium

    CN116204383A

  • Deep-learning systems and methods related to automated resolution of breaking changes in microservice-based software applications

    US20240193077A1