A BIOS serial port log testing system and method based on SOL

By designing a SOL-based BIOS serial port log testing system, the limitation of relying on physical serial port line connection in traditional testing methods is solved, and the serial port logs of multiple servers are simultaneously crawled, printed and saved in real time while wirelessly connecting, improving testing efficiency and intuitiveness.

CN118916249BActive Publication Date: 2025-03-14百信信息技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional BIOS serial port error checking test relies on physical serial port line connection, limiting the ability of multiple servers to conduct long-term testing at the same time, and the operation is complicated, making it impossible to realize intuitive debugging and BIOS serial port log storage and printing.

Method used

A BIOS serial port log testing system based on SOL was designed. Through the SOL configuration policy platform, data acquisition platform, communication connection platform, intermediate platform, instruction platform and test platform, it can capture the serial port logs of multiple servers without physical serial port line connection, and print and save them in real time on the client.

Benefits of technology

It realizes that the serial logs of multiple servers can be captured at the same time without physical serial port connection on one client, and prints and saves them in real time on the client, simplifying operations and improving testing efficiency and intuitiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916249B_ABST
    Figure CN118916249B_ABST
Patent Text Reader

Abstract

The invention discloses a BIOS serial port log test system and method based on SOL, comprising a log test system body, wherein the log test system body comprises 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 strategy platform configures a unified UCS to record the console of a server from a blade on a UCS B infrastructure to a SoL function, and the data acquisition platform obtains and saves the server BMC IP, user name, and password. The invention uses the technical method to open multiple windows and open the invention software with different file paths on a client, and simultaneously captures the serial port logs of multiple servers without the need for physical connection with a serial port line, and only requires that the client machine and the server BMC IP are in the same local area network, and while saving the serial port information check, the serial port log is printed on a window screen in real time, so that when a machine freezes, the general cause of the machine freeze can be debugged more intuitively.
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] At present, when 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 to the serial port line to view the output of the BIOS log in real time, and develop and debug the BIOS according to 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 is Error or Fail 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 that it must rely on the physical connection of the serial port line. One machine under test requires one client machine to capture, which is not conducive to long-term testing of multiple servers at the same time, and the operation is complicated;

[0006] (3) The client can log in to the BMC client through SSH and manually start 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 purpose 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 the tested server is mainly relied on to connect to the client through a serial port line, and the client grabs the serial port through Putty serial port software to check whether there are Error and Fail words on the serial port, and whether the machine stops outputting at a specific position due to a dead serial port; this method has obvious disadvantages that it must rely on the physical connection of the serial port line, and one tested machine requires one client machine to grab, 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 opens SOL to print the serial port log through complex instructions, 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 problem that intuitive debugging and BIOS serial port log testing cannot be performed.

[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 a SOL configuration strategy 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 and saves the server BMC IP, user name, and password;

[0011] 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;

[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 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.

[0015] As a preferred technical solution of the present invention, the SOL configuration policy platform includes a SOL startup module, a SOL allocation module and a SOL test module. The SOL startup module creates a 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 on the operating 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 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 mainboard 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.

[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 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.

[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 a preferred 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 is customized and modified according to the BMC of different manufacturers.

[0020] As a preferred technical solution of the present invention, 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 on serial port logs of multiple servers.

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

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

[0023] 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;

[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 the technical method invention, multiple windows are opened with different file paths on a client to open the invented software, and serial port logs of multiple servers are captured at the same time without the need for physical connection of serial port cables. It only requires that the client machine and the server BMC IP be in the same local area network, and while saving the serial port information for inspection, the serial port log will be printed on the window screen in real time. When a machine freezes, 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 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 It is a schematic diagram of the architecture of the communication connection platform of the present invention;

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

[0034] Figure 6 It is a schematic diagram of the architecture of the instruction platform of the present invention;

[0035] Figure 7 It is a 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] Fig. 9 It is the operation result diagram 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 described embodiments 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 work 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 a SOL configuration strategy 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, user name, and password and saves them;

[0042] 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;

[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 of the client, inputs different server information, and realizes simultaneous capture and inspection 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 a template, it must be unbound and then reassociated. 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 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 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 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.

[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 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. 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 is customized and modified 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 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.

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

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

[0054] 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;

[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, user name, and password and saves them; 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 real-time reading output and saving it to a file; the instruction platform executes commands and obtains output, and the parameter instructions are customized and modified according to the BMC of different manufacturers; the test platform opens this application in different path windows of the client, enters different server information, and realizes simultaneous capture, inspection and testing of serial port logs of multiple servers.

[0059] In the present invention, the server BMC IP, username, and password are requested and saved, an SSH client is created through the paramiko library, and the `MissingHostKeyPolicy` is set as the default policy, that is, the SSH public key of the remote host is automatically added and saved, and 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 simultaneous capture and inspection of serial port logs of multiple servers. Fig. 9 , double-click Test.exe and a UI window will pop up, click Start, enter BMC related information, and start collecting BIOS serial port logs and saving them in 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 protection scope 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 requests the server BMC IP, user name, and password and saves them; 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 an SOL startup module, an SOL allocation module and an SOL test module. The SOL startup module creates an SOL policy to enable the SOL function, logs in to UCS Manager, selects Servers, Policies, Serial Over LAN Policies in sequence, and clicks the + / New icon. The SOL allocation module applies SOL and BIOS changes to the service profile in use. If the SP is bound to a template, it must be unbound and then reassociated. The SOL test module performs real-time testing on the operating 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

  • Batch synchronous detection method and system for multiple computers

    CN112905403A

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

    US20240193077A1