A system and method for a server to receive and store BIOS serial port logs
By introducing BIOS, BMC, log collection module and control module systems into the server, the cumbersome problem of the BIOS serial port log collection process in the prior art is solved, and simplified log collection and storage is realized, saving manpower and time costs.
Patent Information
- Application Number
- CN202210871080.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-22
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2042-07-22
AI Technical Summary
During the server development and debugging process of the prior art, the setting of the serial port log through the COM port is more cumbersome, resulting in a lot of labor and time costs.
It provides a system for server to receive and store BIOS serial port logs, including BIOS, BMC, host, log collection module, and control module. BMC is used to check the status of the BIOS serial port, set the BIOS serial port parameters, and connect it to the host through the control module. The log collection module is used to receive and store the BIOS serial port log.
This method simplifies the collection process of BIOS logs, reduces dependence on external devices, reduces the complexity of settings, saves labor and time costs, and has a simple structure and a wide range of application prospects.
Smart Images

Figure CN115080359B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of server log storage, and particularly relates to a system and method for a server to receive and store BIOS serial port logs. Background Art
[0002] During the process of BIOS starting up to initialize the hardware and boot and load the OS, the running logs of the BIOS will be printed through the serial port. Thus, during the server development and debugging process, technicians can output the serial port logs through the COM port, that is, by connecting the serial port cable to view the output of the BIOS logs in real time, and develop and debug the BIOS according to the BIOS logs.
[0003] Using the above method requires preparing devices such as serial port cables, auxiliary test machines, and software for capturing serial ports, and the settings are relatively cumbersome. The human and time costs are relatively high. Summary of the Invention
[0004] Aiming at the problems that the method of outputting serial port logs through the COM port, that is, the method of viewing the output of BIOS logs in real time by connecting the serial port cable, has relatively cumbersome settings and high human and time costs, the present invention provides a system and method for a server to receive and store BIOS serial port logs.
[0005] On the one hand, the technical solution of the present invention provides a system for a server to receive and store BIOS serial port logs, including BIOS, BMC, host, log collection module, and control module;
[0006] The BMC is connected to the BIOS, and the BMC is used to check the BIOS serial port status and set the BIOS serial port parameters;
[0007] The BMC is connected to the host through the control module, and the BMC operates on the host through the control module;
[0008] The BMC is connected to the log collection module, and the BMC is used to set the serial port parameters of the log collection module and set the storage permissions of the log collection module;
[0009] The BIOS is connected to the log collection module through the host, and the BIOS is used to open the serial port on the host and send serial port information to the log collection module;
[0010] The log collection module is used to receive and store the BIOS serial port logs according to the serial port information sent by the BIOS and the permission information set by the BMC.
[0011] Preferably, when the BMC checks that the current BIOS serial port status is closed, it sends an instruction to open the serial port to the BIOS and restarts the host through the control module.
[0012] Preferably, after receiving the open serial port instruction sent by the BMC, the BIOS is used to open the serial port on the host and send the serial port information on the host to the log collection module.
[0013] Preferably, the BMC is further used to obtain the current serial port parameter configuration in the log collection module, compare the obtained current serial port parameter configuration in the log collection module with the serial port parameter configuration in the BIOS, and if the configurations are consistent, send read and write permissions to the log collection module.
[0014] Preferably, when the current serial port parameter configuration in the obtained log collection module is inconsistent with the serial port parameter configuration in the BIOS, the BMC is further used to modify the serial port parameters of the log collection module.
[0015] Preferably, the BMC is further used to send an operation log instruction to the log collection module to process the current log.
[0016] Preferably, when the log collection module has collected the logs, the BMC reads the logs in the log collection module;
[0017] When it is necessary to delete the logs, the BMC deletes the logs in the log collection module.
[0018] The BMC is responsible for checking the BIOS serial port status, controlling the BIOS serial port settings under the BIOS setup, and controlling the serial port setting function of the log collection module. The BMC uses the ipmitool OEM instruction to check the current BIOS serial port status, and opens or closes the BIOS serial port and sets the BIOS serial port parameters by sending the ipmitool OEM instruction. The BMC obtains and sets the serial port parameters of the log collection module through ipmitool OEM, and controls the storage permissions of the log collection module, including operations such as reading, writing, and deleting.
[0019] The BIOS is responsible for opening the BIOS serial port and sending a signal to the log collection module.
[0020] The log collection module receives and stores the BIOS serial port logs according to the signals given by the BIOS and the BMC.
[0021] The BMC performs operations such as powering on / off and restarting the host through the control module.
[0022] Second aspect, the technical solution of the present invention also provides a method for a server to receive and store BIOS serial port logs. The method is based on a system for a server to receive and store BIOS serial port logs. The system includes a BIOS, a BMC, a host, a log collection module, and a control module; the BMC is connected to the BIOS, and the BMC is used to check the BIOS serial port status and set BIOS serial port parameters; the BMC is connected to the host through the control module, and the BMC operates on the host through the control module; the BMC is connected to the log collection module, and the BMC is used to set the serial port parameters of the log collection module and set the storage permission of the log collection module; the BIOS is connected to the log collection module through the host, and the BIOS is used to open the serial port on the host and send serial port information to the log collection module; the log collection module is used to receive and store BIOS serial port logs according to the serial port information sent by the BIOS and the permission information set by the BMC. The method includes the following steps:
[0023] Step 1: When it is necessary to capture BIOS logs, the BMC obtains the current BIOS serial port status;
[0024] If the serial port status is closed, execute Step 2; if the serial port status is open, execute Step 3;
[0025] Step 2: Send an instruction to open the serial port to the BIOS; execute Step 3;
[0026] Step 3: The BMC restarts the host through the control module;
[0027] Step 4: The BIOS opens the serial port on the host and sends the serial port information on the host to the log collection module;
[0028] Step 5: The BMC obtains the current serial port parameter configuration in the log collection module and compares the obtained current serial port parameter configuration in the log collection module with the serial port parameter configuration in the BIOS;
[0029] If the configurations are the same, execute Step 6; if the configurations are different, execute Step 7;
[0030] Step 6: The BMC sends read and write permissions to the log collection module; execute Step 8;
[0031] Step 7: The BMC modifies the serial port parameters of the log collection module; execute Step 5;
[0032] Step 8: The log collection module receives and stores the BIOS serial port logs.
[0033] Preferably, after the step of the log collection module receiving and storing the BIOS serial port logs, it further includes:
[0034] Step 9: The BMC sends an operation log instruction to the log collection module to process the current log.
[0035] Preferably, the step of the BMC sending an operation log instruction to the log collection module to process the current log includes:
[0036] When the log collection module has collected the logs, the BMC reads the logs in the log collection module;
[0037] When it is necessary to delete the logs, the BMC deletes the logs in the log collection module.
[0038] From the above technical solutions, it can be seen that the present invention has the following advantages: The method provided in this application is used to collect BIOS logs, which is simple and easy to operate; it does not require connecting external devices; after the setting is successful, it does not occupy the BMC serial port channel. It can greatly save the time and labor costs of R & D personnel and save equipment costs.
[0039] In addition, the design principle of the present invention is reliable, the structure is simple, and it has a very wide application prospect.
[0040] Thus, compared with the prior art, the present invention has prominent substantive features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0042] Figure 1 is a schematic flowchart of the method of an embodiment of the present invention.
[0043] Figure 2 is a schematic block diagram of the device of an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0044] During the process of the BIOS booting up to initialize the hardware and boot the OS, the running logs of the BIOS will be printed through the serial port. In this way, during the server development and debugging process, technicians can output the serial port logs through the COM port, that is, by connecting the serial cable to view the output of the BIOS logs in real time, and develop and debug the BIOS according to the BIOS logs. Using the above method requires preparing devices such as serial cables, auxiliary test machines, and software for capturing the serial port, and the settings are relatively cumbersome. The human and time costs are relatively high. The present invention proposes a method for a server to receive and store BIOS serial port logs. This method includes functions such as opening, receiving, storing, and deleting BIOS logs. This method mainly solves the problems that the server test for capturing BIOS serial port logs occupies devices and has cumbersome settings, can reduce operations, and save manpower. It is a method for receiving and storing BIOS logs without connecting external devices. In order to enable those skilled in the art to better understand the technical solutions in the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0045] As Figure 1 shown, Embodiment 1 of the present invention provides a system for a server to receive and store BIOS serial port logs, including a BIOS, a BMC, a host, a log collection module, and a control module;
[0046] The BMC is connected to the BIOS, and the BMC is used to check the BIOS serial port status and set the BIOS serial port parameters;
[0047] The BMC is connected to the host through the control module, and the BMC operates on the host through the control module;
[0048] The BMC is connected to the log collection module, and the BMC is used to set the serial port parameters of the log collection module and set the storage permissions of the log collection module; the BMC is connected to the host;
[0049] The BIOS is connected to the log collection module through the host, and the BIOS is used to open the serial port on the host and send serial port information to the log collection module;
[0050] The log collection module is used to receive and store the BIOS serial port logs according to the serial port information sent by the BIOS and the permission information set by the BMC.
[0051] When it is necessary to capture the BIOS log, the BMC obtains the current BIOS serial port status; sets the BIOS serial port parameters, and the BMC restarts the host through the control module; the BIOS turns on the serial port on the host and sends the serial port information on the host to the log collection module; when the current serial port parameter configuration in the log collection module is consistent with the serial port parameter configuration in the BIOS, the BMC sends read and write permissions to the log collection module; the log collection module receives and stores the BIOS serial port log.
[0052] Embodiment 2 of the present invention provides a system for a server to receive and store BIOS serial port logs, including a BIOS, a BMC, a host, a log collection module, and a control module;
[0053] The BMC is connected to the BIOS, and the BMC is used to check the BIOS serial port status and set the BIOS serial port parameters;
[0054] The BMC is connected to the host through the control module, and the BMC operates on the host through the control module;
[0055] The BMC is connected to the log collection module, and the BMC is used to set the serial port parameters of the log collection module and set the storage permissions of the log collection module; the BMC is connected to the host;
[0056] The BIOS is connected to the log collection module through the host. After receiving the open serial port instruction sent by the BMC, the BIOS turns on the serial port on the host and sends the serial port information on the host to the log collection module;
[0057] The log collection module is used to receive and store the BIOS serial port log according to the serial port information sent by the BIOS and the permission information set by the BMC.
[0058] When the BMC checks that the current BIOS serial port status is closed, it sends an open serial port instruction to the BIOS and restarts the host through the control module. The BMC is also used to obtain the current serial port parameter configuration in the log collection module, compare the obtained current serial port parameter configuration in the log collection module with the serial port parameter configuration in the BIOS. If the configurations are consistent, it sends read and write permissions to the log collection module; if the parameter configurations are inconsistent, it modifies the serial port parameters of the log collection module.
[0059] Embodiment 3 of the present invention provides a system for a server to receive and store BIOS serial port logs, including a BIOS, a BMC, a host, a log collection module, and a control module;
[0060] The BMC is connected to the BIOS, and the BMC is used to check the BIOS serial port status and set the BIOS serial port parameters;
[0061] The BMC is connected to the host through a control module, and the BMC operates on the host through the control module;
[0062] The BMC is connected to a log collection module. The BMC is used to set the serial port parameters of the log collection module and set the storage permissions of the log collection module; the BMC is connected to the host;
[0063] The BIOS is connected to the log collection module through the host. The BIOS is used to open the serial port on the host and send the serial port information on the host to the log collection module after receiving the open serial port instruction sent by the BMC;
[0064] The log collection module is used to receive and store the BIOS serial port logs according to the serial port information sent by the BIOS and the permission information set by the BMC.
[0065] When the BMC checks that the current BIOS serial port status is closed, it sends an open serial port instruction to the BIOS and restarts the host through the control module. The BMC is also used to obtain the current serial port parameter configuration in the log collection module, compare the obtained current serial port parameter configuration in the log collection module with the serial port parameter configuration in the BIOS. If the configurations are the same, it sends read and write permissions to the log collection module; if the parameter configurations are different, it modifies the serial port parameters of the log collection module.
[0066] The BMC is also used to send an operation log instruction to the log collection module to process the current logs. When the log collection module has collected the logs, the BMC reads the logs in the log collection module; when it is necessary to delete the logs, the BMC deletes the logs in the log collection module.
[0067] The BMC is responsible for checking the BIOS serial port status, controlling the BIOS serial port settings under BIOS setup, and controlling the serial port setting function of the log collection module. The BMC uses the ipmitool OEM instruction to check the current BIOS serial port status, opens or closes the BIOS serial port and sets the BIOS serial port parameters by sending the ipmitool OEM instruction. The BMC obtains and sets the serial port parameters of the log collection module through ipmitool OEM, and controls the storage permissions of the log collection module, including operations such as reading, writing, and deleting. The BIOS is responsible for opening the BIOS serial port and sending a signal to the log collection module. The log collection module receives and stores the BIOS serial port logs according to the signals given by the BIOS and the BMC. The BMC performs operations such as powering on / off and restarting the host through the control module. The processing process is as follows:
[0068] Step 1: When it is necessary to capture the BIOS log, the BMC obtains the current BIOS serial port status by running the ipmitool OEM instruction. If it is closed, it sends the ipmitool OEM serial port opening instruction to the BIOS and restarts the host through the control module.
[0069] Step 2: The BIOS opens the serial port on the host and sends the serial port information on the host to the log collection module.
[0070] Step 3: The BMC obtains the current serial port parameter configuration in the log collection module through the ipmitool OEM instruction and compares it with the serial port parameter configuration in the BIOS. If the configurations are the same, it sends read and write permissions to the log collection module. If they are different, the BMC modifies the parameters of the log collection module through the ipmitool OEM.
[0071] Step 4: The log collection module receives the signals in Steps 2 and 3 and receives and stores the BIOS serial port log.
[0072] Step 5: When the log collection is complete, the BMC reads the log in the log collection module through the ipmitool OEM instruction.
[0073] Step 6: When it is necessary to delete the log, the BMC deletes the log in the log collection module through the ipmitool OEM instruction.
[0074] Such as Figure 2As shown in the figure, Embodiment 4 of the present invention provides a method for a server to receive and store BIOS serial port logs. The method is based on a system for a server to receive and store BIOS serial port logs. The system includes a BIOS, a BMC, a host, a log collection module, and a control module. The BMC is connected to the BIOS and is used to check the BIOS serial port status and set BIOS serial port parameters. The BMC is connected to the host through the control module and operates on the host through the control module. The BMC is connected to the log collection module and is used to set the serial port parameters of the log collection module and set the storage permissions of the log collection module. The BIOS is connected to the log collection module through the host and is used to open the serial port on the host and send serial port information to the log collection module. The log collection module is used to receive and store BIOS serial port logs according to the serial port information sent by the BIOS and the permission information set by the BMC. The BMC is responsible for checking the BIOS serial port status, controlling the BIOS serial port settings under BIOS setup, and controlling the serial port setting function of the log collection module. The BMC uses the ipmitool OEM instruction to check the current BIOS serial port status, and opens or closes the BIOS serial port and sets the BIOS serial port parameters by sending the ipmitool OEM instruction. The BMC obtains and sets the serial port parameters of the log collection module through ipmitool OEM, and controls the storage permissions of the log collection module, including operations such as reading, writing, and deleting. The BIOS is responsible for opening the BIOS serial port and sending a signal to the log collection module. The log collection module receives and stores the BIOS serial port logs according to the signals given by the BIOS and the BMC. The BMC operates on the host, such as powering on / off and restarting, through the control module. The method includes the following steps:
[0075] Step 1: When it is necessary to capture BIOS logs, the BMC obtains the current BIOS serial port status;
[0076] If the serial port status is closed, execute Step 2; if the serial port status is open, execute Step 3;
[0077] Step 2: Send an instruction to open the serial port to the BIOS; execute Step 3;
[0078] Step 3: The BMC restarts the host through the control module;
[0079] Step 4: The BIOS opens the serial port on the host and sends the serial port information on the host to the log collection module;
[0080] Step 5: The BMC obtains the current serial port parameter configuration in the log collection module and compares the obtained current serial port parameter configuration in the log collection module with the serial port parameter configuration in the BIOS;
[0081] If the configurations are the same, execute Step 6; if the configurations are different, execute Step 7;
[0082] Step 6: The BMC sends read / write permissions to the log collection module; execute Step 8;
[0083] Step 7: The BMC modifies the serial port parameters of the log collection module; execute Step 5;
[0084] Step 8: The log collection module receives and stores the BIOS serial port logs.
[0085] Step 9: The BMC sends an operation log instruction to the log collection module to process the current logs, specifically including: when the log collection module has collected the logs, the BMC reads the logs in the log collection module; when it is necessary to delete the logs, the BMC deletes the logs in the log collection module.
[0086] Although the present invention has been described in detail by referring to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, those of ordinary skill in the art can make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions should all fall within the scope of the present invention. / Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A system for a server to receive and store BIOS serial port logs, characterized in that, It includes BIOS, BMC, host, log collection module, and control module; The BMC is connected to the BIOS, and the BMC is used to check the BIOS serial port status and set the BIOS serial port parameters; The BMC is connected to the host through the control module, and the BMC operates on the host through the control module; specifically, when the BMC checks that the current BIOS serial port status is closed, it sends an instruction to open the serial port to the BIOS and restarts the host through the control module; The BMC is connected to the log collection module, and the BMC is used to set the serial port parameters of the log collection module and set the storage permissions of the log collection module; The BIOS is connected to the log collection module through the host, and the BIOS is used to open the serial port on the host and send serial port information to the log collection module; The log collection module is used to receive and store the BIOS serial port logs according to the serial port information sent by the BIOS and the permission information set by the BMC.
2. The system for the server to receive and store BIOS serial port logs according to claim 1, wherein The BIOS is used to open the serial port on the host after receiving the instruction to open the serial port sent by the BMC, and send the serial port information on the host to the log collection module.
3. The system for the server to receive and store BIOS serial port logs according to claim 2, wherein The BMC is also used to obtain the current serial port parameter configuration in the log collection module, compare the obtained current serial port parameter configuration in the log collection module with the serial port parameter configuration in the BIOS, and if the configurations are consistent, send read / write permissions to the log collection module.
4. The system for the server to receive and store BIOS serial port logs according to claim 3, wherein, The BMC is also used to modify the serial port parameters of the log collection module when the obtained current serial port parameter configuration in the log collection module is inconsistent with the serial port parameter configuration in the BIOS.
5. The system for the server to receive and store BIOS serial port logs according to claim 4, wherein The BMC is also used to send an operation log instruction to the log collection module to process the current logs.
6. The system for the server to receive and store the BIOS serial port logs according to claim 5, wherein When the log collection module has collected the logs, the BMC reads the logs in the log collection module; the BMC deletes the logs in the log collection module.
7. A method for a server to receive and store BIOS serial port logs, where the server is implemented based on the system described in any one of claims 1-6, characterized in that, It includes the following steps: Step 1: When it is necessary to capture the BIOS logs, the BMC obtains the current BIOS serial port status; If the serial port status is closed, execute Step 2; if the serial port status is open, execute Step 3; Step 2: Send an instruction to open the serial port to the BIOS; execute Step 3; Step 3: The BMC restarts the host through the control module; Step 4: The BIOS opens the serial port on the host and sends the serial port information on the host to the log collection module; Step 5: The BMC obtains the current serial port parameter configuration in the log collection module and compares the obtained current serial port parameter configuration in the log collection module with the serial port parameter configuration in the BIOS; If the configurations are consistent, execute Step 6; if the configurations are inconsistent, execute Step 7; Step 6: The BMC sends read / write permissions to the log collection module; execute Step 8; Step 7: The BMC modifies the serial port parameters of the log collection module; execute Step 5; Step 8: The log collection module receives and stores the BIOS serial port logs.
8. The method for a server to receive and store BIOS serial port logs according to claim 7, wherein After the step where the log collection module receives and stores the BIOS serial port logs, it also includes: Step 9: The BMC sends an operation log instruction to the log collection module to process the current logs.
9. The method for a server to receive and store BIOS serial port logs according to claim 8, wherein The step where the BMC sends an operation log instruction to the log collection module to process the current logs includes: When the log collection is completed, the BMC reads the logs in the log collection module; When the logs need to be deleted, the BMC deletes the logs in the log collection module.
Citation Information
Patent Citations
System and method for remotely triggering server system to generate kernel crash logs
CN108923965A
BIOS software debugging control method and system and server
CN109683964A