Debugging log information output method and device, equipment and storage medium

By storing and managing debug log information masks in the target storage unit, the problem that the BIOS debugging mechanism cannot dynamically adjust the debug log output is solved, and flexible control and efficient management of debug information output during BIOS startup is achieved.

CN119311530APending Publication Date: 2025-01-14INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411320340.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The existing BIOS debugging mechanism cannot dynamically adjust the debug log information output according to the actual needs of users. The operation is cumbersome and lacks flexibility, and cannot meet the different needs of different users for debug information output.

Method used

By pre-storing the debug log information mask in the target storage unit, and controlling the debug log information output during the BIOS startup process according to the mask, users can flexibly select the detailed level of debug information by adjusting the mask to adapt to different usage scenarios and requirements .

Benefits of technology

It realizes dynamic control of debugging information output during BIOS startup, simplifies the operation process, improves the efficiency of system management, and adapts to the needs of different users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311530A_ABST
    Figure CN119311530A_ABST
Patent Text Reader

Abstract

The invention relates to the field of debugging log information output, and discloses a debugging log information output method, device and equipment and a storage medium, and the debugging log information output method comprises the following steps: after a basic input and output system is started, obtaining a debugging log information mask from a target storage unit; at least one preset debugging log information mask is stored in the target storage unit; controlling debugging log information output in the starting process of the basic input and output system based on the debugging log information mask; the debugging log information mask is used for indicating a debugging log information level corresponding to the basic input and output system; the debugging log information level is used for indicating the type of the debugging log information output in the starting process of the basic input and output system. The output type of the debugging log information can be dynamically adjusted according to the actual requirement of a user, and different use scenes and requirements are adapted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of debug log information output, and in particular to a debug log information output method, device, equipment and storage medium. Background Art

[0002] When the server starts, the server's Basic Input Output System (BIOS) needs to perform initialization operations to ensure that all hardware components inside the server can work normally.

[0003] During the boot process, BIOS generates a large amount of debug log information (Debug information). The debug log information can describe some relevant information during the boot process of BIOS. This information is usually displayed during the server boot process to facilitate the user's subsequent development, debugging and maintenance of the system. However, different users may have different needs for this debug information. Some users may need to minimize the boot time and have no need for debug information; while other users need detailed debug information for system troubleshooting and performance optimization. However, the existing BIOS debugging mechanism requires entering the BIOS setup interface to adjust whether to display each debug information, which is cumbersome.

[0004] Therefore, there is an urgent need for a method that can flexibly adjust the output of debug log information to dynamically adjust the output of debug log information according to the actual needs of users. Summary of the invention

[0005] In view of this, the present invention provides a method, apparatus, device and storage medium for outputting debug log information to solve the problem that the output of debug log information cannot be dynamically adjusted according to the actual needs of the user.

[0006] In a first aspect, the present invention provides a method for outputting debug log information, the method comprising:

[0007] When the basic input and output system is started, a debug log information mask is obtained from a target storage unit; the target storage unit stores at least one preset debug log information mask;

[0008] The debug log information output during the basic input and output system startup process is controlled based on the debug log information mask; the debug log information mask is used to indicate the debug log information level corresponding to the basic input and output system; the debug log information level is used to indicate the type of debug log information output during the basic input and output system startup process.

[0009] The debugging log information output method provided by the present invention has the following advantages:

[0010] When the basic input and output system (BIOS) is started, the debug log information (Debug) mask pre-stored in the target storage unit is read, and the debug log information output during the BIOS startup process is controlled according to the read Debug mask. By pre-storing the Debug mask in the target storage unit, dynamic control of the Debug information output generated during the BIOS startup process is achieved, the Debug mask indicates the Debug level corresponding to the BIOS, and the Debug level indicates the type of Debug information output during the BIOS startup process. The level of detail of the Debug information can be flexibly selected according to actual needs to adapt to different usage scenarios and requirements. The management of the Debug information output generated during the BIOS startup process is achieved through the target storage unit, which simplifies the operation process and improves the efficiency of system management.

[0011] In an optional implementation, the debug log information output method further includes:

[0012] Get instructions for adjusting the debug log information level;

[0013] Generate a debug log information mask according to the debug log information level indicated in the instruction for obtaining and adjusting the debug log information level;

[0014] The debug log information mask is stored in the target storage unit.

[0015] In an optional implementation, the debug log information output method further includes:

[0016] In response to a first operation by the user, displaying a basic input / output system setting interface;

[0017] In response to the user's input operation in the mask input control of the basic input and output system setting interface, a debug log information mask is correspondingly generated;

[0018] The debug log information mask is stored in the target storage unit.

[0019] In an optional implementation, the debug log information output method further includes:

[0020] In response to a first operation by the user, displaying a basic input / output system setting interface;

[0021] In response to the user inputting an operation on the level input control of the basic input / output system setting interface, an instruction for obtaining and adjusting the debug log information level is generated accordingly;

[0022] Generate a debug log information mask according to the debug log information level indicated in the instruction for obtaining and adjusting the debug log information level;

[0023] The debug log information mask is stored in the target storage unit.

[0024] Specifically, storing the debug log information mask in the target storage unit includes:

[0025] The server management controller writes the debug log information mask into the dedicated area of ​​the electrically erasable and programmable ROM to replace the original debug log information mask in the dedicated area of ​​the electrically erasable and programmable ROM.

[0026] In an optional implementation, before controlling the output of debug log information during the startup of the basic input and output system based on the debug log information mask, the debug log information output method further includes:

[0027] Determine whether the debug log information mask is a valid mask;

[0028] If the debug log information mask is a valid mask, the debug log information mask is written into the basic input and output system to make the debug log information mask setting effective.

[0029] Specifically, determining whether the debug log information mask is a valid mask includes:

[0030] If the debug log information mask matches the preset mask, it is valid;

[0031] If the debug log message mask does not match the preset mask, it will have no effect.

[0032] In an optional implementation, controlling the output of debug log information during the startup of a basic input / output system based on the debug log information mask includes:

[0033] Acquire various debug log information to be output during the basic input and output system startup process; the debug log information to be output includes a debug log information identification code; the debug log information identification code is related to the type of the debug log information to be output; the debug log information identification code is the same length as the debug log information mask;

[0034] For any debug log information to be output, each character in the identification code of the debug log information to be output is bitwise ANDed with each character in the debug log information mask to obtain the operation result of the debug log information to be output; the operation result is 1, indicating that the debug log information to be output is allowed to be output at the debug log information level; the operation result is 0, indicating that the debug log information to be output is not allowed to be output at the debug log information level;

[0035] According to the calculation results of each of the debug log information to be output, select the target output debug log information that is allowed to be output under the debug log information level;

[0036] The target debugging log information is output and displayed on a display unit of the target device.

[0037] In a second aspect, the present invention generally provides a debug log information output device, the device comprising:

[0038] An acquisition module, used for acquiring a debug log information mask from a target storage unit after the basic input and output system is started; the target storage unit stores at least one preset debug log information mask;

[0039] A control module is used to control the output of debug log information during the startup of a basic input / output system based on the debug log information mask; the debug log information mask is used to indicate the debug log information level corresponding to the basic input / output system; the debug log information level is used to indicate the type of debug log information output during the startup of the basic input / output system.

[0040] In an optional embodiment, the acquisition module is specifically used to:

[0041] Get instructions for adjusting the debug log information level;

[0042] Generate a debug log information mask according to the debug log information level indicated in the instruction for obtaining and adjusting the debug log information level;

[0043] The debug log information mask is stored in the target storage unit.

[0044] In an optional implementation, the acquisition module is further used to:

[0045] In response to a first operation by the user, displaying a basic input / output system setting interface;

[0046] In response to the user's input operation in the mask input control of the basic input and output system setting interface, a debug log information mask is correspondingly generated;

[0047] The debug log information mask is stored in the target storage unit.

[0048] In an optional implementation, the acquisition module is further used to:

[0049] In response to a first operation by the user, displaying a basic input / output system setting interface;

[0050] In response to the user inputting an operation on the level input control of the basic input / output system setting interface, an instruction for obtaining and adjusting the debug log information level is generated accordingly;

[0051] Generate a debug log information mask according to the debug log information level indicated in the instruction for obtaining and adjusting the debug log information level;

[0052] The debug log information mask is stored in the target storage unit.

[0053] Optionally, storing the debug log information mask in the target storage unit includes:

[0054] The server management controller writes the debug log information mask into the dedicated area of ​​the electrically erasable and programmable ROM to replace the original debug log information mask in the dedicated area of ​​the electrically erasable and programmable ROM.

[0055] In an optional embodiment, the control module is specifically used to:

[0056] Acquire various debug log information to be output during the basic input and output system startup process; the debug log information to be output includes a debug log information identification code; the debug log information identification code is related to the type of the debug log information to be output; the debug log information identification code is the same length as the debug log information mask;

[0057] For any debug log information to be output, each character in the identification code of the debug log information to be output is bitwise ANDed with each character in the debug log information mask to obtain the operation result of the debug log information to be output; the operation result is 1, indicating that the debug log information to be output is allowed to be output at the debug log information level; the operation result is 0, indicating that the debug log information to be output is not allowed to be output at the debug log information level;

[0058] According to the calculation results of each of the debug log information to be output, select the target output debug log information that is allowed to be output under the debug log information level;

[0059] The target debugging log information is output and displayed on a display unit of the target device.

[0060] In an optional embodiment, the device further includes a judgment module, which is specifically used to:

[0061] Before controlling the output of debug log information during the startup of the basic input and output system based on the debug log information mask, determining whether the debug log information mask is a valid mask;

[0062] If the debug log information mask is a valid mask, the debug log information mask is written into the basic input and output system to make the debug log information mask setting effective.

[0063] The determining whether the debug log information mask is a valid mask includes:

[0064] If the debug log information mask matches the preset mask, it is valid;

[0065] If the debug log message mask does not match the preset mask, it will have no effect.

[0066] The debugging log information output method provided by the present invention has the following advantages:

[0067] When the basic input and output system (BIOS) is started, the debug log information (Debug) mask pre-stored in the target storage unit is read, and the debug log information output during the BIOS startup process is controlled according to the read Debug mask. By pre-storing the Debug mask in the target storage unit, dynamic control of the Debug information output generated during the BIOS startup process is achieved, the Debug mask indicates the Debug level corresponding to the BIOS, and the Debug level indicates the type of Debug information output during the BIOS startup process. The level of detail of the Debug information can be flexibly selected according to actual needs to adapt to different usage scenarios and requirements. The management of the Debug information output generated during the BIOS startup process is achieved through the target storage unit, which simplifies the operation process and improves the efficiency of system management.

[0068] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the debugging log information output method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0069] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the debugging log information output method of the first aspect or any corresponding embodiment thereof.

[0070] In a fifth aspect, the present invention provides a computer program product, including computer instructions, which are used to enable a computer to execute the debugging log information output method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the specific implementation of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are some implementations of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.

[0072] Figure 1 This is a flow chart of a method for outputting debugging log information provided by an embodiment of the present invention;

[0073] Figure 2 It is a flowchart of a method for storing a debug log information mask to a target storage unit provided by an embodiment of the present invention;

[0074] Figure 3 It is a schematic diagram of a process of obtaining a debug mask from a BMC during a BIOS startup process provided by an embodiment of the present invention;

[0075] Figure 4 It is a structural block diagram of a debugging log information output device provided by an embodiment of the present invention;

[0076] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0077] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0078] The server is the core device of the computer network. It provides services such as data storage, processing and distribution to support the normal operation of various applications and services. Whether it is an internal information system of an enterprise, an Internet website, or a cloud computing platform, the server plays a vital role. Unlike personal computers, servers usually have higher stability, reliability and scalability to cope with the needs of large-scale data processing and multi-user access.

[0079] During the boot process, BIOS generates a large amount of debug log information (Debug information). The debug log information can describe some relevant information during the boot process of BIOS. This information is usually displayed during the server boot process to facilitate users to develop, debug and maintain the system later. However, different users may have different needs for this debug information. Some users may need to minimize the boot time and have no need for debug information; while other users need detailed debug information for system troubleshooting and performance optimization.

[0080] However, the existing BIOS debugging mechanism requires entering the BIOS setup interface to adjust whether to display each debug information, which is cumbersome. For example, the server can only change the behavior of BIOS outputting debug information by modifying the BIOS code and recompiling it. This method requires BIOS engineers to provide debug versions, and the BIOS firmware needs to be updated / burned again, which is inefficient.

[0081] Existing BIOS systems usually provide fixed debugging information output options, such as Enable or Disable debugging information output. These settings usually need to be manually set in the BIOS setup interface and cannot be dynamically adjusted according to actual conditions. This method lacks flexibility and cannot meet the different needs of different users for debugging information output.

[0082] Some advanced server systems provide hardware-level debugging interfaces, such as JTAG interfaces, for debugging and analyzing the operating status of the system. Although this method can provide very detailed debugging information, it requires professional hardware equipment and technicians to operate, is costly to use, and is not suitable for all users.

[0083] In traditional BIOS design, the output of debug log information is usually controlled by predefined settings, and users must make manual adjustments in the BIOS setup interface, which lacks flexibility and automation. At the same time, the existing BIOS debugging mechanism cannot dynamically adjust the detail level of debug log information according to actual needs.

[0084] To solve the above problems, an embodiment of the present invention provides an embodiment of a method for outputting debug log information. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system (computer device) including, for example, a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0085] In this embodiment, a method for outputting debug log information is provided, which can be used for the above-mentioned terminal devices, such as mobile phones, tablet computers, etc. Figure 1FIG. 1 is a flow chart of a method for outputting debugging log information provided by an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0086] Step S101, when the basic input and output system is started, a debug log information mask is obtained from a target storage unit.

[0087] Wherein, at least one preset debug log information mask is stored in the target storage unit.

[0088] In step S101, the basic input and output system (BIOS) is a key component of the server for hardware initialization and operating system loading. After the server is started, the BIOS will first perform a series of hardware detection and initialization operations to ensure that all hardware components are working properly, such as the CPU, memory, hard disk, network interface, etc. Subsequently, the BIOS will start the operating system to put the server into a normal operating state. The BIOS will generate a large amount of debug log information during the startup process. The BIOS will determine whether to output a certain debug information based on the debug log information (Debug) mask. Therefore, after the BIOS is started, the debug log information mask will be read from the target storage unit to determine the type of debug information output.

[0089] Step S102: controlling the output of debug log information during the startup of the basic input and output system based on the debug log information mask.

[0090] The debug log information mask is used to indicate the debug log information level corresponding to the basic input and output system; the debug log information level is used to indicate the type of debug log information output during the startup of the basic input and output system.

[0091] In step S102, the BIOS determines whether to output a certain Debug information according to the debug log information (Debug) mask. After the BIOS reads the Debug mask from the target storage unit, the Debug mask is set as the Debug mask effective during the BIOS system startup process, and the type of Debug information output during the BIOS startup process is controlled according to the effective Debug mask.

[0092] Optionally, there is a corresponding relationship between the debug mask and the debug information, and the debug mask can indicate what kind of debug information is output during the BIOS operation.

[0093] Optionally, step S102 specifically includes:

[0094] Acquire various debug log information to be output during the basic input and output system startup process; the debug log information to be output includes a debug log information identification code; the debug log information identification code is related to the type of the debug log information to be output; the debug log information identification code is the same length as the debug log information mask;

[0095] For any debug log information to be output, each character in the identification code of the debug log information to be output is bitwise ANDed with each character in the debug log information mask to obtain the operation result of the debug log information to be output; the operation result is 1, indicating that the debug log information to be output is allowed to be output at the debug log information level; the operation result is 0, indicating that the debug log information to be output is not allowed to be output at the debug log information level;

[0096] According to the calculation results of each of the debug log information to be output, select the target output debug log information that is allowed to be output under the debug log information level;

[0097] The target debugging log information is output and displayed on a display unit of the target device.

[0098] Specifically, the Debug information output of BIOS is controlled by defining a Debug mask and a Debug information identification code (that is, the above-mentioned debug log information identification code). The Debug mask is a data of several bytes (such as 4 bytes) used to indicate which levels of Debug information should be output. The Debug information identification code is a data with the same length as the Debug mask, in which only one bit is 1 and the rest of the bits are 0. All Debug information in BIOS is divided into multiple levels according to factors such as importance. Each time it is determined whether to output a certain Debug information, the Debug information identification code and the Debug mask are bitwise ANDed. A result of 0 indicates that the Debug information is not output, and a result of 1 indicates that the Debug information is output.

[0099] Through the above scheme, after the BIOS sets the effective Debug mask, after generating Debug information, the generated Debug information can be bitwise ANDed with the Debug information identification codes in multiple Debug masks, so as to determine whether each Debug information matches the Debug mask (if the output result is 1, it means it matches). If it matches, it means that the Debug information is the Debug information that is allowed to be output after the BIOS sets the Debug mask. In other words, by setting different Debug information identification codes in the Debug information, different Debug information can be graded or classified. At this time, by setting different Debug masks in the BIOS, you can choose to output Debug information of a specific level or a specific category.

[0100] Optionally, before controlling the output of debug log information during the startup of the basic input / output system based on the debug log information mask, the debug log information output method further includes:

[0101] Determine whether the debug log information mask is a valid mask;

[0102] If the debug log information mask is a valid mask, the debug log information mask is written into the basic input and output system to make the debug log information mask setting effective.

[0103] The determining whether the debug log information mask is a valid mask includes:

[0104] If the debug log information mask matches the preset mask, it is valid;

[0105] If the debug log message mask does not match the preset mask, it will have no effect.

[0106] In order to avoid the situation where the user triggers the debug log information mask incorrectly, it is necessary to determine whether the debug log information mask is a valid mask. When it matches the debug log information mask preset in the BIOS, the BIOS will set the received debug log information mask as a valid mask.

[0107] Specifically, if the debug log information mask in the BIOS is automatically generated by the user selecting the debug log information level in the BIOS interface, the debug log information mask should correspond to the debug log information level, that is, it is pre-set by the developer, so it generally does not make mistakes.

[0108] However, if the debug log information mask in the BIOS is manually input by the user through the debug log information input control through the BIOS interface, or is sent by the user through an instruction and stored in the target storage unit, the debug log information mask triggered by the user (that is, stored in the target storage unit at this time) may not be a valid mask that complies with the standard, that is, the mask may not be properly compared with the debug log information identification code, thereby causing problems in the debug information operation.

[0109] Therefore, in order to avoid the above problems, when the BIOS obtains the debug log information mask stored in the target storage unit, the encoding type of the debug log information mask can be determined to determine whether the encoding type of the debug log information mask is a preset type; if not, the debug log information mask is confirmed to be invalid;

[0110] If yes, it can be further determined whether the encoding length of the debug log information mask is a preset length. If no, it is determined that the debug log information mask is invalid.

[0111] If the length of the debug log information mask is the preset length, the debug log information mask and the preset debug log information identification code can be located to determine whether a normal result can be generated. Here, the normal result can be 0 or 1. If a normal result can be generated, it means that the debug log information mask is valid. If the result of the debug log information mask and any one of the preset debug log information identification codes is not a normal result, it means that the debug log information mask is not a valid mask that meets the standard. At this time, the debug log information mask is confirmed to be invalid and abnormal information is reported.

[0112] In summary, when the basic input and output system (BIOS) is started, the debug log information (Debug) mask pre-stored in the target storage unit is read, and the debug log information output during the BIOS startup process is controlled according to the read Debug mask. By pre-storing the Debug mask in the target storage unit, dynamic control of the Debug information output generated during the BIOS startup process is achieved, the Debug mask indicates the Debug level corresponding to the BIOS, and the Debug level indicates the type of Debug information output during the BIOS startup process. The level of detail of the Debug information can be flexibly selected according to actual needs to adapt to different usage scenarios and requirements. The management of the Debug information output generated during the BIOS startup process is achieved through the target storage unit, which simplifies the operation process and improves the efficiency of system management.

[0113] This embodiment provides a method for storing a debug log information mask in a target storage unit. Figure 2It is a flowchart of a method for storing a debug log information mask into a target storage unit provided by an embodiment of the present invention.

[0114] S201, obtaining an instruction for adjusting the debug log information level;

[0115] Optionally, the instruction to adjust the debug log information level in step S201 may be a user sending an adjustment instruction to a server management controller via a remote command, for example, a user sending an instruction to adjust the debug log information level to a server management controller (BMC) via an IPMI command.

[0116] BMC usually supports the IPMI (Intelligent Platform Management Interface) protocol, which is a standard server management interface protocol that allows the server to be managed and monitored over the network. Through IPMI, administrators can remotely obtain detailed hardware information and event logs, perform hardware reset operations, and remotely access the server console to perform BIOS settings and operating system installation. The IPMI protocol makes BMC compatible with various management tools and platforms, provides a unified management interface, and simplifies the complexity of server management.

[0117] In some embodiments, the user may also send an instruction to adjust the debug level through the level input control of the BIOS setup interface. Specifically, after the BIOS is started, in response to the user's first operation, the basic input and output system setup interface is displayed; in response to the user's input operation in the level input control of the basic input and output system setup interface, an instruction to obtain the adjustment of the debug log information level is generated; according to the debug log information level indicated in the instruction to obtain the adjustment of the debug log information level, a debug log information mask is generated accordingly.

[0118] S202, generating a debug log information mask corresponding to the debug log information level indicated in the instruction for obtaining the debug log information level adjustment;

[0119] In some embodiments, steps S201 and S202 may also include: a user sends an instruction to adjust the debug mask through a mask input control of the BIOS setting interface, and a debug log information mask is generated accordingly.

[0120] In some embodiments, the user may also directly send a debug log information mask instruction, so step S201 and step S202 may also be to obtain an instruction to adjust the debug log information mask and generate a debug log information mask accordingly. Specifically, after the BIOS is started, in response to the user's first operation, the BIOS setup interface is displayed; in response to the user's input operation in the mask input control of the BIOS setup interface, a debug log information mask is generated accordingly.

[0121] S203: Store the debug log information mask in the target storage unit.

[0122] Optionally, there is a special case where, for example, the debug log information mask has been stored in the target storage unit, and the original debug log information mask needs to be deleted and the newly acquired debug log information mask needs to be written, including:

[0123] The server management controller writes the debug log information mask into the dedicated area of ​​the electrically erasable and programmable ROM to replace the original debug log information mask in the dedicated area of ​​the electrically erasable and programmable ROM.

[0124] Specifically, there is a dedicated area in the BMC's EEPROM to store the debug mask. When the user adjusts the debug level through the IPMI command, the BMC writes the corresponding debug mask to the dedicated area of ​​the EEPROM. When the BIOS starts, it reads the current debug mask from the dedicated area of ​​the BMC's EEPROM. The debug mask read will be set as the debug mask that takes effect during the BIOS startup process, and is used to control the type of debug information output during the BIOS startup process.

[0125] In summary, the debug log information mask can be stored in the target storage unit through the BIOS setup interface or the remote IPMI command, so that after the BIOS reads the debug log information mask in the storage unit, the debug log information output during the basic input and output system startup process is controlled according to the debug log information mask, thereby controlling the output detail of the debug information. The user's instruction to adjust the debug log information level and the BIOS debug log information output setting are synchronized to ensure the consistency of the two, avoiding management problems caused by asynchronous settings, simplifying the setting process, reducing the possibility of human errors, and simplifying the operation process to improve the efficiency of system management.

[0126] Figure 3 The following is a flow chart of obtaining a debug mask from a BMC during a BIOS startup process provided by an embodiment of the present invention. The flow chart includes the following steps:

[0127] After the basic input and output system (BIOS) is started, the BIOS sends an IPMI command to read the Debug level to the server management controller (BMC) and receives the return value from the BMC;

[0128] Among them, there is a dedicated area in the BMC's EEPROM to store the Debug mask. When the user adjusts the Debug level through the IPMI command, the BMC writes the corresponding Debug mask into the dedicated area of ​​the EEPROM.

[0129] Determine whether the return value is a valid return value;

[0130] If the return value of the BMC is a valid return value, the debug mask corresponding to the return value is set as the debug mask effective during the BIOS startup process, and the type of debug information output during the BIOS startup process is controlled based on the debug mask.

[0131] The method for determining whether the return value is a valid return value is to compare the return value with a preset return value. If the return value matches the preset return value, the return value is a valid return value; if the return value does not match the preset return value, the return value is not a valid return value.

[0132] It should be noted that the reason for judging whether the return value is valid here is the same as the reason for judging whether the debug log information mask is a valid mask, both of which are to avoid the situation where the user triggers an error in the debug log information mask, which will not be repeated here.

[0133] This embodiment provides a debugging log information output device, such as Figure 4 As shown, it includes: an acquisition module 201 and a control module 202.

[0134] The acquisition module 201 is used to acquire the debug log information mask from the target storage unit after the basic input and output system is started; the target storage unit stores at least one preset debug log information mask;

[0135] The control module 202 is used to control the output of debug log information during the startup of the basic input and output system based on the debug log information mask; the debug log information mask is used to indicate the debug log information level corresponding to the basic input and output system; the debug log information level is used to indicate the type of debug log information output during the startup of the basic input and output system.

[0136] In an optional embodiment, the acquisition module 201 is specifically configured to:

[0137] Get instructions for adjusting the debug log information level;

[0138] Generate a debug log information mask according to the debug log information level indicated in the instruction for obtaining and adjusting the debug log information level;

[0139] The debug log information mask is stored in the target storage unit.

[0140] In an optional implementation, the acquisition module 201 is further configured to:

[0141] In response to a first operation by the user, displaying a basic input / output system setting interface;

[0142] In response to the user's input operation in the mask input control of the basic input and output system setting interface, a debug log information mask is correspondingly generated;

[0143] The debug log information mask is stored in the target storage unit.

[0144] In an optional implementation, the acquisition module 201 is further configured to:

[0145] In response to a first operation by the user, displaying a basic input / output system setting interface;

[0146] In response to the user inputting an operation on the level input control of the basic input / output system setting interface, an instruction for obtaining and adjusting the debug log information level is generated accordingly;

[0147] Generate a debug log information mask according to the debug log information level indicated in the instruction for obtaining and adjusting the debug log information level;

[0148] The debug log information mask is stored in the target storage unit.

[0149] Optionally, storing the debug log information mask in the target storage unit includes:

[0150] The server management controller writes the debug log information mask into the dedicated area of ​​the electrically erasable and programmable ROM to replace the original debug log information mask in the dedicated area of ​​the electrically erasable and programmable ROM.

[0151] In an optional embodiment, the control module 202 is specifically configured to:

[0152] Acquire various debug log information to be output during the basic input and output system startup process; the debug log information to be output includes a debug log information identification code; the debug log information identification code is related to the type of the debug log information to be output; the debug log information identification code is the same length as the debug log information mask;

[0153] For any debug log information to be output, each character in the identification code of the debug log information to be output is bitwise ANDed with each character in the debug log information mask to obtain the operation result of the debug log information to be output; the operation result is 1, indicating that the debug log information to be output is allowed to be output at the debug log information level; the operation result is 0, indicating that the debug log information to be output is not allowed to be output at the debug log information level;

[0154] According to the calculation results of each of the debug log information to be output, select the target output debug log information that is allowed to be output under the debug log information level;

[0155] The target debugging log information is output and displayed on a display unit of the target device.

[0156] The debug information output of BIOS is controlled by defining debug mask and debug information identification code. The debug mask is a data of several bytes (such as 4 bytes) used to indicate which level of debug information should be output. The debug information identification code is a data with the same length as the debug mask, in which only one bit is 1 and the rest of the bits are 0. All debug information in BIOS is divided into multiple levels according to factors such as importance. Each time it is determined whether to output a certain debug information, the debug information identification code and the debug mask are bitwise ANDed. The result of 0 indicates that the debug information is not output, and the result of 1 indicates that the debug information is output.

[0157] In an optional embodiment, the device further includes a determination module 203, which is specifically configured to:

[0158] Before controlling the output of debug log information during the startup of the basic input and output system based on the debug log information mask, determining whether the debug log information mask is a valid mask;

[0159] If the debug log information mask is a valid mask, the debug log information mask is written into the basic input and output system to make the debug log information mask setting effective.

[0160] The determining whether the debug log information mask is a valid mask includes:

[0161] If the debug log information mask matches the preset mask, it is valid;

[0162] If the debug log message mask does not match the preset mask, it will have no effect.

[0163] The embodiment of the present invention also provides a computer device having the above Figure 4The debug log information output device is shown.

[0164] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.

[0165] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware integrated circuit. The hardware integrated circuit may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.

[0166] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0167] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of a computer device based on the presentation of a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0168] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0169] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.

[0170] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0171] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0172] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0173] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for outputting debugging log information, characterized in that: The method comprises: When the basic input and output system is started, a debug log information mask is obtained from a target storage unit; the target storage unit stores at least one preset debug log information mask; The debug log information output during the basic input and output system startup process is controlled based on the debug log information mask; the debug log information mask is used to indicate the debug log information level corresponding to the basic input and output system; the debug log information level is used to indicate the type of debug log information output during the basic input and output system startup process.

2. The method according to claim 1, characterized in that The method further comprises: Get instructions for adjusting the debug log information level; Generate a debug log information mask according to the debug log information level indicated in the instruction for obtaining and adjusting the debug log information level; The debug log information mask is stored in the target storage unit.

3. The method according to claim 1, characterized in that The method further comprises: In response to a first operation by the user, displaying a basic input / output system setting interface; In response to the user input operation in the mask input control of the basic input and output system setting interface, a debug log information mask is correspondingly generated; The debug log information mask is stored in the target storage unit.

4. The method according to claim 2 or 3, characterized in that: The step of storing the debug log information mask in the target storage unit comprises: The server management controller writes the debug log information mask into the dedicated area of ​​the electrically erasable and programmable ROM to replace the original debug log information mask in the dedicated area of ​​the electrically erasable and programmable ROM.

5. The method according to any one of claims 1 to 3, characterized in that: Before controlling the output of debug log information during the startup of the basic input and output system based on the debug log information mask, the method further includes: Determine whether the debug log information mask is a valid mask; If the debug log information mask is a valid mask, the debug log information mask is written into the basic input and output system to make the debug log information mask setting effective.

6. The method according to claim 5, characterized in that The determining whether the debug log information mask is a valid mask includes: If the debug log information mask matches the preset mask, it is valid; If the debug log message mask does not match the preset mask, it will have no effect.

7. The method according to any one of claims 1 to 3, characterized in that: The method of controlling the output of debug log information during the startup of the basic input and output system based on the debug log information mask includes: Acquire various debug log information to be output during the basic input and output system startup process; the debug log information to be output includes a debug log information identification code; the debug log information identification code to be output is related to the type of the debug log information to be output; the debug log information identification code is the same length as the debug log information mask; For any debug log information to be output, each character in the identification code of the debug log information to be output is bitwise ANDed with each character in the debug log information mask to obtain the operation result of the debug log information to be output; the operation result is 1, indicating that the debug log information to be output is allowed to be output at the debug log information level; the operation result is 0, indicating that the debug log information to be output is not allowed to be output at the debug log information level; According to the calculation results of each of the debug log information to be output, select the target output debug log information that is allowed to be output under the debug log information level; The target debugging log information is output and displayed on a display unit of the target device.

8. A debug log information output device, characterized in that: Applied to the method for outputting debug log information according to any one of claims 1 to 7, the device comprises: An acquisition module, used for acquiring a debug log information mask from a target storage unit after the basic input and output system is started; the target storage unit stores at least one preset debug log information mask; A control module is used to control the output of debug log information during the startup of a basic input / output system based on the debug log information mask; the debug log information mask is used to indicate the debug log information level corresponding to the basic input / output system; the debug log information level is used to indicate the type of debug log information output during the startup of the basic input / output system.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the debugging log information output method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the debugging log information output method according to any one of claims 1 to 7.