Display information acquisition method, device, electronic device and storage medium
Through the out-of-band management interface and shared memory area of the BMC system, the problem of in-band management affecting the operation of the server is solved, efficient acquisition of display information is achieved, and operation and maintenance management efficiency is improved.
Patent Information
- Application Number
- CN202211685998.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-12-27
AI Technical Summary
In the prior art, obtaining the dmesg information of the server through in-band management will affect the current operation of the server, resulting in low operation and maintenance management efficiency.
The BMC system uses the substrate management controller to communicate with the server through the out-of-band management interface, uses the shared memory area and the non-shared memory area to store the display information, and judges the server status through the update flag, so as to obtain the display information without affecting the operation of the server.
It realizes efficient acquisition of display information without affecting the current operation of the server, and improves the server's operation and maintenance management efficiency.
Smart Images

Figure CN115934447B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of operation and maintenance management technology, and in particular to a display information acquisition method, a display information acquisition device, an electronic device, and a computer-readable storage medium. Background Art
[0002] During server operation, the kernel (operating system kernel) stores boot information as dmesg (display message) information in the ring buffer (ring buffer). Using the dmesg command to view this information is particularly important for device fault diagnosis.
[0003] When dmesg information needs to be obtained, it can only be achieved through in-band management. In-band management means accessing the OS (Operating System) through the server and using the dmesg command in the OS to obtain dmesg information. However, in-band management affects the current operation of the server and thus affects the efficiency of server operation and maintenance management. Summary of the Invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a method for obtaining display information that overcomes the above problems or at least partially solves the above problems.
[0005] The embodiment of the present invention further provides a display information acquisition device, an electronic device and a storage medium to ensure the implementation of the above method.
[0006] To solve the above problems, an embodiment of the present invention discloses a method for obtaining display information, which is applied to a baseboard management controller (BMC) system. The BMC system is connected to a server through an out-of-band management interface. The server is deployed with a basic input and output (BIOS) system. The BMC system is provided with a shared memory area. The method includes:
[0007] When receiving the query instruction, determining whether the update flag in the shared memory area is set to a preset flag; wherein the preset flag is set by the BIOS system when transmitting the first display information to the shared memory area; and the first display information is the display information of the current startup completed after the BIOS system power-on self-test is completed;
[0008] If the update flag is set to the preset flag, it is determined that the server is in a normal state;
[0009] When the server is in a normal state, acquiring the first display information from the shared memory area;
[0010] The first display information is determined as first target display information for the query instruction, and the first target display information is displayed.
[0011] Optionally, the BMC system further includes a non-shared memory area, wherein the non-shared memory area stores the second display information; after determining whether the update flag in the shared memory area is set to a preset flag, the method further includes:
[0012] If the update flag is not set to the preset flag, it is determined that the server is in an abnormal state; wherein the abnormal state includes a shutdown state or a downtime state;
[0013] When the server is in a shutdown state or a down state, obtaining the second display information from the non-shared memory area; wherein the second display information is the display information of the last startup;
[0014] The second display information is determined as second target display information for the query instruction, and the second target display information is displayed.
[0015] Optionally, it also includes:
[0016] Synchronize the first display information to the non-shared memory area.
[0017] Optionally, the BMC system has a web page; determining the first display information as first target display information for the query instruction and displaying the first target display information includes:
[0018] Parsing the first display information according to a preset parsing rule to obtain first target display information for the query instruction;
[0019] The first target display information is displayed on the Web page.
[0020] Optionally, the BMC system has a web page; determining the second display information as second target display information for the query instruction and displaying the second target display information includes:
[0021] Parsing the second display information according to a preset parsing rule to obtain second target display information for the query instruction;
[0022] The second target display information is displayed on the Web page.
[0023] Optionally, after synchronizing the first display information to the non-shared memory area, the method further includes:
[0024] The preset flag is cleared to reset the update flag.
[0025] Optionally, it also includes:
[0026] When a modification instruction is received, the first display information in the shared memory area is modified according to the modification instruction so that the BIOS system writes the modified first display information into the third display information when the computer is powered on next time; the third display information is the display information for the next power-on.
[0027] An embodiment of the present invention further discloses a display information acquisition device, which is applied to a BMC system. The BMC system is connected to a server through an out-of-band management interface. The server is equipped with a BIOS system. The BMC system is provided with a shared memory area. The device includes:
[0028] an update flag determination module, configured to, upon receiving a query instruction, determine whether the update flag in the shared memory area is set to a preset flag; wherein the preset flag is set by the BIOS system when transmitting the first display information to the shared memory area; and wherein the first display information is the display information of the current startup that is updated upon completion of the power-on self-test of the BIOS system.
[0029] A module for determining that the server is in a normal state, configured to determine that the server is in a normal state if the update flag is set to the preset flag;
[0030] A first display information acquisition module is configured to acquire the first display information from the shared memory area when the server is in a normal state;
[0031] The first target display information display module is configured to determine the first display information as the first target display information for the query instruction and display the first target display information.
[0032] Optionally, the BMC system further includes a non-shared memory area, wherein the non-shared memory area stores the second display information; after determining whether the update flag in the shared memory area is set to a preset flag, the method further includes:
[0033] A module for determining that the server is in an abnormal state, configured to determine that the server is in an abnormal state if the update flag is not set to the preset flag; wherein the abnormal state includes a shutdown state or a downtime state;
[0034] A second display information acquisition module is configured to acquire the second display information from the non-shared memory area when the server is in a shutdown state or a down state; wherein the second display information is the display information of the last startup;
[0035] The second target display information display module is configured to determine the second display information as the second target display information for the query instruction and display the second target display information.
[0036] Optionally, it also includes:
[0037] The first display information synchronization module is configured to synchronize the first display information to the non-shared memory area.
[0038] Optionally, the BMC system has a web page; the first target display information display module includes:
[0039] a first display information parsing submodule, configured to parse the first display information according to a preset parsing rule to obtain first target display information corresponding to the query instruction;
[0040] The first target display information display submodule is configured to display the first target display information on the Web page.
[0041] Optionally, the BMC system has a web page; and the second target display information display module includes:
[0042] a second display information parsing submodule, configured to parse the second display information according to a preset parsing rule to obtain second target display information corresponding to the query instruction;
[0043] The second target display information display submodule is configured to display the second target display information on the Web page.
[0044] Optionally, after synchronizing the first display information to the non-shared memory area, the method further includes:
[0045] The reset module is used to clear the preset flag to reset the update flag.
[0046] Optionally, it also includes:
[0047] The modification module is used to modify the first display information in the shared memory area according to the modification instruction when receiving the modification instruction, so that the BIOS system writes the modified first display information into the third display information when the computer is turned on next time; the third display information is the display information for the next startup.
[0048] An embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0049] The memory is used to store computer programs;
[0050] The processor is configured to implement the display information acquisition method according to the embodiment of the present invention when executing the program stored in the memory.
[0051] The embodiment of the present invention further discloses one or more computer-readable media having instructions stored thereon, which, when executed by one or more processors, enable the processors to execute the display information acquisition method as described in the embodiment of the present invention.
[0052] Compared with the prior art, the embodiments of the present invention have the following advantages:
[0053] In an embodiment of the present invention, a BMC system is provided with a shared memory area. When a query instruction is received, the BMC system determines whether an update flag in the shared memory area is set to a preset flag. The preset flag is set by the BIOS system when transmitting first display information to the shared memory area. The first display information is the display information for the current boot that is updated at the end of the BIOS system power-on self-test. If the update flag is set to the preset flag, the BMC system determines that the server is in a normal state. When the server is in a normal state, the BMC system obtains the first display information from the shared memory area. The BMC system determines the first display information as the first target display information for the query instruction and displays the first target display information. In an embodiment of the present invention, the BMC system provides a shared memory area, which is readable and writable by both the BMC system and the BIOS system. Thus, the BMC system can obtain the display information transmitted by the BIOS system through the shared memory area, thereby realizing the acquisition of display information based on an out-of-band management method. The out-of-band management method does not affect the current operation of the server, and thus can greatly improve the efficiency of the operation and maintenance management of the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] 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 description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0055] Figure 1 This is a flowchart of a method for obtaining display information provided by an embodiment of the present invention;
[0056] Figure 2 is a flowchart of another method for obtaining display information provided by an embodiment of the present invention;
[0057] Figure 3 is a flow chart of display information acquisition provided by an embodiment of the present invention;
[0058] Figure 4 This is a structural block diagram of a display information acquisition device provided by an embodiment of the present invention;
[0059] Figure 5 is a structural block diagram of an electronic device provided by an embodiment of the present invention;
[0060] Figure 6 It is a structural block diagram of a computer-readable storage medium provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0061] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0062] Reference Figure 1 , shows a flowchart of a method for obtaining display information provided by an embodiment of the present invention, which is applied to a BMC system. The BMC system is connected to a server through an out-of-band management interface. The server is equipped with a BIOS system. The BMC system is provided with a shared memory area. The method may specifically include the following steps:
[0063] Step 101, when a query instruction is received, determine whether the update flag in the shared memory area is set to a preset flag; wherein, the preset flag is set by the BIOS system when transmitting the first display information to the shared memory area; the first display information is the display information of this startup that is updated when the BIOS system power-on self-test ends.
[0064] The embodiments of the present invention can be applied to the BMC system. The BMC (Baseboard Management Controller) is the core functional system of the server, responsible for core functions such as hardware status management, operating system management, health status management, and power consumption management. In short, the BMC system is equivalent to an external management and control system, facilitating server management. Even if the BMC system is abnormal, it will not affect the current operation of the server.
[0065] Specifically, during the operation and maintenance management of the server, the BMC system can communicate with the server through the out-of-band management interface, so that the BMC system can monitor and manage server asset information in real time based on the out-of-band management interface. For example, it can check the configuration and operating status of devices such as processors, memory, and hard disks, query the firmware version information such as BIOS or BMC or CPLD (Complex Programmable Logic Device), or perform version upgrades and upgrades.
[0066] Servers are equipped with a BIOS (Basic Input / Output System). The BIOS is a set of programs embedded in a ROM (Read Only Memory Image) chip on the computer's motherboard. The BIOS stores the computer's most important basic input / output (BIO) programs, post-boot self-test programs, and system startup programs. Its primary function is to provide the most basic and direct hardware configuration and control for the computer. Simply put, the BIOS is the basic input / output system that controls server startup. It is a server's most fundamental and indispensable system. A normal BIOS is required for the OS to function properly.
[0067] This embodiment of the present invention utilizes a novel H2B (Host to BMC) shared memory interaction method. The H2B shared memory can be the BMC system's DRAM (Dynamic Random Access Memory). After the host sends display information, the BMC system does not need to process it immediately; it only needs to obtain the display information upon receiving a user query. The host includes the BIOS system, so the H2B shared memory area can be considered the shared memory area for interaction between the BIOS system and the BMC system. In other words, the shared memory area provided by the BMC system is readable and writable by both the BMC system and the BIOS system.
[0068] In an embodiment of the present invention, if a user wishes to query display information, the user may enter a query command on the BMC system's web page. The shared memory area provided by the BMC system has an Update Flag. Upon receiving the query command, the BMC system may first check whether the Update Flag is set to a preset value.
[0069] Among them, the preset identifier is set by the BIOS system when transmitting the first display information to the shared memory area Share Memory, and the first display information is the display information of this startup that is updated at the end of the BIOS system POST (Power On Self Test). Specifically, the server is turned on and powered on until the BIOS system POST ends, so that the dmesg information of this startup is updated. Then the BIOS system can use the CRC (Cyclic Redundancy Check) verification method to check whether the interaction function with the BMC system is normal. If the interaction function between the BIOS system and the BMC system is normal, then the BIOS system can transmit the dmesg information of this startup as the first dmesg information to the shared memory area Share Memory. At this time, the BIOS system can set the update flag Update Flag in the shared memory area Share Memory and set the update flag Update Flag to the preset identifier.
[0070] It's important to note that dmesg (display message) can be used to display the contents of the kernel ring buffer. The kernel stores various messages in dmesg. During system boot, the kernel fills the kernel ring buffer with information related to hardware and module initialization. The kernel (operating system kernel) stores boot information in the ring buffer. Boot information is saved in a file named dmesg in the / var / log directory, forming dmesg information, which in turn forms display information. The information displayed in the kernel ring buffer is often very useful for diagnosing system problems.
[0071] When running dmesg, it displays a large amount of boot information, including but not limited to: hard disk operating mode, network card configuration information, ACPI (Advanced Configuration and Power Interface) detection information, memory allocation, processor information, etc., including mce log (used to check hardware errors on Linux system), hardware devices, system architecture, etc.
[0072] Because dmesg can display multiple operating levels and a large amount of startup information, such as system architecture, CPU (Central Processing Unit), mounted hardware, RAM (Random Access Memory), etc., dmesg contains a lot of content, has a capacity of 0.1MB, and has a large transmission volume. Therefore, the embodiment of the present invention can set up multiple shared memory areas, which can reach megabytes, thereby meeting the need for transmitting large amounts of data at one time.
[0073] In an embodiment of the present invention, each shared memory region may correspond to an Update Flag, and different types of dmesg messages may be stored in different shared memory regions. Therefore, the BIOS system may, based on the type of the first dmesg message, transmit the first dmesg message to the corresponding shared memory region, then set the Update Flag in the corresponding shared memory region to a preset identifier.
[0074] Step 102: If the update flag is set to the preset flag, it is determined that the server is in a normal state.
[0075] In the embodiment of the present invention, the BMC system checks whether the Update Flag is set to a preset flag. If the Update Flag is set to the preset flag, it can be determined that the server is in a normal state, that is, the state after the POST is completed, indicating that the display information of this startup has been successfully updated.
[0076] In one example, the preset flag can be set to 1. When Update Flag = 1, the BMC system can determine that the server is in a normal state. It should be noted that the preset flag is pre-negotiated between the BMC system and the BIOS system. The preset flag can be set according to actual conditions. The embodiment of the present invention does not limit the preset flag.
[0077] Step 103: When the server is in a normal state, obtain the first display information from the shared memory area.
[0078] In the embodiment of the present invention, when the server is in a normal state, it means that the display information of this startup has been updated successfully, then the BMC system can directly obtain the interactive content from the shared memory area Share Memory. The interactive content is the first display information transmitted by the BIOS system.
[0079] Step 104: determine the first display information as first target display information for the query instruction, and display the first target display information.
[0080] In an embodiment of the present invention, after obtaining the first display information, the BMC system may determine the first display information as the first target display information for the query instruction, and then display the first target display information to the user, allowing the user to understand system startup and operation information. The first target display information may include at least one of the following: mce log, mounted hardware, CPU, and system architecture.
[0081] In summary, in an embodiment of the present invention, the BMC system is provided with a shared memory area. When a query instruction is received, the BMC system determines whether the update flag in the shared memory area is set to a preset flag. The preset flag is set by the BIOS system when transmitting the first display information to the shared memory area. The first display information is the display information of the current startup that is updated at the end of the BIOS system power-on self-test. If the update flag is set to the preset flag, the BMC system determines that the server is in a normal state. When the server is in a normal state, the BMC system obtains the first display information from the shared memory area. The BMC system determines the first display information as the first target display information for the query instruction and displays the first target display information. The embodiment of the present invention provides a shared memory area through the BMC system. Both the BMC system and the BIOS system have readable and writable access. Thus, the BMC system can obtain the display information transmitted by the BIOS system through the shared memory area, thereby realizing the acquisition of display information based on an out-of-band management method. The out-of-band management method does not affect the current operation of the server, and thus can greatly improve the efficiency of the operation and maintenance management of the server.
[0082] Reference Figure 2 , shows a flowchart of a method for obtaining display information provided by an embodiment of the present invention, which is applied to a BMC system. The BMC system is connected to a server via an out-of-band management interface. The server is equipped with a BIOS system. The BMC system includes a shared memory area and a non-shared memory area. The non-shared memory area stores second display information. The method may specifically include the following steps:
[0083] Step 201, when a query instruction is received, determines whether the update flag in the shared memory area is set to a preset flag; wherein, the preset flag is set by the BIOS system when transmitting the first display information to the shared memory area; the first display information is the display information of this startup that is updated when the BIOS system power-on self-test ends.
[0084] In the embodiment of the present invention, it can be applied to the BMC system. The BMC system is equivalent to an external management and control system, which is convenient for managing servers. Even if the BMC system is abnormal, it will not affect the current operation of the server.
[0085] Specifically, during the operation and maintenance management of the server, the BMC system can communicate with the server through the out-of-band management interface, so that the BMC system can monitor and manage server asset information in real time based on the out-of-band management interface. For example, it can check the configuration and operating status of devices such as processors, memory, and hard disks, query the firmware version information such as BIOS, BMC, or CPLD, or perform version upgrades and upgrades.
[0086] The server is deployed with a BIOS system, which is equivalent to a basic input and output system that controls the server startup. It is the most basic and indispensable system of the server. Only when the BIOS system is normal can the OS system be entered.
[0087] The BMC system provides a shared memory area, Share Memory, which is readable and writable by both the BMC system and the BIOS. Therefore, when the BIOS system transmits the current boot display information to the BMC system, it can do so through the Share Memory area. The Share Memory area has an Update Flag.
[0088] In a specific implementation, the server boots up and powers on until the BIOS system POST completes, completing the update of the display information for this boot. The BIOS system can then use a CRC check method to verify that the interaction with the BMC system is functioning properly. If the interaction between the BIOS system and the BMC system is functioning properly, the BIOS system can transmit the display information for this boot as the first display information to the shared memory area. At this point, the BIOS system can set the Update Flag to a preset value.
[0089] It should be noted that both the BIOS system and the BMC system can allocate resources in advance and establish interaction standards and Struct structures, so that both the BIOS system and the BMC system can access the shared memory area.
[0090] In an embodiment of the present invention, if a user wishes to query display information, the user may enter a query command on the BMC system's web page. Upon receiving the query command, the BMC system may first check whether an Update Flag in the shared memory area Share Memor is set to a preset flag. Based on the Update Flag, the BMC system may then determine whether to obtain the first display information from the shared memory area Share Memor or the second display information from the non-shared memory area EEPROM.
[0091] It should be noted that EEPROM (Electrically Erasable Programmable Read-Only Memory) is a storage chip that maintains data after a power outage. Therefore, the non-shared EEPROM memory area is the non-volatile memory area of the BMC system, while the shared memory area is the volatile memory area of the BMC system.
[0092] Step 202: If the update flag is set to the preset flag, it is determined that the server is in a normal state; or if the update flag is not set to the preset flag, it is determined that the server is in an abnormal state; wherein the abnormal state includes a shutdown state or a downtime state.
[0093] Since dmesg information can only be obtained through in-band management in the prior art, users need to operate the server system normally to read dmesg information. When the in-band management method is used to view it under the OS system, however, dmesg information cannot be obtained when the system is down or the OS system has not been entered. Therefore, the in-band management method in the prior art is limited to whether the current server is turned on or operating normally. That is, the in-band management method in the prior art can only obtain dmesg information when the server is in a normal state, but cannot obtain dmesg information when the server is in an abnormal state.
[0094] The embodiment of the present invention obtains demsg information based on an out-of-band management method. Specifically, the BMC system obtains demsg information through an out-of-band management interface. Therefore, there is no need to consider whether the current server is powered on or running normally, and there is no need to log in to the OS system. The demsg information can be obtained conveniently and quickly, thereby greatly improving the operation and maintenance management efficiency of the server.
[0095] In the embodiment of the present invention, whether the server is in a normal state or an abnormal state can be determined by whether the update flag Update Flag is set to a preset flag.
[0096] Specifically, if the update flag Update Flag is set to a preset flag, it can be determined that the server is in a normal state, that is, a state after the POST is completed, indicating that the display information of this startup has been successfully updated.
[0097] Specifically, if the Update Flag is not set to a preset value, it can be determined that the server is in an abnormal state, which may include a shutdown state or a down state. If the server is in the shutdown state, the BIOS system cannot perform a POST (power-on self-test), and thus no display information for the current startup will be displayed. If the server is in a down state, the down state will affect the BIOS system's POST process, causing the BIOS system to remain in an uncompleted POST state, and thus unable to update the display information for the current startup.
[0098] Whether in shutdown state or down state, it will affect the POST process of the BIOS system, thereby affecting the update completion of the display information of this startup, and then the data in the shared memory area Share Memor will be invalid.
[0099] In one example, the preset flag can be set to 1. When Update Flag = 1, the BMC system can determine that the server is in a normal state; when Update Flag = 0, the BMC system can determine that the server is in an abnormal state. It should be noted that the preset flag is pre-negotiated between the BMC system and the BIOS system and can be set according to actual circumstances. The embodiments of the present invention do not limit the preset flag.
[0100] Step 203: when the server is in a normal state, obtain the first display information from the shared memory area; or, when the server is in a shutdown state or a down state, obtain the second display information from the non-shared memory area; wherein, the second display information is the display information of the last startup.
[0101] In the embodiment of the present invention, when the server is in a normal state, it means that the display information of this startup has been updated successfully, then the BMC system can obtain the first display information transmitted by the BIOS system from the shared memory area Share Memory, and the first display information is the display information of this startup.
[0102] In an embodiment of the present invention, when the server is in a shutdown state or a down state, it indicates that the display information of this startup fails to be updated. Then the BMC system can obtain the second display information from the non-shared memory area EEPROM. The second display information is the display information of the last startup.
[0103] In an optional embodiment of the present invention, the method may further include:
[0104] Synchronize the first display information to the non-shared memory area.
[0105] In the embodiment of the present invention, the non-shared memory area EEPROM is a non-volatile memory area of the BMC system, that is, data in the non-shared memory area EEPROM is not lost after power failure, while the shared memory area Share Memor is a volatile memory area of the BMC system, that is, data in the shared memory area Share Memor is lost after power failure.
[0106] Therefore, the BMC system can synchronize the first display information with the non-shared memory area EEPROM, allowing the non-shared memory area EEPROM to retain a copy of the first display information. This allows the first display information to be used as the display information from the previous boot at the next boot. In other words, the first display information becomes the second display information at the next boot. Thus, when the server is in the shutdown or down state, although the data in the shared memory area is lost after a power outage, the data in the non-shared memory area EEPROM is not lost after a power outage. Therefore, the BMC system can retrieve the display information from the non-shared memory area EEPROM from the previous boot.
[0107] In addition, the BMC system can perform persistence processing on the shared memory area Share Memor to ensure that the data in the shared memory area Share Memor can be restored to its original state after power failure and power on again. In a specific implementation, since the first display information has been synchronized to the non-shared memory area EEPROM in advance, the first display information can be obtained from the non-shared memory area EEPROM after power failure is restored, and then the first display information can be retransmitted to the shared memory area Share Memor. Since the first display information after power failure is restored is the display information of the last startup, the BMC system can directly obtain the display information of the last startup from the shared memory area Share Memor in this way. This method requires retransmission of data after each power failure, while the data in the non-shared memory area EEPROM is not lost after power failure. Therefore, the embodiment of the present invention can preferably obtain the display information of the last startup from the non-shared memory area EEPROM.
[0108] Step 204: determine the first display information as the first target display information for the query instruction, and display the first target display information; or determine the second display information as the second target display information for the query instruction, and display the second target display information.
[0109] In an embodiment of the present invention, upon obtaining the first display information, the BMC system may determine the first display information as the first target display information for the query instruction, and then display the first target display information to the user, allowing the user to understand the current system startup and operation information. The first target display information may include at least one of the following: mce log, mounted hardware, CPU, and system architecture.
[0110] In an embodiment of the present invention, upon obtaining the second display information, the BMC system may determine the second display information as the second target display information for the query instruction and then display the second target display information to the user, allowing the user to understand the system's last startup and operation information. The second target display information may include at least one of the following: mce log, mounted hardware, CPU, and system architecture.
[0111] In an optional embodiment of the present invention, the BMC system has a web page; determining the first display information as the first target display information for the query instruction and displaying the first target display information may include the following sub-steps:
[0112] Sub-step S11, parsing the first display information according to a preset parsing rule to obtain first target display information for the query instruction;
[0113] Sub-step S12: displaying the first target display information on the Web page.
[0114] In a specific implementation, the BMC system can parse the first display information 5 obtained from the shared memory area Share Memor according to a preset parsing rule to obtain the first target display information for the query instruction. The first target display information can be the mce log, mounted hardware, CPU, system architecture, etc. The BMC system can display the information such as the mce log, mounted hardware, CPU, and system architecture on the BMC system's web page.
[0115] In an optional embodiment of the present invention, the BMC system has a web page; determining the second display information as the second target display information for the query instruction and displaying the second target display information may include the following sub-steps:
[0116] Sub-step S21, parsing the second display information according to a preset parsing rule to obtain second target display information for the query instruction;
[0117] Sub-step S22: displaying the second target display information on the Web page.
[0118] In a specific implementation, the BMC system can parse the second display information obtained from the non-shared memory area EEPROM according to preset parsing rules to obtain the second target display information for the query instruction. The second target display information can be the MCE log, mounted hardware, CPU, and system architecture, etc. The BMC system can display the MCE log, mounted hardware, CPU, and system architecture information on the BMC system web page.
[0119] In an optional embodiment of the present invention, after synchronizing the first display information to the non-shared memory area, the method may further include:
[0120] The preset flag is cleared to reset the update flag.
[0121] After synchronizing the first display information to the non-shared memory area, the BMC system may clear the preset flag, that is, reset the update flag Update Flag, thereby ensuring that the display information in the shared memory area 5 Share Memor is the latest display information.
[0122] In an optional embodiment of the present invention, the method may further include:
[0123] When a modification instruction is received, the first display information in the shared memory area is modified according to the modification instruction so that the BIOS system writes the modified first display information into the third display information when the computer is powered on next time; the third display information is the display information for the next power-on.
[0124] In an embodiment of the present invention, the display information in the shared memory area Share Memor is readable and writable. The user can not only query the first display information through the shared memory area Share Memor, but also modify the first display information through the shared memory area Share Memor, so that the BIOS system can access the modification record of the shared memory area Share Memor and write it to the latest display information when the computer is turned on next time.
[0125] In a specific implementation, if a user wishes to modify the first display information, they can enter a modification instruction on the BMC system's web page. Upon receiving the modification instruction, the BMC system modifies the first display information in the shared memory area ShareMemor according to the modification instruction. The BIOS system then accesses the modification record in the shared memory area ShareMemor and can write the modified first display information to the third display information the next time the computer is powered on. The third display information can be the display information for the next power-on.
[0126] In summary, in an embodiment of the present invention, the BMC system is provided with a shared memory area. When a query instruction is received, the BMC system determines whether the update flag in the shared memory area is set to a preset flag. The preset flag is set by the BIOS system when transmitting the first display information to the shared memory area. The first display information is the display information of the current startup that is updated at the end of the BIOS system power-on self-test. If the update flag is set to the preset flag, the BMC system determines that the server is in a normal state. When the server is in a normal state, the BMC system obtains the first display information from the shared memory area. The BMC system determines the first display information as the first target display information for the query instruction and displays the first target display information. The embodiment of the present invention provides a shared memory area through the BMC system. Both the BMC system and the BIOS system have readable and writable access. Thus, the BMC system can obtain the display information transmitted by the BIOS system through the shared memory area, thereby realizing the acquisition of display information based on an out-of-band management method. The out-of-band management method does not affect the current operation of the server, and thus can greatly improve the efficiency of the operation and maintenance management of the server.
[0127] In addition, in an embodiment of the present invention, the BMC system further includes a non-shared memory area, which stores second display information. If the update flag is not set to a preset flag, the BMC system determines that the server is in an abnormal state. The abnormal state includes a shutdown state or a down state. When the server is in the shutdown state or down state, the BMC system obtains the second display information from the non-shared memory area. The second display information is the display information from the last startup. The BMC system determines the second display information as the second target display information for the query instruction and displays the second target display information. In an embodiment of the present invention, the BMC system provides a non-shared memory area. When the update flag in the shared memory area is not set to a preset flag, it can be determined that the server is in an abnormal state. At this time, the BMC system can obtain the display information from the last startup transmitted by the BIOS system through the non-shared memory area, thereby achieving out-of-band management mode to obtain display information. The out-of-band management mode does not affect the current operation of the server, and does not require consideration of whether the current server is in a normal state or logging into the OS. Display information can be obtained conveniently and quickly, thereby greatly improving the efficiency of server operation and maintenance management.
[0128] In order to enable those skilled in the art to better understand the embodiments of the present invention, the embodiments of the present invention are described below through the following examples:
[0129] refer to Figure 3 , shows a flow chart of display information acquisition provided by an embodiment of the present invention. The display information acquisition process may be specifically as follows:
[0130] 1. The process begins;
[0131] 2. The server is powered on, and the BMC system allocates Share Memor (shared memory area) resources;
[0132] 3. The server is powered on until the BIOS system POST (power-on self-test) is completed, and the display information of this startup is updated;
[0133] 4. The BIOS system allocates Share Memor resources and checks whether the interaction function with the BMC system is normal;
[0134] 5. When the interaction function between the BIOS system and the BMC system is normal, the BIOS system transmits the display information of this boot as the first display information to the Share Memory, and the BIOS system sets the Update Flag in the Share Memory to a preset flag;
[0135] 6. The BMC system receives the user's query instruction on the web page;
[0136] 7. The BMC system determines whether the Update Flag is set to the preset flag; if not, proceed to step 8; if so, proceed to step 9;
[0137] 8. If the Update Flag is not set to the preset flag, the BMC system obtains the second display information from the EEPROM (non-shared memory area), the second display information being the display information from the last boot, parses the second display information to obtain the second target display information, and displays the second target display information on the web page; then proceeds to step 10;
[0138] 9. If the Update Flag is set to the preset flag, the BMC system obtains the first display information from the Shared Memory. The first display information is the display information for this boot. The BMC system synchronizes the first display information to the EEPROM and resets the Update Flag. The BMC system parses the first display information to obtain the first target display information and displays the first target display information on the web page. Then, the process proceeds to step 10.
[0139] 10. The process ends.
[0140] refer to Figure 4 , shows a structural block diagram of a display information acquisition device provided by an embodiment of the present invention, which is applied to a BMC system. The BMC system is connected to a server through an out-of-band management interface. The server is equipped with a BIOS system. The BMC system has a shared memory area and may include the following modules:
[0141] The update flag determination module 401 is configured to, upon receiving a query instruction, determine whether the update flag in the shared memory area is set to a preset flag; wherein the preset flag is set by the BIOS system when transmitting the first display information to the shared memory area; and the first display information is the display information of the current boot completed after the BIOS system power-on self-test is completed.
[0142] A server-normal-state determining module 402 is configured to determine that the server is in a normal state if the update flag is set to the preset flag;
[0143] A first display information acquisition module 403 is configured to acquire the first display information from the shared memory area when the server is in a normal state;
[0144] The first target display information display module 404 is configured to determine the first display information as the first target display information for the query instruction and display the first target display information.
[0145] In an optional embodiment of the present invention, the BMC system further includes a non-shared memory area, the non-shared memory area stores the second display information, and the apparatus may further include:
[0146] A module for determining that the server is in an abnormal state, configured to determine that the server is in an abnormal state if the update flag is not set to the preset flag; wherein the abnormal state includes a shutdown state or a downtime state;
[0147] A second display information acquisition module is configured to acquire the second display information from the non-shared memory area when the server is in a shutdown state or a down state; wherein the second display information is the display information of the last startup;
[0148] The second target display information display module is configured to determine the second display information as the second target display information for the query instruction and display the second target display information.
[0149] In an optional embodiment of the present invention, the device may further include:
[0150] The first display information synchronization module is configured to synchronize the first display information to the non-shared memory area.
[0151] The BMC system in the non-shared memory area has a web page; the first target display information display module 404 may include:
[0152] a first display information parsing submodule, configured to parse the first display information according to a preset parsing rule to obtain first target display information corresponding to the query instruction;
[0153] The first target display information display submodule is configured to display the first target display information on the Web page.
[0154] In an optional embodiment of the present invention, the BMC system has a web page; the second target display information presentation module may include:
[0155] a second display information parsing submodule, configured to parse the second display information according to a preset parsing rule to obtain second target display information corresponding to the query instruction;
[0156] The second target display information display submodule is configured to display the second target display information on the Web page.
[0157] In an optional embodiment of the present invention, after synchronizing the first display information in the shared memory area to the non-shared memory area, the apparatus may further include:
[0158] The reset module is used to clear the preset flag to reset the update flag.
[0159] In an optional embodiment of the present invention, the device may further include:
[0160] The modification module is used to modify the first display information in the shared memory area according to the modification instruction when receiving the modification instruction, so that the BIOS system writes the modified first display information into the third display information when the computer is turned on next time; the third display information is the display information for the next startup.
[0161] In summary, in an embodiment of the present invention, a BMC system is provided with a shared memory area. When a query instruction is received, the BMC system determines whether an update flag in the shared memory area is set to a preset flag. The preset flag is set by the BIOS system when transmitting first display information to the shared memory area. The first display information is the display information for the current startup that is updated at the end of the BIOS system power-on self-test. If the update flag is set to the preset flag, the BMC system determines that the server is in a normal state. When the server is in a normal state, the first display information is obtained from the shared memory area. The first display information is determined as the first target display information for the query instruction, and the first target display information is displayed. In an embodiment of the present invention, a shared memory area is provided by the BMC system. Both the BMC system and the BIOS system have readable and writable access. When the update flag in the shared memory area is set to the preset flag, it can be determined that the server is in a normal state. Thus, the BMC system can obtain the display information for the current startup transmitted by the BIOS system through the shared memory area, thereby realizing the acquisition of display information based on an out-of-band management method. The out-of-band management method does not affect the current operation of the server, and thus can greatly improve the efficiency of the operation and maintenance management of the server.
[0162] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0163] The embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, it includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.
[0164] Memory 503, used for storing computer programs;
[0165] The processor 501 is configured to implement each process of the above-mentioned display information acquisition method embodiment when executing the program stored in the memory 503 .
[0166] The communication bus mentioned in the terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0167] The communication interface is used for communication between the above terminal and other devices.
[0168] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0169] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0170] The embodiment of the present invention also provides a computer readable storage medium, such as Figure 6 As shown, a computer program 61 is stored on the computer-readable storage medium 60. When the computer program 61 is executed by the processor, the various processes of the above-mentioned display information acquisition method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0171] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0172] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatus, or computer program products. Thus, embodiments of the present invention may take the form of a fully hardware embodiment, a fully software embodiment, or an embodiment combining software and hardware. Furthermore, embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0173] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the process in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0174] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0175] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0176] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0177] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.
[0178] The above is a detailed introduction to the display information acquisition method, device, electronic device and computer-readable storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for obtaining display information, characterized in that: Applied to a baseboard management controller (BMC) system, the BMC system is connected to a server via an out-of-band management interface, the server is deployed with a basic input and output (BIOS) system, and the BMC system is provided with a shared memory area. The method includes: When receiving the query instruction, determining whether the update flag in the shared memory area is set to a preset flag; wherein the preset flag is set by the BIOS system when transmitting the first display information to the shared memory area; and the first display information is the display information of the current startup completed after the BIOS system power-on self-test is completed; If the update flag is set to the preset flag, it is determined that the server is in a normal state; When the server is in a normal state, acquiring the first display information from the shared memory area; determining the first display information as first target display information for the query instruction, and displaying the first target display information; The BMC system further includes a non-shared memory area, wherein the non-shared memory area stores second display information; after determining whether the update flag in the shared memory area is set to a preset flag, the method further includes: If the update flag is not set to the preset flag, it is determined that the server is in an abnormal state; wherein the abnormal state includes a shutdown state or a downtime state; When the server is in a shutdown state or a down state, obtaining the second display information from the non-shared memory area; wherein the second display information is the display information of the last startup; The second display information is determined as second target display information for the query instruction, and the second target display information is displayed; and the first display information is synchronized to the non-shared memory area.
2. The method according to claim 1, characterized in that The BMC system has a web page; determining the first display information as the first target display information for the query instruction and displaying the first target display information includes: Parsing the first display information according to a preset parsing rule to obtain first target display information for the query instruction; The first target display information is displayed on the Web page.
3. The method according to claim 1, characterized in that The BMC system has a web page; determining the second display information as the second target display information for the query instruction and displaying the second target display information includes: Parsing the second display information according to a preset parsing rule to obtain second target display information for the query instruction; The second target display information is displayed on the Web page.
4. The method according to claim 1, wherein After synchronizing the first display information to the non-shared memory area, the method further includes: The preset flag is cleared to reset the update flag.
5. The method according to claim 1, wherein Also includes: When a modification instruction is received, the first display information in the shared memory area is modified according to the modification instruction so that the BIOS system writes the modified first display information into the third display information when the computer is powered on next time; the third display information is the display information for the next power-on.
6. A display information acquisition device, characterized in that: Applied to a BMC system, the BMC system is connected to a server through an out-of-band management interface, the server is deployed with a BIOS system, and the BMC system is provided with a shared memory area. The device includes: an update flag judgment module, configured to, upon receiving a query instruction, determine whether the update flag in the shared memory area is set to a preset flag; wherein the preset flag is set by the BIOS system when transmitting the first display information to the shared memory area; the first display information is the display information of the current startup that is updated at the end of the power-on self-test of the BIOS system; the BMC system further comprises a non-shared memory area, wherein the non-shared memory area stores second display information; after determining whether the update flag in the shared memory area is set to the preset flag, further comprising: if the update flag is not set to the preset flag, determining that the server is in an abnormal state; wherein the abnormal state includes a shutdown state or a down state; when the server is in the shutdown state or the down state, obtaining the second display information from the non-shared memory area; wherein the second display information is the display information of the last startup; determining the second display information as the second target display information for the query instruction, and displaying the second target display information; synchronizing the first display information to the non-shared memory area; A module for determining that the server is in a normal state, configured to determine that the server is in a normal state if the update flag is set to the preset flag; A first display information acquisition module is configured to acquire the first display information from the shared memory area when the server is in a normal state; The first target display information display module is configured to determine the first display information as the first target display information for the query instruction and display the first target display information.
7. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the display information acquisition method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the display information acquisition method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method for interacting inner-band information and out-of-band information of server
CN102681959A
Information transmission method and system, electronic equipment and storage medium
CN113626214A