An information updating method and device, electronic equipment and storage medium
By synchronizing hardware parameters to the BMC in real time after the server starts, the problem of the BMC being unable to update hardware information is solved, enabling real-time updates of server hardware information and improving user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-08
- Publication Date
- 2026-03-31
AI Technical Summary
BMC's inability to update server hardware information in real time means that users cannot obtain timely information about changes in device status, which may lead to more serious malfunctions.
After the server starts up, it obtains hardware parameter information through the operating system and saves it to a data table, which is then synchronized to the BMC in real time. By comparing the differences in the information in the data table, a synchronization command is sent to update the hardware parameters of the BMC.
It enables real-time updates of server hardware information, allowing users to promptly identify hardware problems, prevent more serious failures, and improve user experience.
Smart Images

Figure CN116301968B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information management technology, and in particular to an information updating method, an information updating device, an electronic device, and a computer-readable storage medium. Background Technology
[0002] Platform management encompasses a series of monitoring and control functions, operating on system hardware. This includes monitoring system hardware parameters such as temperature, voltage, fans, and power supply, and making appropriate adjustments to ensure the system remains in a healthy state. If the system is malfunctioning, it can be restarted via a reset. Platform management also records various hardware information and logs to alert users and help locate subsequent problems. All these functions can be integrated into a single controller called the Baseboard Manager Controller (BMC).
[0003] The BMC (Browser Control Center) is an independent system, independent of other system hardware, BIOS (General-purpose input / output), and OS (Operating System). However, the BMC can interact with the BIOS and OS, providing better platform management, including managing the CPU, memory, PCIe (Peripheral Component Interconnect Express) devices, and more. Users can better understand the current device information through this management information. However, the device information displayed by the BMC is sent to the BMC by the BIOS during the boot process via IPMI (Intelligent Platform Management Interface) commands. It only records device information during the boot process; after entering the OS, the information is no longer updated. Therefore, if an anomaly occurs under the OS, the BMC cannot update, and users cannot obtain real-time changes in device information, potentially leading to more serious malfunctions. Summary of the Invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide an information updating method, an information updating device, an electronic device, and a computer-readable storage medium that overcome or at least partially solve the above problems.
[0005] To address the aforementioned problems, this invention discloses an information updating method applied to a server. The server runs an operating system (OS) and is communicatively connected to a baseboard management controller (BMC). The method includes:
[0006] After the server starts up and enters the OS, the first hardware parameter information of the server is obtained through the OS, and the first hardware parameter information is saved to the first data table and sent to the BMC.
[0007] The synchronization status parameter information is obtained through the OS and sent to the BMC; the synchronization status parameter is used to indicate whether the synchronization status is turned on or off.
[0008] During the operation of the server, and when the synchronization status parameter indicates that the synchronization status is turned on, the second hardware parameter information is obtained through the OS and the second hardware parameter information is saved to the second data table.
[0009] The OS compares the first hardware parameter information in the first data table with the second hardware parameter information in the second data table one by one.
[0010] If the comparison results are different, the OS sends the second hardware parameter information from the second data table to the BMC and sends a synchronization command to the BMC to make the BMC update the current hardware parameter information.
[0011] Optionally, the server includes a timer. The step of obtaining second hardware parameter information through the OS and saving the second hardware parameter information to a second data table during server operation and when the synchronization status parameter indicates that synchronization is enabled, includes:
[0012] According to the preset update time, the timer is started by the OS, and when the timer reaches the preset update time, the second hardware parameter information is obtained by the OS and saved to the second data table.
[0013] Optionally, it also includes:
[0014] When the synchronization status parameter indicates that synchronization is enabled, the update time of hardware parameter information is set by the OS.
[0015] Optionally, it also includes:
[0016] If the synchronization status parameter indicates that the synchronization status is off, then the OS sends a message indicating that the synchronization status is off to the BMC.
[0017] Optionally, the first hardware parameter information includes first hardware connection status information and first hardware operating status information; the second hardware parameter information includes second hardware connection status information and second hardware operating status information.
[0018] This invention also discloses another method for updating information, applied to a baseboard management controller (BMC), wherein the BMC is communicatively connected to a server, and the server runs an operating system (OS). The method includes:
[0019] Receive the first hardware parameter information sent by the OS after the server starts up and enters the OS;
[0020] Receive synchronization status parameter information sent by the OS; the synchronization status parameter is used to indicate whether the synchronization status is on or off;
[0021] Receive the second hardware parameter information and synchronization command sent by the OS during the operation of the server and when the synchronization status parameter indicates that the synchronization status is turned on;
[0022] Update the current hardware parameter information based on the second hardware parameter information and the synchronization command.
[0023] Optionally, it also includes:
[0024] The system receives a message from the OS indicating that the synchronization status is off, and stops receiving synchronization commands and the second hardware parameter information from the OS.
[0025] This invention also discloses an information updating device applied to a server, the server running an operating system (OS), the server being communicatively connected to a baseboard management controller (BMC), and the device comprising:
[0026] The first acquisition module is used to acquire the first hardware parameter information of the server through the OS after the server starts up and enters the OS, and save the first hardware parameter information to the first data table and send the first hardware parameter information to the BMC.
[0027] The second acquisition module is used to acquire synchronization status parameter information through the OS and send the synchronization status parameter information to the BMC; the synchronization status parameter is used to indicate whether the synchronization status is turned on or off.
[0028] The third acquisition module is used to acquire second hardware parameter information through the OS during the operation of the server and when the synchronization status parameter indicates that the synchronization status is turned on, and to save the second hardware parameter information to the second data table.
[0029] The comparison module is used to compare the first hardware parameter information in the first data table and the second hardware parameter information in the second data table one by one through the OS;
[0030] The first sending module is used to send the second hardware parameter information from the second data table to the BMC via the OS if the comparison results are different, and to send a synchronization command to the BMC so that the BMC updates the current hardware parameter information.
[0031] Optionally, the server includes a timer, and the third acquisition module includes:
[0032] The acquisition submodule is used to start the timer through the OS according to the preset update time, and when the timer reaches the preset update time, acquire the second hardware parameter information through the OS and save the second hardware parameter information to the second data table.
[0033] Optionally, it also includes:
[0034] The setting module is used to set the update time of hardware parameter information through the OS when the synchronization status parameter indicates that the synchronization status is turned on.
[0035] Optionally, it also includes:
[0036] The second sending module is used to send a message indicating that the synchronization state is off to the BMC via the OS if the synchronization state parameter indicates that the synchronization state is off.
[0037] Optionally, the first hardware parameter information includes first hardware connection status information and first hardware operating status information; the second hardware parameter information includes second hardware connection status information and second hardware operating status information.
[0038] This invention also discloses another information updating device applied to a baseboard management controller (BMC), wherein the BMC is communicatively connected to a server, and the server runs an operating system (OS). The device includes:
[0039] The first receiving module is used to receive the first hardware parameter information sent by the OS after the server starts up and enters the OS;
[0040] The second receiving module is used to receive synchronization status parameter information sent by the OS; the synchronization status parameters are used to indicate whether the synchronization status is on or off.
[0041] The third receiving module is used to receive the second hardware parameter information and synchronization command sent by the OS during the operation of the server and when the synchronization status parameter indicates that the synchronization status is turned on.
[0042] The update module is used to update the current hardware parameter information based on the second hardware parameter information and the synchronization command.
[0043] Optionally, it also includes:
[0044] The fourth receiving module is used to receive the message sent by the OS indicating that the synchronization status is off, and to stop receiving the synchronization command and the second hardware parameter information sent by the OS.
[0045] This invention also discloses an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the information update method as described above.
[0046] This invention also discloses a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the steps of the information update method described above.
[0047] The embodiments of the present invention have the following advantages:
[0048] In this embodiment of the invention, after the server starts and enters the OS, the OS obtains the server's first hardware parameter information, saves it to a first data table, and sends it to the BMC. The OS also obtains synchronization status parameter information and sends it to the BMC. The synchronization status parameter indicates whether synchronization is enabled or disabled. During server operation, and when the synchronization status parameter indicates synchronization is enabled, the OS obtains second hardware parameter information and saves it to a second data table. The OS compares the first hardware parameter information in the first data table with the second hardware parameter information in the second data table. If the comparison results are different, the OS sends the second hardware parameter information from the second data table to the BMC and sends a synchronization command to the BMC to update the current hardware parameter information. This allows users to promptly detect problems with the server's hardware, thereby preventing more serious issues and improving the user experience. Attached Figure Description
[0049] Figure 1 This is a flowchart of the steps of an information updating method provided in an embodiment of the present invention;
[0050] Figure 2 This is a flowchart of an OS-side information update provided in an embodiment of the present invention;
[0051] Figure 3 This is a flowchart of another information updating method provided in an embodiment of the present invention;
[0052] Figure 4 This is a flowchart of BMC terminal information update provided in an embodiment of the present invention;
[0053] Figure 5 This is a structural block diagram of an information updating device provided in an embodiment of the present invention;
[0054] Figure 6 This is a structural block diagram of another information updating device provided in an embodiment of the present invention;
[0055] Figure 7 This is an electronic device provided in an embodiment of the present invention:
[0056] Figure 8 This is a computer-readable storage medium provided in the embodiments of the present invention. Detailed Implementation
[0057] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0058] Currently, the server hardware information that users see through the BMC is sent to the BMC by the BIOS via IPMI commands during the boot process. It only records the hardware information during the boot process. After entering the OS, the information will no longer be updated. As a result, when an abnormality occurs under the OS, the BMC will not be able to update the hardware information, so users cannot perceive changes in the server hardware information.
[0059] Taking memory as an example, memory may be normal during the boot process, but during use, there is a probability of various problems, such as frequency drop due to high temperature, memory capacity reduction, poor memory contact, and memory card drop. When these problems occur, BMC cannot obtain changes in memory information, and therefore cannot enable customers to obtain real-time changes in memory information in a timely manner, which can lead to more serious failures.
[0060] One of the core concepts of this invention is to add a synchronization switch for the OS to synchronize server hardware parameter information to the BMC. During server operation, and when the synchronization switch is turned on, the acquired server hardware parameter information can be synchronized to the BMC, allowing the BMC to update the current hardware parameter information. This enables users to promptly detect problems with various hardware components in the server, thereby preventing more serious problems from occurring and improving the user experience.
[0061] Reference Figure 1 The diagram illustrates a flowchart of an information updating method according to an embodiment of the present invention. The method is applied to a server running an operating system (OS) and is communicatively connected to a baseboard management controller (BMC). The method may specifically include the following steps:
[0062] Step 101: After the server starts up and enters the OS, the first hardware parameter information of the server is obtained through the OS, and the first hardware parameter information is saved to the first data table and sent to the BMC.
[0063] In this embodiment of the invention, the server is communicatively connected to the Baseboard Management Controller (BMC). The server runs an operating system (OS). The OS can obtain parameter information of various hardware components of the server through the dmidecode (Desktop Management Interface Decoder) command. The dmidecode command can be used to query information about the BIOS, system, motherboard, processor, memory, cache, etc.
[0064] BMC can be used to monitor hardware parameters in servers, such as temperature, voltage, fans, power supply, etc., and make corresponding adjustments to ensure that the server is in a healthy state. At the same time, BMC can also record various hardware information and logs to alert users and help locate subsequent problems.
[0065] As an example, after the server starts up and enters the OS, the operating system can send a command to the hardware devices in the server to obtain the parameter information of the hardware devices in the server, and save the obtained parameter information of the hardware devices in the server to the first data table.
[0066] As an example, hardware parameter information can include hardware location, whether it is in place, maximum frequency, current speed, physical capacity, available capacity, number of rank, etc.
[0067] Let's take memory as an example. For instance, after the server starts up and enters the OS, the OS can use the dmidecode command to obtain raw memory information such as memory location, whether it is in place, maximum frequency, current speed, physical capacity, available capacity, and number of Ranks. The OS then saves the raw memory information to table A and sends it to the BMC, so that the BMC can obtain the raw memory parameter information at the time of server startup.
[0068] Step 102: Obtain synchronization status parameter information through the OS and send the synchronization status parameter information to the BMC; the synchronization status parameter is used to indicate whether to turn on or off the synchronization status.
[0069] As an example, the operating system can add a synchronization status parameter, which can be used to indicate whether synchronization is on or off. For instance, a synchronization status parameter of 1 can be set to indicate that synchronization is on, and a synchronization status parameter of 0 can be set to indicate that synchronization is off.
[0070] As an example, the OS can obtain synchronization status parameter information and send it to the BMC to notify the BMC of the synchronization status. For instance, if the synchronization status parameters obtained by the OS indicate that synchronization is enabled, a message indicating that synchronization is enabled can be sent to the BMC; if the synchronization status parameters obtained by the OS indicate that synchronization is disabled, a message indicating that synchronization is disabled can be sent to the BMC.
[0071] It should be noted that the synchronization status parameter is equivalent to a switch for the OS to synchronize memory information to the BMC. When the synchronization status parameter indicates that synchronization is enabled, it is equivalent to the switch being on, and the OS can synchronize memory information to the BMC; when the synchronization status parameter indicates that synchronization is disabled, it is equivalent to the switch being off, and the OS can stop synchronizing memory information to the BMC.
[0072] Step 103: During the operation of the server and when the synchronization status parameter indicates that the synchronization status is turned on, the second hardware parameter information is obtained through the OS and the second hardware parameter information is saved to the second data table.
[0073] As an example, during server operation, and when the synchronization status parameter indicates that synchronization is enabled, the OS can obtain the second hardware parameter information and save it to the second data table.
[0074] For example, during server operation, when the synchronization status parameter indicates that synchronization is enabled, the OS can use the dmidecode command to obtain information about the memory's current operation, such as memory location, whether it is in place, maximum frequency, current speed, physical capacity, available capacity, and number of Ranks, and save this information to table B.
[0075] In one embodiment of the present invention, when the synchronization status parameter indicates that the synchronization status is enabled, the update time of the hardware parameter information is set by the OS.
[0076] As an example, the OS can confirm whether the synchronization status parameter indicates that synchronization is enabled. If synchronization is enabled, the update time for hardware parameter information can be set.
[0077] For example, the OS can set the synchronization state parameter to 1 to enable synchronization. With synchronization enabled, setting the memory parameter information update interval to 1 second allows the OS to retrieve memory parameter information every second.
[0078] In one embodiment of the present invention, the server includes a timer. The step of obtaining second hardware parameter information through the OS and saving the second hardware parameter information to a second data table during the operation of the server and when the synchronization status parameter indicates that the synchronization status is turned on includes: starting the timer through the OS according to a preset update time, and obtaining the second hardware parameter information through the OS and saving the second hardware parameter information to a second data table when the timer's countdown time reaches the preset update time.
[0079] In this embodiment of the invention, within a preset time interval, the operating system can obtain parameter information of the hardware devices in the server and save the obtained parameter information of the hardware devices in the server to the second data table.
[0080] As an example, the OS can start a timer according to a preset update time, and when the timer reaches the preset update time, obtain the second hardware parameter information and save the second hardware parameter information to the second data table.
[0081] For example, the OS can start a timer, and when the timer reaches the preset update time, it can use the dmidecode command to obtain information about the memory's current operation, such as memory location, whether it is in place, maximum frequency, current speed, physical capacity, available capacity, and number of Ranks, and save this information to table B.
[0082] As an example, the operating system can start a timer and send an IPMI (Intelligent Platform Management Interface) command to the BMC to notify the BMC that synchronization is enabled.
[0083] In one embodiment of the present invention, if the synchronization state parameter indicates that the synchronization state is off, the OS sends a message indicating that the synchronization state is off to the BMC.
[0084] As an example, if the synchronization status parameter indicates that synchronization is off, the OS can send an IPMI command to the BMC to notify the BMC that synchronization is off.
[0085] Step 104: The OS compares the first hardware parameter information in the first data table with the second hardware parameter information in the second data table one by one.
[0086] As an example, the OS can compare the first hardware parameter information in the first data table with the second hardware parameter information in the second data table one by one.
[0087] In one embodiment of the present invention, the first hardware parameter information includes first hardware connection status information and first hardware operation status information; the second hardware parameter information includes second hardware connection status information and second hardware operation status information.
[0088] As an example, the first hardware parameter information may include first hardware connection status information and first hardware operating status information; the second hardware parameter information may include second hardware connection status information and second hardware operating status information.
[0089] As an example, the OS can compare the first hardware connection status information and the first hardware operating status information in the first data table with the second hardware connection status information and the second hardware operating status information in the second data table one by one.
[0090] For example, the original memory information in Table A, such as memory location, whether it is in place, maximum frequency, current speed, physical capacity, available capacity, and number of Ranks, can be compared and analyzed one by one with the information in Table B, such as memory location, whether it is in place, maximum frequency, current speed, physical capacity, available capacity, and number of Ranks, during the current operation of the memory.
[0091] Step 105: If the comparison results are different, the OS sends the second hardware parameter information from the second data table to the BMC and sends a synchronization command to the BMC to make the BMC update the current hardware parameter information.
[0092] As an example, if the comparison results are different, it indicates that the hardware of the server has changed during operation. In this case, the OS can send the second hardware parameter information from the second data table to the BMC and send a synchronization command to the BMC so that the BMC can update the current hardware parameter information.
[0093] For example, if the comparison results of Table A and Table B are different, the OS can use the ipmi command to synchronize the memory information in Table B to the BMC and send a synchronization command to the BMC to notify the BMC to update the current hardware parameter information.
[0094] like Figure 2 The diagram shown is a flowchart of an OS-side information update according to an embodiment of the present invention, which specifically includes the following steps:
[0095] S200, begin;
[0096] S201, enter OS;
[0097] S202, the dmidecode command retrieves raw memory information into table A;
[0098] S203, Added synchronization status parameters;
[0099] S204, Whether the synchronization status parameter indicates whether synchronization is enabled;
[0100] S205, if so, set the time interval for updating memory information;
[0101] S206, start the timer and send an IPMI command to notify the BMC that synchronization is enabled;
[0102] S207: Periodically retrieve memory information, save it to table B, and compare the information in table A and table B;
[0103] S208, determine whether the comparison results are the same;
[0104] S209, if they are different, synchronize the memory information in Table B to BMC and notify BMC to update the memory information;
[0105] S210, determine whether the timer is off. If it is not off, return to step S207; if it is off, proceed to the next step.
[0106] S211, End.
[0107] In this embodiment of the invention, after the server starts and enters the OS, the OS obtains the server's first hardware parameter information, saves it to a first data table, and sends it to the BMC. The OS also obtains synchronization status parameter information and sends it to the BMC. The synchronization status parameter indicates whether synchronization is enabled or disabled. During server operation, and when the synchronization status parameter indicates synchronization is enabled, the OS obtains second hardware parameter information and saves it to a second data table. The OS compares the first hardware parameter information in the first data table with the second hardware parameter information in the second data table. If the comparison results are different, the OS sends the second hardware parameter information from the second data table to the BMC and sends a synchronization command to the BMC to update the current hardware parameter information. This allows users to promptly detect problems with the server's hardware, thereby preventing more serious issues and improving the user experience.
[0108] Reference Figure 3The diagram illustrates a flowchart of another information updating method provided by an embodiment of the present invention, applied to a baseboard management controller (BMC). The BMC is communicatively connected to a server, which runs an operating system (OS). The method may specifically include the following steps:
[0109] Step 301: Receive the first hardware parameter information sent by the OS after the server starts up and enters the OS.
[0110] As an example, the BMC can receive the first hardware parameter information sent by the OS after the server starts up and enters the OS.
[0111] As an example, the first hardware parameter information may include the first hardware connection status information and the first hardware operating status information.
[0112] For example, after the server starts up and enters the OS, the OS can use the dmidecode command to obtain raw memory information such as memory location, whether it is in place, maximum frequency, current speed, physical capacity, available capacity, and number of Ranks. The OS then saves the raw memory information to table A and sends it to the BMC, so that the BMC can obtain the raw memory parameter information when the server starts up.
[0113] Step 302: Receive synchronization status parameter information sent by the OS; the synchronization status parameter is used to indicate whether the synchronization status is turned on or off.
[0114] As an example, the BMC can receive synchronization status parameter information sent by the OS, where the synchronization status parameter can be used to indicate whether synchronization is on or off. For example, a synchronization status parameter of 1 indicates that synchronization is on, and a synchronization status parameter of 0 indicates that synchronization is off.
[0115] As an example, the BMC can determine whether synchronization is enabled based on synchronization status parameter information.
[0116] It should be noted that the synchronization status parameter is equivalent to a switch for the OS to synchronize memory information to the BMC. When the synchronization status parameter indicates that synchronization is enabled, it is equivalent to the switch being on, and the OS can synchronize memory information to the BMC; when the synchronization status parameter indicates that synchronization is disabled, it is equivalent to the switch being off, and the OS can stop synchronizing memory information to the BMC.
[0117] Step 303: Receive the second hardware parameter information and synchronization command sent by the OS during the operation of the server and when the synchronization status parameter indicates that the synchronization status is turned on.
[0118] As an example, the BMC can receive second hardware parameter information and synchronization commands sent by the OS in real time during server operation and when the synchronization status parameter indicates that the synchronization status is enabled.
[0119] As an example, the second hardware parameter information may include the second hardware connection status information and the second hardware operating status information; the synchronization command can be used to notify the BMC to update the hardware information.
[0120] For example, the BMC can receive information about the current memory operation, such as memory location, whether it is in place, maximum frequency, current speed, physical capacity, available capacity, and Rank number, sent by the OS during server operation and when the synchronization status parameter indicates that the synchronization state is open. It can also receive synchronization commands that notify the BMC to update the current hardware parameter information.
[0121] Step 304: Update the current hardware parameter information according to the second hardware parameter information and the synchronization command.
[0122] As an example, the BMC can update the current hardware parameter information based on the second hardware parameter information and synchronization commands. For instance, it can update the current memory parameter information based on information about the memory's current operation, such as memory location, whether it is in place, maximum frequency, current speed, physical capacity, available capacity, and number of Ranks, as well as synchronization commands.
[0123] In one embodiment of the present invention, a message indicating that the synchronization state is turned off is received from the OS, and the receiving of synchronization commands and the second hardware parameter information sent by the OS is stopped.
[0124] As an example, when the synchronization status information indicates that the synchronization status is off, the BMC can receive the message from the OS indicating that the synchronization status is off, and stop receiving synchronization commands and second hardware parameter information from the OS.
[0125] like Figure 4 The diagram shown is a flowchart of a BMC terminal information update according to an embodiment of the present invention, which specifically includes the following steps:
[0126] S400, begin;
[0127] S401 receives IPMI commands sent by the OS;
[0128] S402, based on the IPMI command, determine whether the synchronization status parameter indicates that synchronization is enabled;
[0129] S403: If yes, then receive the synchronous memory change information sent by the OS in real time; otherwise, the process ends.
[0130] S404, Update the memory information maintained by BMC and display it on the BMC webpage;
[0131] S405, End.
[0132] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0133] Reference Figure 5 The diagram illustrates a structural block diagram of an information updating device according to an embodiment of the present invention. The device is applied to a server, which runs an operating system (OS) and is communicatively connected to a baseboard management controller (BMC). Specifically, it may include the following modules:
[0134] The first acquisition module 501 is used to acquire the first hardware parameter information of the server through the OS after the server starts up and enters the OS, and save the first hardware parameter information to the first data table and send the first hardware parameter information to the BMC.
[0135] The second acquisition module 502 is used to acquire synchronization status parameter information through the OS and send the synchronization status parameter information to the BMC; the synchronization status parameter is used to indicate whether the synchronization status is turned on or off.
[0136] The third acquisition module 503 is used to acquire second hardware parameter information through the OS during the operation of the server and when the synchronization status parameter indicates that the synchronization status is turned on, and save the second hardware parameter information to the second data table.
[0137] The comparison module 504 is used to compare the first hardware parameter information in the first data table and the second hardware parameter information in the second data table one by one through the OS;
[0138] The first sending module 505 is used to send the second hardware parameter information in the second data table to the BMC through the OS if the comparison results are different, and to send a synchronization command to the BMC so that the BMC updates the current hardware parameter information.
[0139] In an optional embodiment, the server includes a timer, and the third acquisition module 503 includes:
[0140] The acquisition submodule is used to start the timer through the OS according to the preset update time, and when the timer reaches the preset update time, acquire the second hardware parameter information through the OS and save the second hardware parameter information to the second data table.
[0141] In an optional embodiment, it further includes:
[0142] The setting module is used to set the update time of hardware parameter information through the OS when the synchronization status parameter indicates that the synchronization status is turned on.
[0143] In an optional embodiment, it further includes:
[0144] The second sending module is used to send a message indicating that the synchronization state is off to the BMC via the OS if the synchronization state parameter indicates that the synchronization state is off.
[0145] In one optional embodiment, the first hardware parameter information includes first hardware connection status information and first hardware operating status information; the second hardware parameter information includes second hardware connection status information and second hardware operating status information.
[0146] Reference Figure 6 The diagram illustrates a structural block diagram of another information updating device provided in an embodiment of the present invention, applied to a baseboard management controller (BMC). The BMC is communicatively connected to a server, which runs an operating system (OS) and may specifically include the following modules:
[0147] The first receiving module 601 is used to receive the first hardware parameter information sent by the OS after the server starts up and enters the OS;
[0148] The second receiving module 602 is used to receive synchronization status parameter information sent by the OS; the synchronization status parameter is used to indicate whether the synchronization status is turned on or off.
[0149] The third receiving module 603 is used to receive the second hardware parameter information and synchronization command sent by the OS during the operation of the server and when the synchronization status parameter indicates that the synchronization status is turned on.
[0150] The update module 604 is used to update the current hardware parameter information according to the second hardware parameter information and the synchronization command.
[0151] In an optional embodiment, it further includes:
[0152] The fourth receiving module is used to receive the message sent by the OS indicating that the synchronization status is off, and to stop receiving the synchronization command and the second hardware parameter information sent by the OS.
[0153] In this embodiment of the invention, after the server starts and enters the OS, the OS obtains the server's first hardware parameter information, saves it to a first data table, and sends it to the BMC. The OS also obtains synchronization status parameter information and sends it to the BMC. The synchronization status parameter indicates whether synchronization is enabled or disabled. During server operation, and when the synchronization status parameter indicates synchronization is enabled, the OS obtains second hardware parameter information and saves it to a second data table. The OS compares the first hardware parameter information in the first data table with the second hardware parameter information in the second data table. If the comparison results are different, the OS sends the second hardware parameter information from the second data table to the BMC and sends a synchronization command to the BMC to update the current hardware parameter information. This allows users to promptly detect problems with the server's hardware, thereby preventing more serious issues and improving the user experience.
[0154] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0155] Reference Figure 7 The present invention also provides an electronic device 70, comprising:
[0156] It includes a processor 701, a memory 702, and a computer program 7021 stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described information update method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0157] Reference Figure 8 The present invention also provides a computer-readable storage medium 80, on which a computer program 801 is stored. When the computer program is executed by a processor, it implements the various processes of the above-mentioned information update method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0158] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0159] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0160] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0161] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0162] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0163] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0164] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0165] The above provides a detailed description of an information updating method, an information updating device, an electronic device, and a computer-readable storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. An information updating method characterized by comprising: The application is applied to a server, the server runs an operating system (OS), the server is in communication connection with a baseboard management controller (BMC), the server comprises a timer, and the method comprises the following steps: After the server starts and enters the OS, first hardware parameter information of the server is acquired through the OS, and the first hardware parameter information is saved to a first data table and sent to the BMC; Synchronization state parameter information is acquired through the OS, and the synchronization state parameter information is sent to the BMC; the synchronization state parameter is used for indicating an open synchronization state or a closed synchronization state; In the case that the synchronization state parameter indicates the open synchronization state, an update time of hardware parameter information is set through the OS; if the synchronization state parameter indicates the closed synchronization state, a message of the closed synchronization state is sent to the BMC through the OS; In the case that the synchronization state parameter indicates the open synchronization state, the timer is started according to a preset update time through the OS, and when the timing time of the timer reaches the preset update time, second hardware parameter information is acquired through the OS, and the second hardware parameter information is saved to a second data table; The first hardware parameter information in the first data table and the second hardware parameter information in the second data table are compared one by one through the OS; the first hardware parameter information comprises first hardware connection state information and first hardware running state information; the second hardware parameter information comprises second hardware connection state information and second hardware running state information; If the comparison result is different, the second hardware parameter information in the second data table is sent to the BMC through the OS, and a synchronization command is sent to the BMC, so that the BMC updates current hardware parameter information; The synchronization state parameter information is sent to the BMC, which comprises sending an ipmi command to the BMC, and the ipmi command is used for informing the BMC to open the synchronization state or close the synchronization state.
2. An information updating method characterized by comprising: The application is applied to a baseboard management controller (BMC), the BMC is in communication connection with a server, the server runs an operating system (OS), the server comprises a timer, and the method comprises the following steps: First hardware parameter information sent by the OS after the server starts and enters the OS is received; Synchronization state parameter information sent by the OS is received; the synchronization state parameter is used for indicating an open synchronization state or a closed synchronization state; Second hardware parameter information and a synchronization command sent by the OS in the case that the synchronization state parameter indicates the open synchronization state during the running of the server are received; A message of the closed synchronization state sent by the OS is received, and the synchronization command and the second hardware parameter information sent by the OS are stopped from being received; Current hardware parameter information is updated according to the second hardware parameter information and the synchronization command; The second hardware parameter information is obtained by the OS when a timing time of the timer reaches a preset update time.
3. An information updating apparatus characterized by comprising: The server runs an operating system (OS), and the server is in communication connection with a baseboard management controller (BMC). The server comprises a timer, and the device comprises: A first obtaining module is configured to obtain, by the OS, first hardware parameter information of the server after the server is started and enters the OS, save the first hardware parameter information to a first data table, and send the first hardware parameter information to the BMC. A second obtaining module is configured to obtain, by the OS, synchronization state parameter information, and send the synchronization state parameter information to the BMC. The synchronization state parameter is used to indicate an open synchronization state or a closed synchronization state. A setting module is configured to set, by the OS, an update time of hardware parameter information when the synchronization state parameter indicates the open synchronization state. A second sending module is configured to send, by the OS, a message of the closed synchronization state to the BMC when the synchronization state parameter indicates the closed synchronization state. A third obtaining module is configured to start, by the OS, the timer according to a preset update time when the server is running and the synchronization state parameter indicates the open synchronization state, and obtain, by the OS, second hardware parameter information when a timing time of the timer reaches the preset update time, and save the second hardware parameter information to a second data table. A comparison module is configured to compare, by the OS, first hardware parameter information in the first data table with second hardware parameter information in the second data table. The first hardware parameter information comprises first hardware connection state information and first hardware running state information. The second hardware parameter information comprises second hardware connection state information and second hardware running state information. A first sending module is configured to send, by the OS, the second hardware parameter information in the second data table to the BMC and send a synchronization command to the BMC when the comparison result is different, so that the BMC updates current hardware parameter information. The second obtaining module is specifically configured to send an ipmi command to the BMC. The ipmi command is used to notify the BMC to open the synchronization state or close the synchronization state.
4. An information updating apparatus characterized by comprising: The BMC is in communication connection with a server. The server runs an operating system (OS), and the server comprises a timer. The device comprises: A first receiving module is configured to receive first hardware parameter information sent by the OS after the server is started and enters the OS. A second receiving module is configured to receive synchronization state parameter information sent by the OS. The synchronization state parameter is used to indicate an open synchronization state or a closed synchronization state. a third receiving module, configured to receive second hardware parameter information and a synchronization command sent by the OS during running of the server and in a case where the synchronization state parameter indicates an open synchronization state; a fourth receiving module, configured to receive a message sent by the OS indicating that the synchronization state is closed, and stop receiving the synchronization command and the second hardware parameter information sent by the OS; an updating module, configured to update current hardware parameter information according to the second hardware parameter information and the synchronization command; wherein the second hardware parameter information is obtained by the OS starting the timer and obtaining when a preset updating time is reached.
5. An electronic device, comprising: comprising: a processor, a memory, and a computer program stored on the memory and capable of running on the processor, and when the computer program is executed by the processor, the steps of the information updating method according to any one of claims 1 or 2 are implemented.
6. A computer-readable storage medium, characterized in that, a computer program is stored on the computer readable storage medium, and when the computer program is executed by the processor, the steps of the information updating method according to any one of claims 1 or 2 are implemented.
Citation Information
Patent Citations
Hardware information processing method and device and storage system
CN114064133A