State monitoring method and device of baseboard management controller, storage medium and electronic equipment
By introducing a dual-core CPU architecture into the baseboard management controller and utilizing the collaborative work of RTOS and Linux systems, detailed recording and full lifecycle management of the BMC status are achieved, solving the problem of incomplete BMC status monitoring in existing technologies and ensuring the stable operation of server equipment.
Patent Information
- Application Number
- CN202411383246.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-07
AI Technical Summary
In the existing technology, the status monitoring method of the baseboard management controller (BMC) cannot effectively monitor the entire life cycle of the server, resulting in the inability to understand the changes in the BMC's operating status in a timely manner.
By introducing a dual-core CPU architecture into the baseboard management controller, the first processor and the second processor run the RTOS system and the Linux system respectively, realizing the monitoring of the shared memory space of status data. The first processor monitors the status data in the shared memory space and sends the monitoring results to the storage device for recording.
It enables detailed recording and full lifecycle management of BMC status, ensuring comprehensive status monitoring at any stage and timely detection and notification of faults to users.
Smart Images

Figure CN119270724A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of servers, and more specifically, to a method, device, storage medium, and electronic device for monitoring the status of a baseboard management controller. Background Art
[0002] With the rapid development of technologies such as artificial intelligence and large models, servers are required to meet the requirements of high-speed computing, high load, and long-term reliable operation. As a management module of the server, BMC (Baseboard Management Controller) plays an important role. Currently, BMC mainly monitors the basic information of the server and the host status. It is impossible to count the key events and BMC status changes of the BMC during the entire life cycle of the server, which is not conducive to monitoring the operating status of the BMC itself.
[0003] Therefore, in the related art, there is a problem of how to monitor the status of the baseboard management controller.
[0004] In the related art, there is no effective solution to the problem of how to monitor the status of a baseboard management controller. Summary of the invention
[0005] The embodiments of the present application provide a method, device, storage medium and electronic device for monitoring the status of a baseboard management controller, so as to at least solve the problem of how to monitor the status of a baseboard management controller in the related art.
[0006] According to one embodiment of the present application, a method for monitoring the status of a baseboard management controller is provided, which is applied to a baseboard management controller, wherein the baseboard management controller includes a first processor, a second processor, and a shared memory space, wherein the shared memory space has a data transmission channel with the first processor and the second processor, and the baseboard management controller is connected to a storage device, and includes: receiving status data of the baseboard management controller acquired by the second processor, and writing the status data into the shared memory space; acquiring a monitoring result obtained by the first processor from monitoring the status data in the shared memory space; and sending the monitoring result to the storage device for recording.
[0007] In an exemplary embodiment, before receiving the status data of the baseboard management controller acquired by the second processor and writing the status data into the shared memory space, the method further includes: starting the first processor when detecting that the baseboard management controller has been powered on; loading initialization firmware through the first processor, wherein the initialization firmware is a preset firmware of the first processor, and the initialization firmware includes a first boot program, and the initialization firmware is used to initialize the baseboard management controller; running the first boot program through the first processor to start a first operating system in the first processor, wherein the first operating system is used to run a monitoring program, wherein the monitoring program is used to monitor the status data in the shared memory space; when determining that the first operating system has been started, running the first boot program through the first processor to start the second processor; running the second boot program through the second processor to start the second operating system in the second processor, wherein the second boot program is a preset program of the second processor, and the second operating system is used to run an instruction execution program, and the instruction execution program is used to receive and execute operation instructions.
[0008] In an exemplary embodiment, receiving the status data of the baseboard management controller acquired by the second processor includes: receiving the status update time and the current status of the baseboard management controller acquired by the second processor in a first preset period; representing the status update time in a preset data format to obtain time data; determining a status code corresponding to the current status from a preset configuration table, wherein the preset configuration table stores the corresponding relationship between the current status and the status code; and determining the time data and the status code as the status data.
[0009] In an exemplary embodiment, before receiving the status update time and current status of the baseboard management controller obtained by the second processor in a preset period, the method also includes: receiving a target operation instruction sent by the target object through the second processor, wherein the target operation instruction corresponds to a target status; executing the target operation instruction through the second processor, wherein during the execution of the target operation instruction, the current status of the baseboard management controller obtained by the second processor is the target status.
[0010] In an exemplary embodiment, the status data in the shared memory space is monitored by the first processor to obtain a monitoring result, including: first status data and second status data are read from the shared memory space by the first processor in a second preset cycle, wherein the first status data and the second status data are two status data read in adjacent cycles, and the reading time of the first status data is earlier than the reading time of the second status data; a status code of the first status data and a status code of the second status data are compared to obtain a comparison result; when the comparison result indicates that the status code of the first status data and the status code of the second status data are inconsistent, the second status data is determined as the monitoring result.
[0011] In an exemplary embodiment, after comparing the status code of the first status data and the status code of the second status data to obtain a comparison result, the method further includes: when the comparison result indicates that the status code of the first status data and the status code of the second status data are both target status codes, obtaining the time data of the first status data and the time data of the second status data; and when it is determined that the time difference is greater than a preset time difference, sending a fault warning message to the target object, wherein the time difference represents the difference between the first time data and the second time data.
[0012] In an exemplary embodiment, the status data in the shared memory space is monitored by the first processor to obtain a monitoring result, which also includes: reading third status data from the shared memory space by the first processor, wherein the third status data is status data read for the first time after the baseboard management controller completes initialization; and determining the third status data as the monitoring result.
[0013] According to another embodiment of the present application, a status monitoring device for a baseboard management controller is provided, including: a writing module, used to receive status data of the baseboard management controller acquired by a second processor, and write the status data into a shared memory space; an acquisition module, used to acquire a monitoring result obtained by the first processor from monitoring the status data in the shared memory space; and a sending module, used to send the monitoring result to a storage device for recording.
[0014] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0015] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0016] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiment are implemented.
[0017] Through the present application, the acquired status data of the baseboard management controller can be written into the shared memory space by the second processor, and then the status data in the shared memory space can be monitored by the first processor to obtain the monitoring result, and then the monitoring result can be sent to the storage device for recording, so as to realize the detailed recording of the status of the baseboard management controller. Therefore, the problem of how to monitor the status of the baseboard management controller in the related art can be solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a hardware structure block diagram of a server device of a method for monitoring the status of a baseboard management controller according to an embodiment of the present application;
[0019] Figure 2 is a flow chart of a method for monitoring the status of a baseboard management controller according to an embodiment of the present application;
[0020] Figure 3 is a schematic diagram of a shared memory space of a baseboard management controller according to an embodiment of the present application;
[0021] Figure 4 is a schematic diagram of an initialization process of a baseboard management controller according to an embodiment of the present application;
[0022] Figure 5 is a schematic flow chart (I) of a method for monitoring the state of a baseboard management controller according to an embodiment of the present application;
[0023] Figure 6 is a schematic flow chart (II) of a method for monitoring the state of a baseboard management controller according to an embodiment of the present application;
[0024] Figure 7 It is a structural block diagram of a status monitoring device of a baseboard management controller according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0027] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a method for monitoring the status of a baseboard management controller according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0028] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the state monitoring method of the baseboard management controller in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the method for state monitoring of the baseboard management controller is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0029] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0030] In this embodiment, a method for monitoring the status of a baseboard management controller is provided. Figure 2 is a flow chart of a method for monitoring the status of a baseboard management controller according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:
[0031] Step S202, receiving the status data of the baseboard management controller acquired by the second processor, and writing the status data into the shared memory space;
[0032] Step S204, obtaining a monitoring result obtained by the first processor monitoring the status data in the shared memory space;
[0033] In an alternative embodiment, Figure 3 The connection relationship between the first processor, the second processor, and the shared memory space in the above steps S204, S202 and S204 is illustrated. Figure 3 As shown, a part of the memory space in the memory of the baseboard management controller is divided as a shared memory space. The second processor runs a Linux system (an open source operating system), which can run business programs and periodically obtain the status data of the baseboard management controller and write it into the shared memory space. The first processor runs an RTOS system (Real-time operating system), which can periodically read the status data in the shared memory space by running a monitoring program to realize status monitoring of the baseboard management controller.
[0034] Step S206: Send the monitoring result to the storage device for recording.
[0035] Through the above steps, the acquired status data of the baseboard management controller can be written into the shared memory space by the second processor, and then the status data in the shared memory space can be monitored by the first processor to obtain the monitoring result, and then the monitoring result can be sent to the storage device for recording, so as to realize the detailed recording of the status of the baseboard management controller. Therefore, the problem of how to monitor the status of the baseboard management controller in the related art can be solved.
[0036] In an exemplary embodiment, before executing the above step S202 to receive the status data of the baseboard management controller acquired by the second processor and writing the status data into the shared memory space, the method also includes: when it is detected that the baseboard management controller is powered on, starting the first processor; loading initialization firmware through the first processor, wherein the initialization firmware is a preset firmware of the first processor, and the initialization firmware includes a first boot program, and the initialization firmware is used to initialize the baseboard management controller; running the first boot program through the first processor to start a first operating system in the first processor, wherein the first operating system is used to run a monitoring program, wherein the monitoring program is used to monitor the status data in the shared memory space; when it is determined that the first operating system has been started, running the first boot program through the first processor to start the second processor; running the second boot program through the second processor to start the second operating system in the second processor, wherein the second boot program is a preset program of the second processor, and the second operating system is used to run an instruction execution program, and the instruction execution program is used to receive and execute operation instructions.
[0037] Optionally, in the above embodiment, Figure 4 The initialization process of the baseboard management controller is shown. The baseboard management controller can adopt a dual-core CPU (processor) architecture, CPU0 (equivalent to the first processor) runs the RTOS system, and CPU1 (equivalent to the second processor) runs the Linux system. Figure 4As shown, when BMC is powered on, CPU0 is woken up, and CPU0 runs BootROM (equivalent to initialization firmware). BootRom is embedded in a small mask ROM (Read-OnlyMemory) in the first processor chip, and contains SPL (Secondary ProgramLoader) executed by the processor when it is powered on or reset. CPU0 starts the RTOS system (equivalent to the first operating system) by loading SPL (equivalent to the first boot program) and wakes up CPU1 at the same time. After CPU1 is started, it starts to load U-Boot (Universal Boot Loader) to start the Linux system (equivalent to the second operating system). After the Linux system is started, it will run an instruction execution program to receive and execute operation instructions, wherein the operation instructions include operation instructions initiated by business programs.
[0038] In an exemplary embodiment, the above-mentioned step S202 can be performed in the following manner to receive the status data of the baseboard management controller obtained by the second processor, specifically including: receiving the status update time and current status of the baseboard management controller obtained by the second processor in a first preset period; representing the status update time in a preset data format to obtain time data; determining a status code corresponding to the current status from a preset configuration table, wherein the preset configuration table stores the corresponding relationship between the current status and the status code; and determining the time data and the status code as the status data.
[0039] Optionally, in the above embodiment, the status data can be defined as the following structure, as shown in Table 1. When transmitting the status data, a 4-byte identification code can be used as the status transmission start identifier and the status transmission end identifier respectively. The status update time can be represented by data in a standard time format, such as a UNIX timestamp (equivalent to time data), and the current status can be represented by a status code.
[0040] Table 1
[0041] name Byte size content Status transfer started 4 0xaa44aa44 Status update time 4 Timestamp Current Status 4 Status Code Status transfer completed 4 Oxaa55aa55
[0042] The corresponding relationship between the status code and the status of the baseboard management controller can be saved in a preset configuration table, and the preset configuration table is shown in Table 2.
[0043] Table 2
[0044] BMC Status Status Code Remark BMC Startup Ox001 BMC successfully started BMC is operating normally Ox002 BMC normal operation status BMC abnormal restart Ox003 BMC internal program error caused restart BMC Updates Ox004 BMC firmware is updating BMC reset Ox005 Control BMC to perform reset action through instructions or WEB
[0045] In an exemplary embodiment, before executing the above-mentioned step of receiving the status update time and current status of the baseboard management controller by the second processor in a preset period, the method also includes: receiving a target operation instruction sent by the target object through the second processor, wherein the target operation instruction corresponds to a target status; executing the target operation instruction through the second processor, wherein during the execution of the target operation instruction, the current status of the baseboard management controller obtained by the second processor is the target status.
[0046] Optionally, in the above embodiment, the operation instruction received by the second processor may also be initiated through a business program or a scheduled task.
[0047] In an optional embodiment, if Figure 5 As shown, Figure 5 The process of the second processor receiving the operation instruction and obtaining the BMC status is illustrated, which specifically includes the following steps:
[0048] Step S501: BMC initialization, system startup;
[0049] Step S502: obtaining that the current state of the BMC is the startup state, obtaining the current time, constructing a state data packet (equivalent to state data), and writing it into the shared memory space;
[0050] Step S503: obtaining the status of the BMC regularly;
[0051] It should be noted that the following steps S504, S506, S508, and S5010 are parallel steps, and one of the steps is selected for execution according to the type of instruction received.
[0052] Step S504: The BMC receives the update instruction and starts updating;
[0053] Step S505: Acquire the current state of the BMC as the update state, obtain the current time, construct a state data packet, write it into the shared memory space, and execute step S512;
[0054] Step S506: The BMC receives the update instruction and starts to reset;
[0055] Step S507: Acquire the current state of the BMC as the reset state, obtain the current time, construct a state data packet, write it into the shared memory space, and execute step S512;
[0056] Step S508: BMC sends an abnormal restart;
[0057] Step S509: Acquire the current state of the BMC as an abnormal restart state, obtain the current time, construct a state data packet, write it into the shared memory space, and execute step S512;
[0058] Step S510: BMC operates normally;
[0059] Step S511: obtaining that the current state of the BMC is a normal operating state, obtaining the current time, constructing a state data packet, writing it into the shared memory space, and executing step S513;
[0060] Step S512: Get the current time, construct a status data packet, and write it into the shared memory space. Since the BMC is updated, reset, or abnormally restarted, it is necessary to execute step S501 to restart the system.
[0061] Step S513: Get the current time, construct a status data packet, and write it into the shared memory space. The BMC is in normal operation and does not need to be restarted. Continue to execute step S503 to obtain the BMC status regularly.
[0062] Through the above embodiments, the management of the entire life cycle of the BMC can be achieved, ensuring that the BMC can be fully managed at any stage and achieving comprehensive status monitoring.
[0063] In an exemplary embodiment, the implementation process of monitoring the status data in the shared memory space by the first processor in the above-mentioned step S204 to obtain the monitoring result specifically includes: reading the first status data and the second status data from the shared memory space by the first processor in a second preset period, wherein the first status data and the second status data are two status data read in adjacent periods, and the reading time of the first status data is earlier than the reading time of the second status data; comparing the status code of the first status data and the status code of the second status data to obtain a comparison result; when the comparison result indicates that the status code of the first status data and the status code of the second status data are inconsistent, determining the second status data as the monitoring result.
[0064] Optionally, in the above embodiment, if the status obtained for the first time is normal operation and the status obtained for the second time is the update status, it means that the BMC has sent an update, and the update event can be recorded and saved in the memory; if the status obtained for the first time is update operation and the status obtained for the second time is also the update status, it means that the BMC is still updating and no recording is required; if the status obtained for the third time is the normal operation status, it means that the update is completed at this time and the event can be recorded in the memory.
[0065] In an exemplary embodiment, after performing the above-mentioned step of comparing the status code of the first status data and the status code of the second status data to obtain a comparison result, the method further includes: when the comparison result indicates that the status code of the first status data and the status code of the second status data are both target status codes, obtaining the time data of the first status data and the time data of the second status data; and when it is determined that the time difference is greater than a preset time difference, sending a fault warning message to the target object, wherein the time difference represents the difference between the first time data and the second time data.
[0066] Optionally, in the above embodiment, the number of occurrences of the target status code may be counted, and when the number of occurrences exceeds a preset number within a preset time period, a reminder message is sent to the target object.
[0067] In an optional embodiment, if Figure 6 As shown, Figure 6 The process of the first processor monitoring the BMC state is illustrated, which specifically includes the following steps:
[0068] Step S601: BMC initialization, system startup;
[0069] Step S602: regularly reading the status data of the BMC in the shared memory;
[0070] Step S603: If the current state is an abnormal operation state, determine whether a timeout occurs. If yes, execute step S604, otherwise execute step S606;
[0071] Optionally, in the above step S603, it can be determined whether a timeout occurs in the following manner. For example, the status code obtained for the first time (equivalent to the status code of the first status data) and the status code obtained for the second time (equivalent to the status code of the second status data) both indicate an abnormal restart, and the time obtained for the first time and the time obtained for the second time are greater than 5 minutes (equivalent to the preset time difference), then it can be determined as an abnormal restart timeout.
[0072] Step S604: construct a fault warning message and send it to the user (equivalent to the target object) through the network interface;
[0073] Step S605: reset the timeout time after the warning, and continue to execute step S602 to periodically read the status data of the BMC in the shared memory;
[0074] Step S606: Check whether the current state is consistent with the state obtained last time, if yes, execute step S602, otherwise execute step S607;
[0075] Step S607: if the current state is inconsistent with the last acquired state, it means that the state has changed, and the state data is updated;
[0076] Step S608: After the status is updated, the status can be counted;
[0077] Step S609: Record the updated status, status update time, and status count information in the storage device. After recording is completed, continue to execute step S602 to periodically read the status data of the BMC in the shared memory.
[0078] Through the above embodiments, it is possible to timely sense and quickly notify the user to handle the situation when a BMC stops running due to a fault.
[0079] In an exemplary embodiment, the implementation process of monitoring the status data in the shared memory space by the first processor to obtain the monitoring result in the above step S204 also includes: reading third status data from the shared memory space by the first processor, wherein the third status data is the status data read for the first time after the baseboard management controller completes initialization; and determining the third status data as the monitoring result.
[0080] Optionally, in the above embodiment, if the BMC system has just finished starting, the status data read for the first time does not have the status data obtained last time for comparison, and the status data read for the first time is directly recorded in the memory.
[0081] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0082] In this embodiment, a state monitoring device for a baseboard management controller is also provided. The system is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0083] Figure 7is a structural block diagram of a state monitoring device of a baseboard management controller according to an embodiment of the present application, such as Figure 7 As shown, the device comprises:
[0084] A writing module 72, configured to receive the status data of the baseboard management controller acquired by the second processor, and write the status data into the shared memory space;
[0085] An acquisition module 74, configured to acquire a monitoring result obtained by the first processor monitoring the status data in the shared memory space;
[0086] The sending module 76 is used to send the monitoring result to a storage device for recording.
[0087] Through the above device, the acquired status data of the baseboard management controller can be written into the shared memory space by the second processor, and then the status data in the shared memory space can be monitored by the first processor to obtain the monitoring result, and then the monitoring result can be sent to the storage device for recording, so as to realize the detailed recording of the status of the baseboard management controller. Therefore, the problem of how to monitor the status of the baseboard management controller in the related art can be solved.
[0088] In an exemplary embodiment, the write module 72 is also used to: start the first processor when it is detected that the baseboard management controller is powered on; load initialization firmware through the first processor, wherein the initialization firmware is preset firmware of the first processor, and the initialization firmware includes a first boot program, and the initialization firmware is used to initialize the baseboard management controller; run the first boot program through the first processor to start a first operating system in the first processor, wherein the first operating system is used to run a monitoring program, wherein the monitoring program is used to monitor status data in the shared memory space; when it is determined that the first operating system has been started, run the first boot program through the first processor to start the second processor; run the second boot program through the second processor to start the second operating system in the second processor, wherein the second boot program is a preset program of the second processor, and the second operating system is used to run an instruction execution program, and the instruction execution program is used to receive and execute operation instructions.
[0089] In an exemplary embodiment, the writing module 72 is also used to: receive the status update time and current status of the baseboard management controller obtained by the second processor in a first preset period; represent the status update time in a preset data format to obtain time data; determine the status code corresponding to the current status from a preset configuration table, wherein the preset configuration table stores the corresponding relationship between the current status and the status code; and determine the time data and the status code as the status data.
[0090] In an exemplary embodiment, the writing module 72 is also used to: receive a target operation instruction sent by the target object through the second processor, wherein the target operation instruction corresponds to a target state; execute the target operation instruction through the second processor, wherein during the execution of the target operation instruction, the current state of the baseboard management controller obtained by the second processor is the target state.
[0091] In an exemplary embodiment, the acquisition module 74 reads first state data and second state data from the shared memory space in a second preset cycle through the first processor, wherein the first state data and the second state data are two state data read in adjacent cycles, and the reading time of the first state data is earlier than the reading time of the second state data; compares the state code of the first state data with the state code of the second state data to obtain a comparison result; when the comparison result indicates that the state code of the first state data and the state code of the second state data are inconsistent, determines the second state data as the monitoring result.
[0092] In an exemplary embodiment, the acquisition module 74 is also used to: when the comparison result indicates that the status code of the first status data and the status code of the second status data are both target status codes, obtain the time data of the first status data and the time data of the second status data; when it is determined that the time difference is greater than a preset time difference, send a fault warning message to the target object, wherein the time difference represents the difference between the first time data and the second time data.
[0093] In an exemplary embodiment, the acquisition module 74 is also used to: read third status data from the shared memory space through the first processor, wherein the third status data is status data read for the first time after the baseboard management controller completes initialization; and determine the third status data as the monitoring result.
[0094] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0095] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0096] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:
[0097] S1, receiving the status data of the baseboard management controller acquired by the second processor, and writing the status data into the shared memory space;
[0098] S2, obtaining a monitoring result obtained by the first processor monitoring the status data in the shared memory space; S3, sending the monitoring result to the storage device for recording.
[0099] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0100] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0101] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0102] S1, receiving the status data of the baseboard management controller acquired by the second processor, and writing the status data into the shared memory space;
[0103] S2, obtaining a monitoring result obtained by the first processor monitoring the status data in the shared memory space; S3, sending the monitoring result to the storage device for recording.
[0104] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0105] Optionally, in this embodiment, the computer program may be configured to perform the following steps by means of the computer program:
[0106] S1, receiving the status data of the baseboard management controller acquired by the second processor, and writing the status data into the shared memory space;
[0107] S2, obtaining a monitoring result obtained by the first processor monitoring the status data in the shared memory space; S3, sending the monitoring result to the storage device for recording.
[0108] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0109] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0110] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for monitoring the status of a baseboard management controller, characterized in that: Applied to a baseboard management controller, the baseboard management controller includes a first processor, a second processor, and a shared memory space, the shared memory space and the first processor, the second processor have a data transmission channel, the baseboard management controller is connected to a storage device, including: receiving the status data of the baseboard management controller acquired by the second processor, and writing the status data into the shared memory space; Obtaining a monitoring result obtained by the first processor monitoring the status data in the shared memory space; The monitoring result is sent to the storage device for recording.
2. The method according to claim 1, characterized in that Before receiving the status data of the baseboard management controller acquired by the second processor and writing the status data into the shared memory space, the method further includes: When detecting that the baseboard management controller is powered on, starting the first processor; Loading initialization firmware through the first processor, wherein the initialization firmware is a preset firmware of the first processor, the initialization firmware includes a first boot program, and the initialization firmware is used to initialize the baseboard management controller; Running the first boot program through the first processor to start a first operating system in the first processor, wherein the first operating system is used to run a monitoring program, wherein the monitoring program is used to monitor the status data in the shared memory space; When it is determined that the first operating system has been started, running the first boot program through the first processor to start the second processor; The second boot program is run through the second processor to start the second operating system in the second processor, wherein the second boot program is a preset program of the second processor, the second operating system is used to run an instruction execution program, and the instruction execution program is used to receive and execute operation instructions.
3. The method according to claim 1, characterized in that Receiving the status data of the baseboard management controller acquired by the second processor includes: receiving a state update time and a current state of the baseboard management controller obtained by the second processor in a first preset period; Representing the state update time by a preset data format to obtain time data; Determine a status code corresponding to the current status from a preset configuration table, wherein the preset configuration table stores a correspondence between the current status and the status code; The time data and the status code are determined as the status data.
4. The method according to claim 3, characterized in that Before receiving the state update time and current state of the baseboard management controller obtained by the second processor in a preset period, the method further includes: receiving, by the second processor, a target operation instruction sent by the target object, wherein the target operation instruction corresponds to a target state; The target operation instruction is executed by the second processor, wherein during the execution of the target operation instruction, the current state of the baseboard management controller obtained by the second processor is the target state.
5. The method according to claim 1, characterized in that The state data in the shared memory space is monitored by the first processor to obtain a monitoring result, including: The first state data and the second state data are read from the shared memory space by the first processor in a second preset cycle, wherein the first state data and the second state data are two pieces of state data read in adjacent cycles, and the reading time of the first state data is earlier than the reading time of the second state data; The status code of the first status data and the status code of the second status data are compared to obtain a comparison result; when the comparison result indicates that the status code of the first status data and the status code of the second status data are inconsistent, the second status data is determined as the monitoring result.
6. The method according to claim 5, characterized in that After comparing the status code of the first status data and the status code of the second status data to obtain a comparison result, the method further includes: When the comparison result indicates that the state code of the first state data and the state code of the second state data are both target state codes, acquiring time data of the first state data and time data of the second state data; When it is determined that the time difference is greater than a preset time difference, a fault warning message is sent to the target object, wherein the time difference represents the difference between the first time data and the second time data.
7. The method according to claim 1, characterized in that The method further comprises: monitoring the state data in the shared memory space by the first processor to obtain a monitoring result; Reading third status data from the shared memory space by the first processor, wherein the third status data is status data read for the first time after the baseboard management controller completes initialization; The third status data is determined as the monitoring result.
8. A state monitoring device for a baseboard management controller, characterized in that: include: A writing module, used for receiving the status data of the baseboard management controller acquired by the second processor, and writing the status data into the shared memory space; An acquisition module, used for acquiring a monitoring result obtained by the first processor monitoring the status data in the shared memory space; The sending module is used to send the monitoring result to a storage device for recording.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
State monitoring method and device for baseband chip of communication system and baseband chip
CN119697688A
State Monitoring Method, Device and Baseband Chip for Communication System Baseband Chip
CN119697688B
Firmware upgrading system and method
CN120560694A
Data storage and transmission method, equipment and medium
CN120909963A