A GUI-based BIOS remote automation control system

Through a GUI-based system under the Linux character interface and combining multiple technologies, remote automation control of BIOS is realized, solving the problems of low efficiency and inability to automate tests in traditional manual testing, and achieving efficient and accurate BIOS testing.

CN115080135BActive Publication Date: 2025-03-11INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210887357.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-26
Publication Date
2025-03-11
Estimated Expiration
2042-07-26

AI Technical Summary

Technical Problem

Traditional manual testing of BIOS is inefficient and error-prone, and cannot realize automated BIOS testing, resulting in high testing costs and the inability to test multiple servers concurrently.

Method used

Through a GUI-based system, combined with IPMI V2.0, Xvfb, xdotool and other technologies, remote automation control of BIOS is realized under the Linux character interface, and multiple servers are supported in parallel testing.

Benefits of technology

It realizes automated testing of BIOS, improves testing efficiency, reduces manpower investment, reduces testing costs, and supports concurrent testing of multiple servers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115080135B_ABST
    Figure CN115080135B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of servers, and in particular to a system for realizing remote automatic control of BIOS based on GUI, comprising a target machine, an application layer, a GUI operation layer and an Xserver layer, and realizing non-graphical operation of GUI in a Linux character interface by simulating the GUI processing process of a C / S architecture. By starting multiple terminal terminals at the same time and simulating key operations in multiple terminals at the same time, the system has the ability to test multiple servers in parallel. It basically covers all current test scenarios: POST interface information acquisition and key operations, single key and combination key operations, BIOS page switching, BIOS item search and positioning, entering and exiting BIOS items, modifying and saving option values, etc., which improves the test execution efficiency, and the programmed operation ensures the test accuracy, thereby improving the quality of server products.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of servers, and in particular to a system for realizing BIOS remote automatic control based on GUI under Linux character interface. Background Art

[0002] BIOS (Basic Input Output System) usually refers to the program fixed in the BIOS chip, which provides the lowest-level and most direct hardware control for the computer. BIOS startup is the state without network connection before OS startup. In the traditional server testing process, the BIOS program is controlled by manually viewing the BIOS interface and manually operating the buttons, so as to complete the testing of various BIOS-related scenarios.

[0003] In order to improve the test efficiency, the automated testing of BIOS-related scenarios is realized. It is necessary to realize remote and automatic viewing of BIOS information and use buttons to control the BIOS program to complete various operations. However, the traditional manual testing of BIOS has many repetitive operation steps. When performing interface information check type tests, it is necessary to switch interfaces back and forth and manually record and compare a large amount of data, which is inefficient and prone to errors. There are shortcomings such as manual repetitive operations, low efficiency, large manpower investment, high testing costs, easy errors when processing a large amount of data, and the inability to test multiple servers concurrently. Summary of the invention

[0004] In order to solve the technical problem that BIOS cannot be tested automatically and avoid various shortcomings of manual testing, the present invention provides a system for realizing remote automatic control of BIOS based on GUI (Graphical User Interface), which converts the manual testing process into automated testing, improves testing efficiency and saves labor costs; through the mutual coordination of multiple technologies such as IPMIV2.0, Xvfb, xdotool, etc., combined with the characteristics and advantages of languages ​​such as python and shell, the goal of realizing parallel automated testing of multiple servers in the Linux character interface is achieved.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] In a first aspect, in an embodiment provided by the present invention, a system for implementing BIOS remote automation control based on GUI is provided, comprising a target machine, an application layer, a GUI operation layer and an Xserver layer;

[0007] The target machine is the BIOS of the machine to be tested. The goal is to operate the POST and BIOS interface in all directions and obtain various information of the machine to be tested to meet various scenarios of current BIOS testing;

[0008] The application layer is used to implement the serial port communication function ipmitool sol based on the IPMI V2.0 specification, and communicate with the remote server through the serial port;

[0009] The GUI operation layer includes gnome-terminal to start the terminal. After multiple terminals are started, the terminal should be focused and key operations should be simulated in time to control the remote serial port communication process in the terminal. The GUI operation layer also includes a data parsing module for converting user requests into data processing, key operations and data return parts.

[0010] The Xserver layer is a C / S architecture in the Linux graphical interface operation, and the Xserver is started silently.

[0011] As a further solution of the present invention, the application layer is also used to set ipmitool, output communication information to the bios_info.txt file, configure parameters such as the serial port and baud rate for remote and local communication, and set the BIOS language to English.

[0012] As a further solution of the present invention, the application layer is also used to obtain the data of the current running of the machine under test in real time for analysis and processing by the data analysis module.

[0013] As a further solution of the present invention, when the GUI operation layer starts the terminal through gnome-terminal, the terminal is started silently to carry the operation of the serial communication process. By naming the terminal, multiple terminals can be started at the same time, isolated from each other and not interfering with each other.

[0014] As a further solution of the present invention, when the GUI operation layer is used to control the remote serial port communication process in the terminal, it includes:

[0015] Find all terminal terminals;

[0016] Get the terminal name through the terminal ID to determine whether it is the specified terminal to be operated;

[0017] Focus on the specified terminal by terminal ID;

[0018] The operation buttons are equipped with up, down, left, and right arrows for inputting information.

[0019] As a further solution of the present invention, the data parsing module is used to locate pages and items and obtain information, process key requests and input information functions.

[0020] As a further solution of the present invention, the page and item positioning and obtaining information includes:

[0021] When the user calls the tool of the system that implements BIOS remote automation control based on GUI, the page and entry to be obtained are passed in. The data parsing module automatically switches pages and searches up and down entries by parsing bios_info.txt in real time, and returns the processing results together with the BIOS interface information to the user.

[0022] As a further solution of the present invention, when processing the data, the data analysis module cleans the color and format control escape sequences in the data to obtain pure data.

[0023] As a further solution of the present invention, when the data parsing module locates pages and entries, the corresponding format features are obtained when an entry is selected according to the format features of the BIOS interface.

[0024] As a further solution of the present invention, when simply processing a key request, the user only passes in a key list, and the module presses the received keys one by one; when inputting information function, the user passes in a string to be input, and after the data parsing module receives the input string, it clears the current information and inputs the string input by the user through the xdotool type "string" command.

[0025] As a further solution of the present invention, the data analysis module parses bios_info.txt in real time during data analysis, automatically switches pages, and searches up and down entries; returns the processing results together with BIOS interface information to the user; wherein, when performing data processing, processing is performed separately according to the different colors and styles displayed on the BIOS interface of different versions.

[0026] In a second aspect, in another embodiment provided by the present invention, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of implementing BIOS remote automation control based on GUI when loading and executing the computer program.

[0027] In a third aspect, in another embodiment provided by the present invention, a storage medium is provided, which stores a computer program, and when the computer program is loaded and executed by a processor, the steps of realizing the GUI-based remote automation control of BIOS are implemented.

[0028] The technical solution provided by the present invention has the following beneficial effects:

[0029] The system for realizing BIOS remote automatic control based on GUI provided by the present invention realizes the non-graphical operation of GUI in Linux character interface by simulating the GUI processing process of C / S architecture. By starting multiple terminal terminals at the same time and simulating key operations in multiple terminals at the same time, it has the ability to test multiple servers in parallel. It basically covers all current test scenarios: POST interface information acquisition and key operations, single key and combination key operations, BIOS page switching, BIOS item search and positioning, entering and exiting BIOS items, modifying and saving option values, etc.

[0030] The tool implemented based on the present invention can be divided into two parts: deployment and calling. The environment is deployed once on the execution machine. When testing, the tool is called as needed and the corresponding parameters are passed in to complete the goal of automated testing of the BIOS of the machine under test. The tool supports replication and concurrent calling, and can test multiple servers at the same time.

[0031] The present invention realizes the tool foundation of automated BIOS testing, and operates BIOS in real time through flexible operation tools and free combination of keys to meet the testing needs of various scenarios. Automated operation reduces manpower input, improves test execution efficiency, and programmed operation ensures test accuracy, thereby improving server product quality.

[0032] These and other aspects of the present invention will be more clearly understood in the following description of the embodiments. It should be understood that the above general description and the following detailed description are only exemplary and explanatory and cannot limit the present invention.

[0033] These and other aspects of the present invention will be more clearly understood in the following description of the embodiments. It should be understood that the above general description and the following detailed description are only exemplary and explanatory and cannot limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments of the present invention. In the drawings:

[0035] Figure 1 The present invention is a schematic diagram of a system logic process for implementing BIOS remote automation control based on GUI according to an embodiment of the present invention.

[0036] Figure 2 The present invention is a schematic diagram of the structure of a computer device of a system for implementing BIOS remote automatic control based on GUI according to an embodiment of the present invention. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in 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 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 creative work are within the scope of protection of the present invention.

[0038] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0039] It should be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0040] Due to the improvement of test efficiency, automated testing of BIOS-related scenarios is realized. It is necessary to realize remote and automatic viewing of BIOS information and use buttons to control the BIOS program to complete various operations. Traditional manual testing of BIOS has many repetitive steps. When performing interface information check type tests, it is necessary to switch interfaces back and forth and manually record and compare a large amount of data, which is inefficient and prone to errors. There are shortcomings such as manual repetitive operations, low efficiency, large manpower investment, high testing costs, easy errors when processing a large amount of data, and inability to test multiple servers concurrently.

[0041] In order to solve the technical problem that BIOS cannot be tested automatically and avoid various shortcomings of manual testing, the present invention provides a system for realizing remote automatic control of BIOS based on GUI, which converts the manual testing process into automatic testing, improves testing efficiency and saves labor costs; through the mutual coordination of multiple technologies such as IPMI V2.0, Xvfb, xdotool, etc., combined with the characteristics and advantages of languages ​​such as python and shell, the goal of realizing parallel automatic testing of multiple servers in the Linux character interface is achieved.

[0042] Specifically, the embodiments of the present invention are further described below in conjunction with the accompanying drawings.

[0043] See also Figure 1 , Figure 1 FIG. 1 is a schematic diagram of a system logic process for implementing BIOS remote automation control based on a GUI according to an embodiment of the present invention. Figure 1As shown, in one embodiment provided by the present invention, a system for implementing BIOS remote automatic control based on GUI is provided, including a target machine, an application layer, a GUI operation layer and an Xserver layer.

[0044] The target machine is the BIOS of the machine to be tested. The goal is to operate the POST and BIOS interface in all directions and obtain various information of the machine to be tested to meet various scenarios of current BIOS testing;

[0045] The application layer is used to implement the serial port communication function ipmitool sol based on the IPMI V2.0 specification, and communicate with the remote server through the serial port;

[0046] The GUI operation layer includes gnome-terminal to start the terminal. After multiple terminals are started, the terminal should be focused and key operations should be simulated in time to control the remote serial port communication process in the terminal. The GUI operation layer also includes a data parsing module for converting user requests into data processing, key operations and data return parts.

[0047] The Xserver layer is a C / S architecture in the Linux graphical interface operation, and the Xserver is started silently.

[0048] See also Figure 1 As shown, the system for realizing BIOS remote automatic control based on GUI in Linux character interface provided by the embodiment of the present invention realizes the non-graphical operation of GUI in Linux character interface by simulating the GUI processing process of C / S architecture. By starting multiple terminal terminals at the same time and simulating key operations in multiple terminals at the same time, it has the ability to test multiple servers in parallel. It basically covers all current test scenarios: POST interface information acquisition and key operations, single key and combination key operations, BIOS page switching, BIOS item search and location, entering and exiting BIOS items, modifying and saving option values, etc.

[0049] In the embodiment of the present application, the system for implementing BIOS remote automation control based on GUI under the Linux character interface provided by the embodiment of the present invention is divided into a target machine, an application layer, a GUI operation layer and an Xserver layer according to the startup order and the interaction relationship.

[0050] In the embodiment of the present invention, the target machine corresponds to the BIOS of the machine to be tested, that is, the object to be tested. The goal is to be able to fully operate the POST and BIOS interface and obtain various information of the machine to be tested to meet various scenarios of current BIOS testing.

[0051] In an embodiment of the present invention, the application layer is also used to set ipmitool, output communication information to the bios_info.txt file, configure parameters such as the serial port and baud rate for remote and local communication, and set the BIOS language to English.

[0052] In an embodiment of the present invention, the serial port communication function ipmitool sol implemented by the application layer based on the IPMI V2.0 specification can communicate with the remote server through the serial port. In addition, ipmitool is set to output communication information to the bios_info.txt file, configure the serial port and baud rate parameters for remote and local communication, set the BIOS language to English, and obtain the data of the current machine under test in real time, so as to facilitate the parsing and processing by the data parsing module.

[0053] Therefore, the application layer is also used to obtain the data of the current machine under test in real time for analysis and processing by the data analysis module.

[0054] The execution method is: ipmitool -I lanplus -H "bmc_ip" -U "bmc_user" -P "bmc_pwd" sol activate > bios_info.txt.

[0055] Write this command in bios_sol_control.sh, start it with the gnome-terminal terminal, and print the information sent back by the remote machine to bios_info.txt in real time.

[0056] In an embodiment of the present invention, when the GUI operation layer starts the terminal through gnome-terminal, the terminal is started silently to carry the operation of the serial communication process. By naming the terminal, multiple terminals can be started at the same time, isolated from each other and not interfering with each other.

[0057] Among them, the instruction os.system("gnome-terminal --tab -t terminal name --bash -c 'chmod 777*;. / bios_sol_control.sh log path bmc_ip bmc_user bmc_pwd'") completes the startup of the shell script bios_sol_control.sh in the terminal named with "terminal name", and passes the four parameters of "log path", "bmc_ip", "bmc_user" and "bmc_pwd" to bios_sol_control.sh.

[0058] In the embodiment of the present invention, in the GUI operation layer, after multiple terminals are started, it is necessary to timely focus on the terminal and simulate key operations to control the remote serial port communication process in the terminal.

[0059] When the GUI operation layer controls the remote serial port communication process in the terminal, it includes:

[0060] 1) Find all terminal terminals;

[0061] xdotool search-class "gnome-terminal" returns a list of terminal IDs.

[0062] 2) Obtain the terminal name through the terminal ID to determine whether it is the designated terminal to be operated;

[0063] xdotool getwindowname$ID.

[0064] 3) Focus on the specified terminal through the terminal ID;

[0065] xdotool windowsfocus $ID

[0066] 4) The operation buttons are equipped with up, down, left, and right arrows for inputting information.

[0067] Among them, the operation buttons involved in the embodiments of the present application include up, down, left, and right arrows (Up Down LeftRight), Enter (KP_Enter), Esc (Escape), F1 (F1), F9 (F9), etc. The name of each button is in brackets. You can also operate a combination key by simply connecting the two button names with "+", for example, xdotool key Down.

[0068] The input information is: xdotool key "abcd".

[0069] In the embodiment of the present invention, the data parsing module is used to locate pages and items and obtain information, process key requests and input information functions.

[0070] The data analysis module is the CPU of the system for implementing BIOS remote automation control based on GUI of the present invention, and is used to convert the user's request into data processing, key operation, data return and other parts.

[0071] The data analysis module has the following functions:

[0072] Function 1: Locate pages and entries and obtain information. When the user calls the system tool based on GUI to realize remote automatic control of BIOS, the page and entry to be obtained are passed in. The data analysis module automatically switches pages and searches up and down entries by real-time parsing bios_info.txt, and returns the processing results together with BIOS interface information to the user.

[0073] When processing the data, the data analysis module removes the color and format control escape sequences in the data to obtain pure data.

[0074] When processing data, we need to consider the characteristics of the data, remove the color, format and other control escape sequences, and obtain pure data.

[0075] To locate pages and entries, we need to select an entry based on the format features of the BIOS interface to obtain the corresponding format features. For example, general information is black text on a gray background, and clickable entries are blue text on a gray background. When the entry is selected, it becomes white text on a gray background, so we obtain a gray background and white text sequence.

[0076] When the entry rendered by "[1; 37; 47m" is displayed, you can know which entry the current BIOS is stuck in. Different versions of BIOS interface display colors and styles are different, and data processing should be carried out according to the specific situation.

[0077] Function 2: Simply process key requests, that is, the user only passes in a key list, and the module presses the received keys one by one.

[0078] Function three: When inputting information, the user passes in the string to be input. After the data parsing module receives the input string, it first clears the current information by continuously pressing the backsapce key, and then inputs the string input by the user through the xdotooltype "string" command.

[0079] In an embodiment of the present invention, the data analysis module parses bios_info.txt in real time when performing data analysis, automatically switches pages, and searches up and down entries; returns the processing results together with the BIOS interface information to the user; wherein, when performing data processing, different versions of the BIOS interface display colors and styles are processed separately.

[0080] In the embodiment of the present invention, in the Xserver layer, the Linux graphical interface operation is a C / S architecture, where S is Xserver, which is used to pass mouse and keyboard operations to the application to complete the corresponding GUI operation. In this case, in order to meet the processing requirements of various scenarios such as local debugging, development environment, and production environment call, the Xserver needs to be started silently, that is, the GUI interface and processing process do not need to be displayed, so Xvfb is selected:

[0081] 1)os.system(“Xvfb:7–ac&”)

[0082] :7 Display Devices

[0083] The -ac parameter is to cancel the access restriction.

[0084] & is background start.

[0085] 2)os.environ["DISPLAY"]=":7"

[0086] Set the DISPLAY environment variable to match the Xvfb display device, which is ":7" here.

[0087] The system for realizing remote automatic control of BIOS based on GUI of the present invention can be divided into two parts: deployment and calling. The environment is deployed once on the execution machine, and the tool is called as needed during the test, and the corresponding parameters are passed in, so as to complete the goal of automatic testing of the BIOS of the machine to be tested. The tool supports replication and concurrent calling, and can test multiple servers at the same time.

[0088] The present invention realizes the tool foundation of automated BIOS testing, and operates BIOS in real time through flexible operation tools and free combination of keys to meet the testing needs of various scenarios. Automated operation reduces manpower input, improves test execution efficiency, and programmed operation ensures test accuracy, thereby improving server product quality.

[0089] It should be noted that the calling order, interaction and coordination mode of Xvfb, xdotool, gnome-terminal and ipmitool sol in the present invention are:

[0090] First, because a machine can only start one Xserver, each time the tool is called, it must first check whether Xvfb is started and set the DISPLAY environment variable consistent with Xvfb, so as to ensure that multiple terminals started concurrently are managed by the same Xvfb instance.

[0091] Secondly, the ipmitool sol connection to the machine under test command is written in the shell file and runs simultaneously with the terminal creation command, and outputs information to bios_info.txt in real time to facilitate data analysis.

[0092] Then, xdotool is a tool independent of the terminal. Only when you operate a key or input information, you focus on the specified terminal (xdotool windowsfocus$PID) and execute the xdotool key or xdotool type command.

[0093] It should be noted that during data parsing: bios_info.txt is parsed in real time, the page is automatically switched, and the entries are searched up and down, and finally the processing results are returned to the user together with the BIOS interface information. For data processing, it is necessary to combine the data characteristics, clean up the color, format and other control escape sequences, and obtain pure data. Different versions of BIOS interface display different colors and styles, and data processing should be carried out according to the specific situation.

[0094] The present invention can also implement the deployment process by programming and incorporate it into the tool, by detecting whether the environment has been deployed before, and deploying it once if not.

[0095] In one embodiment, see Figure 2 As shown, in an embodiment of the present invention, a computer device 1000 is further provided, comprising at least one processor 1001, and a memory 1002 in communication with the at least one processor 1001, wherein the memory 1002 stores instructions executable by the at least one processor 1001, and the instructions are executed by the at least one processor 1001 to enable the at least one processor 1001 to execute the method for implementing BIOS remote automation control based on GUI, and when the processor 1001 executes the instructions, the steps in the system for implementing BIOS remote automation control based on GUI according to the startup sequence and interaction relationship are implemented:

[0096] The target machine is the BIOS of the machine to be tested. The goal is to operate the POST and BIOS interface in all directions and obtain various information of the machine to be tested to meet various scenarios of current BIOS testing;

[0097] The application layer is used to implement the serial port communication function ipmitool sol based on the IPMI V2.0 specification, and communicate with the remote server through the serial port;

[0098] The GUI operation layer includes gnome-terminal to start the terminal. After multiple terminals are started, the terminal should be focused and key operations should be simulated in time to control the remote serial port communication process in the terminal. The GUI operation layer also includes a data parsing module for converting user requests into data processing, key operations and data return parts.

[0099] The Xserver layer is a C / S architecture in the Linux graphical interface operation, and the Xserver is started silently.

[0100] See also Figure 1 As shown, the system for realizing BIOS remote automatic control based on GUI in Linux character interface provided by the embodiment of the present invention realizes the non-graphical operation of GUI in Linux character interface by simulating the GUI processing process of C / S architecture. By starting multiple terminal terminals at the same time and simulating key operations in multiple terminals at the same time, it has the ability to test multiple servers in parallel. It basically covers all current test scenarios: POST interface information acquisition and key operations, single key and combination key operations, BIOS page switching, BIOS item search and location, entering and exiting BIOS items, modifying and saving option values, etc.

[0101] In the embodiment of the present application, the system for implementing BIOS remote automation control based on GUI under the Linux character interface provided by the embodiment of the present invention is divided into a target machine, an application layer, a GUI operation layer and an Xserver layer according to the startup order and the interaction relationship.

[0102] In the embodiment of the present invention, the target machine corresponds to the BIOS of the machine to be tested, that is, the object to be tested. The goal is to be able to fully operate the POST and BIOS interface and obtain various information of the machine to be tested to meet various scenarios of current BIOS testing.

[0103] In an embodiment of the present invention, the application layer is also used to set ipmitool, output communication information to the bios_info.txt file, configure parameters such as the serial port and baud rate for remote and local communication, and set the BIOS language to English.

[0104] In an embodiment of the present invention, the serial port communication function ipmitool sol implemented by the application layer based on the IPMI V2.0 specification can communicate with the remote server through the serial port. In addition, ipmitool is set to output communication information to the bios_info.txt file, configure the serial port and baud rate parameters for remote and local communication, set the BIOS language to English, and obtain the data of the current machine under test in real time, so as to facilitate the parsing and processing by the data parsing module.

[0105] Therefore, the application layer is also used to obtain the data of the current machine under test in real time for analysis and processing by the data analysis module.

[0106] The execution method is: ipmitool -I lanplus -H "bmc_ip" -U "bmc_user" -P "bmc_pwd" sol activate > bios_info.txt.

[0107] Write this command in bios_sol_control.sh, start it with the gnome-terminal terminal, and print the information sent back by the remote machine to bios_info.txt in real time.

[0108] In an embodiment of the present invention, when the GUI operation layer starts the terminal through gnome-terminal, the terminal is started silently to carry the operation of the serial communication process. By naming the terminal, multiple terminals can be started at the same time, isolated from each other and not interfering with each other.

[0109] Among them, the instruction os.system("gnome-terminal --tab -t terminal name --bash -c 'chmod 777*;. / bios_sol_control.sh log path bmc_ip bmc_user bmc_pwd'") completes the startup of the shell script bios_sol_control.sh in the terminal named with "terminal name", and passes the four parameters of "log path", "bmc_ip", "bmc_user" and "bmc_pwd" to bios_sol_control.sh.

[0110] In the embodiment of the present invention, in the GUI operation layer, after multiple terminals are started, it is necessary to timely focus on the terminal and simulate key operations to control the remote serial port communication process in the terminal.

[0111] When the GUI operation layer controls the remote serial port communication process in the terminal, it includes:

[0112] 1) Find all terminal terminals;

[0113] xdotool search-class "gnome-terminal" returns a list of terminal IDs.

[0114] 2) Obtain the terminal name through the terminal ID to determine whether it is the designated terminal to be operated;

[0115] xdotool getwindowname$ID.

[0116] 3) Focus on the specified terminal through the terminal ID;

[0117] xdotool windowsfocus $ID

[0118] 4) The operation buttons are equipped with up, down, left, and right arrows for inputting information.

[0119] Among them, the operation buttons involved in the embodiments of the present application include up, down, left, and right arrows (Up Down LeftRight), Enter (KP_Enter), Esc (Escape), F1 (F1), F9 (F9), etc. The name of each button is in brackets. You can also operate a combination key by simply connecting the two button names with "+", for example, xdotool key Down.

[0120] The input information is: xdotool key "abcd".

[0121] In the embodiment of the present invention, the data parsing module is used to locate pages and items and obtain information, process key requests and input information functions.

[0122] The data analysis module is the CPU of the system for implementing BIOS remote automation control based on GUI of the present invention, and is used to convert the user's request into data processing, key operation, data return and other parts.

[0123] The data analysis module has the following functions:

[0124] Function 1: Locate pages and entries and obtain information. When the user calls the system tool based on GUI to realize remote automatic control of BIOS, the page and entry to be obtained are passed in. The data analysis module automatically switches pages and searches up and down entries by real-time parsing bios_info.txt, and returns the processing results together with BIOS interface information to the user.

[0125] When processing the data, the data analysis module removes the color and format control escape sequences in the data to obtain pure data.

[0126] When processing data, we need to consider the characteristics of the data, remove the color, format and other control escape sequences, and obtain pure data.

[0127] To locate pages and entries, we need to select an entry based on the format features of the BIOS interface to obtain the corresponding format features. For example, general information is black text on a gray background, and clickable entries are blue text on a gray background. When the entry is selected, it becomes white text on a gray background, so we obtain a gray background and white text sequence.

[0128] When the entry rendered by "[1; 37; 47m" is displayed, you can know which entry the current BIOS is stuck in. Different versions of BIOS interface display colors and styles are different, and data processing should be carried out according to the specific situation.

[0129] Function 2: Simply process key requests, that is, the user only passes in a key list, and the module presses the received keys one by one.

[0130] Function three: When inputting information, the user passes in the string to be input. After the data parsing module receives the input string, it first clears the current information by continuously pressing the backsapce key, and then inputs the string input by the user through the xdotooltype "string" command.

[0131] In the context, "computer equipment", also called "computer", refers to an intelligent electronic device that can perform predetermined processing processes such as numerical calculations and / or logical calculations by running predetermined programs or instructions, which may include a processor 1001 and a memory 1002. The processor 1001 executes the stored instructions pre-stored in the memory 1002 to perform the predetermined processing process, or the hardware such as ASIC, FPGA, DSP, etc. performs the predetermined processing process, or the combination of the above two is implemented. Computer equipment 1000 includes but is not limited to servers, personal computers, laptops, tablet computers, smart phones, etc.

[0132] The computer device 1000 includes a user device and a network device. The user device includes but is not limited to a computer, a smart phone, a PDA, etc. The network device includes but is not limited to a single network server, a server group consisting of multiple network servers, or a cloud consisting of a large number of computers or network servers based on cloud computing (Cloud Computing), wherein cloud computing is a type of distributed computing, a super virtual computer consisting of a group of loosely coupled computer sets. The computer device 1000 can be operated alone to implement the present invention, or it can be connected to a network and implement the present invention through interactive operations with other computer devices 1000 in the network. The network where the computer device 1000 is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a VPN network, etc.

[0133] It should be further understood that the term “and / or” used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0134] In one embodiment of the present invention, a storage medium is further provided, on which a computer program is stored. When the computer program is executed by the processor 1001, the steps in the startup sequence and interaction relationship of the system for realizing BIOS remote automation control based on GUI are implemented:

[0135] The target machine is the BIOS of the machine under test. The goal is to operate the POST and BIOS interface in all aspects and obtain various information of the machine under test to meet various scenarios of current BIOS testing;

[0136] The application layer is used to implement the serial port communication function ipmitool sol based on the IPMI V2.0 specification, and communicate with the remote server through the serial port;

[0137] The GUI operation layer includes gnome-terminal to start the terminal. After multiple terminals are started, the terminal should be focused and key operations should be simulated in time to control the remote serial port communication process in the terminal. The GUI operation layer also includes a data parsing module for converting user requests into data processing, key operations and data return parts.

[0138] The Xserver layer is a C / S architecture in the Linux graphical interface operation, and the Xserver is started silently.

[0139] See also Figure 1 As shown, the system for realizing BIOS remote automatic control based on GUI in Linux character interface provided by the embodiment of the present invention realizes the non-graphical operation of GUI in Linux character interface by simulating the GUI processing process of C / S architecture. By starting multiple terminal terminals at the same time and simulating key operations in multiple terminals at the same time, it has the ability to test multiple servers in parallel. It basically covers all current test scenarios: POST interface information acquisition and key operations, single key and combination key operations, BIOS page switching, BIOS item search and location, entering and exiting BIOS items, modifying and saving option values, etc.

[0140] In the embodiment of the present application, the system for implementing BIOS remote automation control based on GUI under the Linux character interface provided by the embodiment of the present invention is divided into a target machine, an application layer, a GUI operation layer and an Xserver layer according to the startup order and the interaction relationship.

[0141] In the embodiment of the present invention, the target machine corresponds to the BIOS of the machine to be tested, that is, the object to be tested. The goal is to be able to fully operate the POST and BIOS interface and obtain various information of the machine to be tested to meet various scenarios of current BIOS testing.

[0142] In an embodiment of the present invention, the application layer is also used to set ipmitool, output communication information to the bios_info.txt file, configure parameters such as the serial port and baud rate for remote and local communication, and set the BIOS language to English.

[0143] In an embodiment of the present invention, the serial port communication function ipmitool sol implemented by the application layer based on the IPMI V2.0 specification can communicate with the remote server through the serial port. In addition, ipmitool is set to output communication information to the bios_info.txt file, configure the serial port and baud rate parameters for remote and local communication, set the BIOS language to English, and obtain the data of the current machine under test in real time, so as to facilitate the parsing and processing by the data parsing module.

[0144] Therefore, the application layer is also used to obtain the data of the current machine under test in real time for analysis and processing by the data analysis module.

[0145] The execution method is: ipmitool -I lanplus -H "bmc_ip" -U "bmc_user" -P "bmc_pwd" sol activate > bios_info.txt.

[0146] Write this command in bios_sol_control.sh, start it with the gnome-terminal terminal, and print the information sent back by the remote machine to bios_info.txt in real time.

[0147] In an embodiment of the present invention, when the GUI operation layer starts the terminal through gnome-terminal, the terminal is started silently to carry the operation of the serial communication process. By naming the terminal, multiple terminals can be started at the same time, isolated from each other and not interfering with each other.

[0148] Among them, the instruction os.system("gnome-terminal --tab -t terminal name --bash -c 'chmod 777*;. / bios_sol_control.sh log path bmc_ip bmc_user bmc_pwd'") completes the startup of the shell script bios_sol_control.sh in the terminal named with "terminal name", and passes the four parameters of "log path", "bmc_ip", "bmc_user" and "bmc_pwd" to bios_sol_control.sh.

[0149] In the embodiment of the present invention, in the GUI operation layer, after multiple terminals are started, it is necessary to timely focus on the terminal and simulate key operations to control the remote serial port communication process in the terminal.

[0150] When the GUI operation layer controls the remote serial port communication process in the terminal, it includes:

[0151] 1) Find all terminal terminals;

[0152] xdotool search-class "gnome-terminal" returns a list of terminal IDs.

[0153] 2) Obtain the terminal name through the terminal ID to determine whether it is the designated terminal to be operated;

[0154] xdotool getwindowname$ID.

[0155] 3) Focus on the specified terminal through the terminal ID;

[0156] xdotool windowsfocus $ID

[0157] 4) The operation buttons are equipped with up, down, left, and right arrows for inputting information.

[0158] Among them, the operation buttons involved in the embodiments of the present application include up, down, left, and right arrows (Up Down LeftRight), Enter (KP_Enter), Esc (Escape), F1 (F1), F9 (F9), etc. The name of each button is in brackets. You can also operate a combination key by simply connecting the two button names with "+", for example, xdotool key Down.

[0159] The input information is: xdotool key "abcd".

[0160] In the embodiment of the present invention, the data parsing module is used to locate pages and items and obtain information, process key requests and input information functions.

[0161] The data analysis module is the CPU of the system for implementing BIOS remote automation control based on GUI of the present invention, and is used to convert the user's request into data processing, key operation, data return and other parts.

[0162] The data analysis module has the following functions:

[0163] Function 1: Locate pages and entries and obtain information. When the user calls the system tool based on GUI to realize remote automatic control of BIOS, the page and entry to be obtained are passed in. The data analysis module automatically switches pages and searches up and down entries by real-time parsing bios_info.txt, and returns the processing results together with BIOS interface information to the user.

[0164] When processing the data, the data analysis module removes the color and format control escape sequences in the data to obtain pure data.

[0165] When processing data, we need to consider the characteristics of the data, remove the color, format and other control escape sequences, and obtain pure data.

[0166] To locate pages and entries, we need to select an entry based on the format features of the BIOS interface to obtain the corresponding format features. For example, general information is black text on a gray background, and clickable entries are blue text on a gray background. When the entry is selected, it becomes white text on a gray background, so we obtain a gray background and white text sequence.

[0167] When the entry rendered by "[1; 37; 47m" is displayed, you can know which entry the current BIOS is stuck in. Different versions of BIOS interface display colors and styles are different, and data processing should be carried out according to the specific situation.

[0168] Function 2: Simply process key requests, that is, the user only passes in a key list, and the module presses the received keys one by one.

[0169] Function three: When inputting information, the user passes in the string to be input. After the data parsing module receives the input string, it first clears the current information by continuously pressing the backsapce key, and then inputs the string input by the user through the xdotooltype "string" command.

[0170] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented 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 process of the embodiment of the above-mentioned method. Among them, any reference to the memory 1002, storage, database or other medium used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory.

[0171] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

[0172] In summary, the system for implementing BIOS remote automatic control based on GUI provided by the present invention realizes the non-graphical operation of GUI in Linux character interface by simulating the GUI processing process of C / S architecture. By starting multiple terminal terminals at the same time and simulating key operations in multiple terminals at the same time, it has the ability to test multiple servers in parallel. It basically covers all current test scenarios: POST interface information acquisition and key operations, single key and combination key operations, BIOS page switching, BIOS item search and positioning, entering and exiting BIOS items, modifying and saving option values, etc.

[0173] The tool implemented based on the present invention can be divided into two parts: deployment and calling. The environment is deployed once on the execution machine. When testing, the tool is called as needed and the corresponding parameters are passed in to complete the goal of automated testing of the BIOS of the machine under test. The tool supports replication and concurrent calling, and can test multiple servers at the same time.

[0174] The present invention realizes the tool foundation of automated BIOS testing, and operates BIOS in real time through flexible operation tools and free combination of keys to meet the testing needs of various scenarios. Automated operation reduces manpower input, improves test execution efficiency, and programmed operation ensures test accuracy, thereby improving server product quality.

[0175] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.

[0176] It should be understood that, as used herein, the singular form "a" or "an" is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations of one or more of the items listed in association. The serial numbers of the embodiments disclosed in the above embodiments of the present invention are for description only and do not represent the advantages and disadvantages of the embodiments.

[0177] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the embodiments of the present invention as above, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.

Claims

1. A system for realizing remote automatic control of BIOS based on GUI, characterized in that: include: Target machine, application layer, GUI operation layer and Xserver layer; The target machine is the BIOS of the machine to be tested. The goal is to operate the POST and BIOS interface in all directions and obtain various information of the machine to be tested to meet various scenarios of current BIOS testing; The application layer is used to implement the serial port communication function ipmitool sol based on the IPMI V2.0 specification, and communicate with the remote server through the serial port; The GUI operation layer includes gnome-terminal to start the terminal. After multiple terminals are started, the terminal should be focused and key operations should be simulated in time to control the remote serial port communication process in the terminal. The GUI operation layer also includes a data parsing module for converting user requests into data processing, key operations and data return parts. The Xserver layer is a C / S architecture in the Linux graphical interface operation, and the Xserver is started silently.

2. The system for realizing BIOS remote automatic control based on GUI as claimed in claim 1, characterized in that: The application layer is also used to set ipmitool, output communication information to the bios_info.txt file, configure the serial port and baud rate parameters for remote and local communication, and set the BIOS language to English.

3. The system for implementing BIOS remote automation control based on GUI as claimed in claim 2, characterized in that: The application program layer is also used to obtain the data of the current machine under test in real time for analysis and processing by the data analysis module.

4. The system for realizing BIOS remote automatic control based on GUI as claimed in claim 3, characterized in that: When the GUI operation layer starts the terminal through gnome-terminal, the terminal is started in silent mode to carry the operation of the serial communication process. By naming the terminal, multiple terminals can be started at the same time, isolated from each other and not interfering with each other.

5. The system for implementing BIOS remote automation control based on GUI as claimed in claim 4, characterized in that: When the GUI operation layer is used to control the remote serial port communication process in the terminal, it includes: Find all terminal terminals; Get the terminal name through the terminal ID to determine whether it is the specified terminal to be operated; Focus on the specified terminal through the terminal ID; The operation buttons are equipped with up, down, left, and right arrows for inputting information.

6. The system for implementing BIOS remote automation control based on GUI as claimed in claim 5, characterized in that: The data analysis module is used to locate pages and items and obtain information, process key requests and input information.

7. The system for implementing BIOS remote automation control based on GUI as claimed in claim 6, characterized in that: The page and item location and information acquisition include: When the user calls the tool of the system that implements BIOS remote automation control based on GUI, the page and entry to be obtained are passed in. The data parsing module automatically switches pages and searches up and down entries by parsing bios_info.txt in real time, and returns the processing results together with the BIOS interface information to the user.

8. The system for implementing BIOS remote automation control based on GUI as claimed in claim 7, characterized in that: When the data parsing module processes the data, it removes the color and format control escape sequences in the data to obtain pure data.

9. The system for implementing BIOS remote automation control based on GUI as claimed in claim 8, characterized in that: When the data parsing module locates pages and entries, the corresponding format features are obtained when an entry is selected according to the format features of the BIOS interface.

10. The system for implementing BIOS remote automation control based on GUI as claimed in claim 9, characterized in that: When simply processing key requests, the user only passes in a key list, and the module presses the received keys one by one; when inputting information, the user passes in the string to be input, and after the data parsing module receives the input string, it clears the current information and inputs the string input by the user through the xdotool type "string" command.

Citation Information

Patent Citations

  • Server testing method and device based on linux system and medium

    CN108984380A

  • Online platform data transmission method and device, medium and electronic device

    CN110275787A