Log storage method, BMC (Baseboard Management Controller) and computing equipment
By introducing a security core in BMC, the logs of the business core exceptions are written to the non-volatile storage medium, and restored to memory after normal recovery, the problem of log data loss during BMC exceptions is solved, and the cause of exceptions is achieved analysis and processing.
Patent Information
- Application Number
- CN202411045056.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-26
AI Technical Summary
In the server, when BMC is abnormal, the log data in memory is easily lost, resulting in the inability to determine the cause of the exception, affecting the resolution of system exceptions.
By introducing a security core into the BMC, the operating status of the service core is obtained in real time. When the service core is in an abnormal state, the security core writes the logs in memory to the non-volatile storage medium, and after the service core returns to normal operation, Restores logs from nonvolatile storage media to memory.
Ensure the persistence of log data, can analyze the causes of abnormal interrupt events from the restored logs, locate difficult problems and deal with them, and avoid the loss of log data due to business core failure.
Smart Images

Figure CN119025030A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a log storage method, a BMC and a computing device. Background Art
[0002] The Baseboard Management Controller (BMC) is a dedicated microcontroller embedded in the motherboard of a computer system, which is used to monitor and manage the operating status of servers, data centers, and other complex computer systems. During the operation of the computer system, the BMC may encounter various abnormal interruptions. Since the CPU core is the key component in the server responsible for executing instructions and processing data, these abnormal interruptions are usually handled by the corresponding running CPU core. For example, the log data generated by the business core will be continuously written to the memory of the BMC, but in the case of an abnormal business core, the business core may not be able to store the on-site logs in the current business core abnormal scenario. Therefore, in order to prevent the loss of log data when the BMC is abnormal or crashes, the business core periodically dumps the log data in the memory to a non-volatile storage medium (such as flash memory, hard disk, etc.). The non-volatile storage medium can retain data after the system is powered off or restarted. Even if the system crashes or restarts, the log data that has been dumped to the non-volatile storage medium can still be retained and accessed.
[0003] Since the log data in the memory is periodically dumped to the non-volatile storage medium, when the BMC is abnormal, if the abnormality occurs before the log reaches the dump cycle, that is, there is data in the memory that has not been dumped to the non-volatile storage medium in time, the log may be lost due to the volatility of the memory. For example, when the abnormality is so serious that it cannot be started normally, it may be necessary to try to restore the BMC to a normal state by powering off (that is, completely cutting off the power) and then powering on again. The memory is a volatile memory that relies on a continuous power supply to maintain the stored data. When the power is suddenly cut off, the charge in the memory will be quickly exhausted, resulting in the immediate loss of the stored log data. The log usually contains key information when the abnormality occurs, such as error code, stack trace, system status, etc. This information is crucial for analyzing and solving system abnormalities. In the case of log data loss, the log data when the BMC abnormality occurs cannot be obtained, resulting in the inability to determine the cause of the abnormality, affecting the solution of the system abnormality. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a log storage method, a BMC, and a computing device, which aim to solve the problem that log data in the memory is easily lost when the BMC is abnormal.
[0005] In the first aspect, the technical solutions provided by the embodiments of the present application are as follows:
[0006] A first aspect of an embodiment of the present application provides a log storage method, which is applied to a baseboard management controller BMC, wherein the BMC includes a business core, a security core, a memory, and a non-volatile storage medium, and the method includes:
[0007] Acquiring the operating status of the service core during the security verification;
[0008] When the business core is in an abnormal operation state, the security core writes the first log in the memory to the non-volatile storage medium;
[0009] When the business core resumes normal operation, the business core writes a first log in the non-volatile storage medium into the memory; the first log is a log generated by the business core in normal operation and written into the memory.
[0010] The method provided by the present application is that when the business core is in an abnormal state, the security core writes the first log in the memory to the non-volatile storage medium. After the first log is written, the operating state of the business core is reset so that when the business core is restored to a normal operating state, the business core restores the first log in the non-volatile storage medium to the memory. Since the security core operates independently of the business core, the first log can still be written to the non-volatile storage medium when the business core is in an abnormal state, and the non-volatile storage medium has the ability to persist data, even if the business core resets the operating state, the first log will not be lost. When the business core is restored to a normal operating state, the first log can be restored from the non-volatile storage medium to the memory. Furthermore, the cause of the abnormal interruption event can be analyzed from the restored first log, the difficult problem can be located, and the corresponding processing can be performed. It solves the problem that when the log data is lost due to the failure of the business core, the log data when the BMC abnormality occurs cannot be obtained, resulting in the inability to locate the cause of the failure.
[0011] In a possible implementation, the BMC further includes an abnormal interrupt module, and obtaining the running state of the service core during the security verification includes:
[0012] During the security verification, a signal sent by an abnormal interruption module is obtained, and the abnormal interruption module is used to determine whether the service core is in an abnormal operation state, and when it is determined that the service core is in an abnormal operation state, an interruption signal is sent to the security core;
[0013] When the business core is in an abnormal operation state, the security core writes the first log in the memory to the non-volatile storage medium, including:
[0014] When the security core receives an interrupt signal sent by the abnormal interrupt module, the security core writes the first log in the memory into the non-volatile storage medium.
[0015] In a possible implementation manner, the service core recovering to a normal operating state includes:
[0016] The service core is restored to a normal operating state by powering off and then powering on again.
[0017] In a possible implementation manner, the service core recovering to a normal operating state includes:
[0018] The security core performs a reset operation on the service core, where the reset operation is used to reset the operating state of the service core.
[0019] In a possible implementation, the method further includes:
[0020] In the case that the service core is not restored to a normal operating state by the reset operation of the security core, the service core is restored to a normal operating state by powering off and then powering on again.
[0021] In a possible implementation manner, when the security core performs a reset operation on the service core and the service core recovers to a normal operating state, the service core writes the first log in the non-volatile storage medium into the memory, including:
[0022] The service core compares the first log in the non-volatile storage medium with the log in the memory;
[0023] When the comparison result indicates that the first log in the non-volatile storage medium is inconsistent with the log in the memory, the service core clears the log in the memory and writes the first log in the non-volatile storage medium into the memory.
[0024] In a possible implementation manner, the service core writes the first log in the non-volatile storage medium into the memory, including:
[0025] The business core detects whether the first log in the non-volatile storage medium meets a preset validity condition and / or a preset integrity condition;
[0026] In response to the first log in the non-volatile storage medium meeting a preset validity condition and / or a preset integrity condition, the first log in the non-volatile storage medium is written into the memory.
[0027] In a possible implementation manner, after the service core writes the first log in the non-volatile storage medium into the memory, the method further includes:
[0028] When the first log in the non-volatile storage medium is completely written into the memory, the service core clears the first log in the non-volatile storage medium.
[0029] In a second aspect, an embodiment of the present application provides a BMC, wherein the BMC includes a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to implement the log storage method as described in the first aspect above.
[0030] In a third aspect, the third aspect of the embodiment of the present application provides a computing device, characterized in that the computing device includes a processor, a memory and a BMC, and the BMC is used to execute the log storage method as described in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 A schematic diagram of the BMC structure provided in the embodiment of the present application;
[0033] Figure 2 A schematic diagram of the structure of a server provided in an embodiment of the present application;
[0034] Figure 3 A schematic diagram of a BMC multi-core heterogeneous system provided in an embodiment of the present application;
[0035] Figure 4 A schematic diagram of an interrupt signal provided in an embodiment of the present application;
[0036] Figure 5 A flow chart of the first log storage method provided in the embodiment of the present application;
[0037] Figure 6 A flow chart of a second log storage method provided in an embodiment of the present application;
[0038] Figure 7 A flow chart of a third log storage method provided in an embodiment of the present application;
[0039] Figure 8 A flow chart of the fourth log storage method provided in the embodiment of the present application;
[0040] Fig. 9 A flow chart of the fifth log storage method provided in the embodiment of the present application;
[0041] Fig.10 A flow chart of the sixth log storage method provided in an embodiment of the present application;
[0042] Fig.11 A flow chart of the seventh log storage method provided in the embodiment of the present application;
[0043] Fig.12 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] It should be noted that the embodiments described in this application are only part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0045] In order to make the following embodiments clear, the technical terms involved in this application are first introduced.
[0046] Watchdog (WDT) is a software mechanism used to monitor the operation of the system. It was first introduced in the single-chip microcomputer system to prevent the program from falling into an infinite loop due to interference, which would cause the system to not work properly. The basic principle of watchdog is to set up a timer, usually giving the watchdog a number. The watchdog starts counting after the program starts running. If the program runs normally, the CPU should issue an instruction to reset the watchdog to zero after a period of time. If the watchdog increases to the set value, it is considered that the program is not working properly, which will cause the system to restart, so as to ensure that the system core process is in normal operation most of the time.
[0047] BMC (Baseboard Management Controller) is the core component of server out-of-band management. It is a dedicated microcontroller independent of the server operating system and main processor, usually built into the motherboard of servers, network equipment and other complex computer systems. It is mainly responsible for monitoring and managing the status of system hardware, such as monitoring key parameters such as system temperature, voltage, fan speed, power status, and providing remote management and control functions, such as remote monitoring, remote restart, etc.
[0048] Computer systems that use BMC for monitoring and management usually include but are not limited to servers, rack servers in data centers, high-performance computing clusters, and some complex embedded systems. Such systems are characterized by relatively complex hardware configurations and highly integrated management requirements, which require detailed operating status monitoring, fault warning, remote management and maintenance capabilities.
[0049] In the current BMC design, a multi-core architecture is used to enhance functionality and security. Generally, a BMC is configured with four business cores and one security core, which are part of the hardware and each has a specific role and task. The business core is mainly responsible for the management functions of the BMC and the interaction with the server hardware devices, such as monitoring the server status and executing management commands. The security core is mainly responsible for providing security functions, such as identity authentication, access control, encrypted communication, etc., to ensure the security and integrity of the BMC and the server hardware it manages.
[0050] BMC includes independent power supply and I / O interface, and can start running before the server's operating system, BIOS, etc. are started, so as to provide management and control functions for the server. When a computer system monitored and managed by BMC has an abnormal interruption, the corresponding CPU core usually handles these interruptions and takes corresponding measures. However, in some cases, especially when the CPU core itself has an abnormality, it cannot store log data normally. This is because the abnormality of the CPU core may cause the loss or damage of its internal registers and cache data, which in turn affects the log storage function. In addition, if the abnormality is serious enough to cause the entire server's operating system to crash or fail to start, then even if there is a log storage mechanism, these logs may not be accessible because the server's operating system cannot run normally. Administrators or technicians cannot view the on-site logs when the problem occurs, which makes it particularly difficult to locate the root cause of the triggering system abnormality. Without this critical log information, it is difficult to determine which component or part has a problem, and it is impossible to take effective measures to solve the problem.
[0051] The embodiment of the present application proposes a heterogeneous design of the security core and the business core of the BMC. A heterogeneous multi-core system refers to a system that integrates multiple processing cores of different types or functions on a physical chip. Each core can serve as the execution engine of its corresponding software system, thereby achieving parallel processing and functional separation.
[0052] The method provided by the embodiment of the present application is that when the business core is in an abnormal state, the security core writes the first log in the memory to the non-volatile storage medium. After the first log is written, the business core is reset so that when the business core is restored to a normal operating state, the first log in the non-volatile storage medium is restored to the memory. Since, when the business core is in an abnormal state, the first log can still be written to the non-volatile storage medium, and the non-volatile storage medium has the ability to persist data, further, even if the business core resets the operating state, the first log will not be lost. When the business core is restored to a normal operating state, the first log can be restored from the non-volatile storage medium to the memory. Furthermore, the cause of the abnormal interruption event can be analyzed from the restored first log, the difficult problem can be located, and corresponding processing can be performed, thereby avoiding the problem of log data loss due to business core failure.
[0053] This application embodiment provides a schematic diagram of the structure of a BMC. Figure 1 As shown, Figure 1 The BMC structure diagram provided in the embodiment of the present application, the BMC may include: a processor 210, and a memory 220. The processor 210 and the memory 220 may be connected via a bus or other means, and the processor may include multiple cores, the multiple cores including a business core and a security core, the business core is used to perform tasks related to the business, and the security core is used to perform secure boot tasks.
[0054] In the embodiment of the present application, the processor 210 is the computing core and control core of the BMC. In one example, the processor includes a security core and a business core, wherein the security core is used to perform tasks related to BMC security such as secure boot and security verification within the BMC, and the business core is used to perform tasks related to business within the BMC. Since each core has its own independent memory space and operating context, they can run different systems independently.
[0055] The memory 220 (memory) is a memory device of the server, which is used to store programs and data. It is understandable that the memory 220 may include a memory and a non-volatile storage medium. The memory 220 provides a storage space, which stores an operating system and executable program code, including but not limited to: Windows system, Linux system, bare metal system, etc.
[0056] It is understandable that the embodiments of the present application Figure 1 The illustrated structure does not constitute a specific limitation on the BMC. In other embodiments of the present application, the BMC may include more or fewer components than those shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0057] Based on the above BMC structure, the present application embodiment also provides a server, see Figure 2 , Figure 2 A schematic diagram of the structure of a server provided in an embodiment of the present application, such as Figure 2 As shown in FIG. 1 , the server includes: a processor, a BMC and a power supply module. The BMC deployed on the server can be as follows: Figure 1 The BMC shown. The power supply module is responsible for providing a stable power supply to the components within the server.
[0058] In an optional implementation, the security core and the business core can run different software systems. It can be understood that the business core and the security core are the basis and core of the operation of their respective software systems, and the functions and tasks of the software systems need to be executed by the security core and the business core. That is, the security core and the business core serve as the execution engines of their respective corresponding software systems and can execute program codes in different software systems.
[0059] For example, the business core runs an embedded operating system to perform business-related tasks, while the security core runs a bare metal system to perform security-related tasks. The bare metal system runs directly on the hardware without the middle layer of the traditional operating system, and can have higher security and reliability.
[0060] In actual application scenarios, for an operating system or bare metal system to run, the relevant code and data must first be loaded into memory. Each core can have its own memory space or cache, or they can share a memory space. Even if they share memory physically, the two cores can remain logically independent and run different systems and programs without interfering with each other.
[0061] For example, for an embedded operating system, drivers, related codes, etc. can be loaded into the memory allocated to the business core, and the execution starting point can be set. For a bare metal system, related codes and data can also be loaded into the memory allocated to the security core, and the corresponding execution starting point can be set. After the memory is allocated to the business core and the embedded operating system is loaded, the business core can start using the embedded operating system to process business-related tasks. Similarly, after the memory is allocated to the security core and the bare metal system is loaded, the security core can start using the bare metal system to process security-related tasks.
[0062] For more information about the BMC multi-core heterogeneous structure, see Figure 3 , Figure 3 A schematic diagram of a BMC multi-core heterogeneous system provided in an embodiment of the present application, wherein the memory is a storage space divided out of the BMC that can be shared by the security core and the business core, and may include a memory and a non-volatile storage medium.
[0063] Among them, the business core, memory, and non-volatile storage media run in the same software system environment. This software system provides them with the necessary support and guarantee, enabling them to work together to complete various complex computing tasks. As the execution engine of this software system, the business core can execute these instructions according to the instruction set architecture (ISA) of the software system. In other words, the business core is the hardware part that executes software instructions, while the memory and non-volatile storage media provide data storage functions. These components can be connected together through the system bus, but it is the software system that really enables them to work together. Logically, they are integrated and managed by the software system (such as the operating system), and the software system can enable these hardware resources to work together through mechanisms such as process management and memory management. That is, the business core executes the instructions provided by the software system, and the software system determines how to use the business core and how to manage hardware resources such as memory and non-volatile storage media.
[0064] Although the security core usually runs in an independent software system, it can interact with the software system where the business core is located through specific interfaces or protocols. Figure 3 As shown in the figure, the security core can access the memory and non-volatile storage media. The security core is responsible for monitoring the operating status of the business core and intervening when necessary to protect key data and perform necessary security operations. It can include functions such as hardware status monitoring, security policy implementation, fault warning and recovery. The security core and the business core are not in the same software system. It can run independently of the business core to ensure that the security management function of the BMC multi-core heterogeneous system is still available when the business core is in an abnormal operating state. The business core is responsible for executing business logic and data processing tasks. It has memory resources and can run an operating system, which is sufficient to support complex business applications and data processing requirements. The business core and the security core can exchange information and work together through an internal communication mechanism to ensure the safe execution of business and the complete protection of data.
[0065] The abnormal interrupt trigger module is mainly responsible for detecting and responding to abnormal conditions encountered by the business core during the sequential execution of the program instruction stream. These abnormal conditions may originate from various events in the execution process of the processor inside the BMC, including but not limited to instruction abnormalities, hardware failures, etc. When the abnormal interrupt trigger module detects an abnormal condition, it can immediately interrupt the currently executed program and send an interrupt signal to both the security core and the business core.
[0066] In an optional implementation, the trigger mode may be edge triggered, which means that when the interrupt signal changes from one state to another (such as from a low level to a high level or vice versa), an interrupt is triggered. Figure 4 As shown, Figure 4The interrupt signal schematic diagram provided for the embodiment of the present application includes a rising edge and a falling edge, wherein the rising edge corresponds to a change from a low level to a high level, and the falling edge corresponds to a change from a high level to a low level.
[0067] The level trigger mechanism continuously triggers interrupts based on the signal remaining at a specific level (such as high or low). However, this mechanism may encounter some problems when dealing with variable frequency triggers. For example, when the business core clears the interrupt after the interrupt is triggered, the interrupt signal may disappear, which may affect the security core receiving the interrupt signal. Because the level trigger depends on the specific level of the signal, once the signal disappears, the interrupt cannot be triggered again until the signal reaches the trigger level again.
[0068] In contrast, edge triggering is more suitable for interrupt triggering in the embodiment of the present application. Edge triggering relies on the change of the signal state to trigger the interrupt, rather than the specific level of the signal. Therefore, even after the interrupt is cleared, as long as the interrupt signal changes state again (for example, from a low level to a high level, or from a high level to a low level), the interrupt will be re-triggered. This means that both the business core and the security core can independently clear their own interrupt status after processing their own interrupts without affecting the interrupt processing of other cores.
[0069] This mechanism helps reduce conflicts and misoperations in interrupt processing. In a heterogeneous multi-core system, multiple processor cores may process different interrupt sources at the same time. If the level trigger method is used, the interrupt may be lost or triggered repeatedly due to the disappearance of the signal or the change of the level. The edge trigger method can ensure that the interrupt can be accurately triggered every time the signal state changes, thereby improving the system's concurrency performance and processing efficiency.
[0070] When the security core receives the interrupt signal, it can be known that the current business core has an abnormal situation during operation, and then the first log in the memory is written into the non-volatile storage medium. This non-volatile storage medium has the ability to persist data, and the first log will not be lost even when the system is powered off or restarted. After the first log is written, in order to restore the normal operation of the business core and avoid system crashes or instability caused by dog timeout events, the security core can execute the operation of restarting the business core and try to reset the business core. Since the first log has been written into the non-volatile storage medium by the security core, the log can be restored from the non-volatile storage medium even after power failure. Therefore, the cause of the dog timeout event can be analyzed from the first log restored to the memory, difficult problems can be located, and corresponding processing can be performed.
[0071] The BMC multi-core heterogeneous system that integrates multiple different types of processing cores introduced above has the following benefits:
[0072] By separating the security core from the business core, the security core can still operate normally and take corresponding measures even if an abnormality occurs or an attack occurs in the business core. The security core can monitor the status of the business core and dump the first log in response to an abnormal interrupt, ensuring the integrity and accessibility of key data and logs. This design improves the security and reliability of the BMC multi-core heterogeneous system.
[0073] The abnormal interrupt trigger module and the business core run in the same software system, which can realize real-time monitoring of the operating status of the business core. The interaction between them is closer and more efficient. This real-time monitoring mechanism helps to reduce the time of fault handling, and can respond quickly when errors or abnormal behaviors occur in the business core to prevent further expansion of the fault, thereby improving the reliability and stability of the BMC multi-core heterogeneous system.
[0074] When the business core is restored to normal operation by powering off and then powering on again, the business core accesses the first log backed up in the non-volatile storage medium and restores it to the memory. The above three components run in the same software system. On the one hand, they can share the same memory address space, data format, and communication protocol. This reduces the conversion and formatting operations required for data transmission, thereby reducing the complexity of communication. On the other hand, data can be passed directly between these components without going through additional software layers (such as a network protocol stack). This reduces the level and complexity of the software stack and reduces communication latency.
[0075] Based on the structural framework of the BMC multi-core heterogeneous system, the log storage method is described with the security core in the BMC multi-core heterogeneous system as the execution subject. Figure 5 , Figure 5 A flow chart of a first log storage method provided in an embodiment of the present application, the method comprising:
[0076] S51. Acquire the operating status of the service core during the security verification.
[0077] After startup, the safety core monitors the operating status of the business core in real time. These statuses can include normal operating status and abnormal operating status. When the business core is in an abnormal operating status, the safety core can detect the state change of the business core in time. This can be achieved through abnormal signals sent by the safety core, timer interrupts or other mechanisms.
[0078] S52. When the business core is in an abnormal operating state, the security core writes the first log in the memory to the non-volatile storage medium; when the business core resumes normal operating state, the business core writes the first log in the non-volatile storage medium to the memory.
[0079] The first log is a log generated and written into the memory when the service core is in a normal operating state.
[0080] When the security core detects that the business core is in an abnormal state, the security core can write the first log in the memory to a non-volatile storage medium to ensure that the first log is not lost after the BMC is powered off or powered on and off and restarted.
[0081] In an actual application scenario, after the business core is in an abnormal state, the business core can be reset to restore the business core to a normal operating state. Then, the business core checks whether a complete first log exists in the non-volatile storage medium. If the first log exists, the business core reads the first log from the non-volatile storage medium. The business core restores the first log to the memory for subsequent analysis, diagnosis, or re-execution of related operations.
[0082] Therefore, the security core is mainly responsible for the security management and monitoring of the BMC multi-core heterogeneous system. It can run independently of the business core to ensure that the security management function of the BMC multi-core heterogeneous system is still available when the business core is in an abnormal operating state. In addition, the non-volatile storage medium has the ability to persist data, so the first log will not be lost even if the business core needs to reset the operating state.
[0083] Based on the structural framework of the BMC multi-core heterogeneous system and the interaction between various components, the log storage method when an abnormality occurs in the business core is explained. Figure 6 A flow chart of a second log storage method provided in an embodiment of the present application, the method comprising:
[0084] S61. When the service core is in an abnormal operation state, the security core and the service core receive an interrupt signal sent by the abnormal interrupt trigger module.
[0085] BMC is responsible for monitoring and managing various resources and functions of the server. It can collect various status information of the server through the hardware interface, such as CPU usage, memory usage, hard disk space, temperature, fan speed, etc. The above status information can be accessed and used by the business core for further business logic processing, such as monitoring server status, executing management commands, etc. In this process, the business core can continuously generate logs, which are mainly used to record the process, status and exception information of the business core performing business operations, for subsequent business analysis, problem troubleshooting and performance optimization. Exemplarily, the log content may include various operations of the business core during operation, such as interface calls, request responses, data processing, etc. These records provide rich contextual information for the subsequent location of the cause of the exception.
[0086] In an actual application scenario, after being started, the service core can access various status information of the server in real time through IPMI or other protocols, and analyze the status information based on the first software system running on the service core.
[0087] The first software system may be a Windows system, a Linux system, etc. The first software system run by the business core may be responsible for managing various resources in the BMC business core, including but not limited to processors, memory, network interfaces, etc. It may allocate and recycle resources according to the needs of the BMC to ensure that the BMC can run efficiently. Exemplarily, when the business core needs to perform a task, the first software system may allocate sufficient processor time and memory resources for it; when the task is completed, the first software system may recycle these resources for use by other tasks.
[0088] And the first software system can ensure that the BMC can respond to various events of the server in real time, such as hardware failure, insufficient memory, etc., through task scheduling, and take corresponding processing measures in time. For different types of status information, the first software system can provide corresponding monitoring tasks for the business core. These monitoring tasks can correspond to different execution programs. When executing, the business core can monitor the changes of status information in real time, and issue alarms and generate logs according to preset thresholds.
[0089] Therefore, the first software system of the business core operation is an important guarantee for the stable operation and real-time management of the server. It can ensure that the BMC can monitor and manage the server in real time by efficiently managing resources, scheduling tasks, handling interrupts, and realizing inter-process communication.
[0090] Among them, the memory is a volatile medium, such as dynamic random access memory (Double Data Rate, DDR). The log data in the memory gradually increases over time. In the following text, the first log refers to the log data stored in the memory. The first log can contain detailed information of the event, such as timestamp, event type, related parameters, etc. Specific events can be set in advance according to actual needs, such as server startup, user request, etc. Through such a process, specific events of the server are converted into traceable and analyzable log data, which provides a basis for timely discovery and resolution of problems.
[0091] Memory is a storage medium with very fast read and write speeds in electronic systems. Writing the first log to the memory can ensure the timely storage of the log. At the same time, since the access speed of the memory is much higher than other storage media such as hard disks, writing the first log to the memory can reduce the delay caused by waiting for storage and ensure that the business core can run continuously and efficiently. Writing the first log to the memory can also facilitate subsequent log processing and analysis. Once the log is written to the memory, these first logs can be quickly read out when needed, and operations such as filtering, analysis, and aggregation can be performed to extract useful information. This is very helpful for troubleshooting, performance optimization, and system improvement.
[0092] The business core is responsible for monitoring and managing various resources and functions of the server. During normal operation, the business core will periodically send a "feed the dog" signal to the Watchdog (abnormal interrupt trigger module) to reset the Watchdog timer. When an abnormality occurs when the business core is performing a monitoring task, such as a watchdog timeout, the business core is trapped in an infinite loop or cannot work normally for some reason, it will not be able to send a "feed the dog" signal to the Watchdog on time, which means that the current process or task on the business core is not completed within the scheduled time. In this case, it can trigger an interrupt signal, namely the "dog timeout interrupt", and then the abnormal interrupt trigger module will send it to the security core and the business core at the same time.
[0093] In actual application scenarios, the business core watchdog timeout exception can be triggered by the following situations:
[0094] Application or service hang: The application running on the business core stops responding for some reason and fails to complete its periodic tasks or send heartbeat signals within the specified time, causing the watchdog to time out.
[0095] Hardware failure: Failures in the CPU, memory, or I / O subsystem prevent the business core from performing tasks normally, resulting in timeouts.
[0096] Resource contention: Resource contention, such as insufficient memory, cache locks, or I / O bottlenecks, prevents the business core from completing the currently executing task in a timely manner.
[0097] Software error: Programming errors, deadlocks, or infinite loops cause the process on the business core to fail to complete on time, causing a timeout.
[0098] Overclocking issue: If the business core is overclocked, the watchdog timeout may occur due to overheating or stability issues.
[0099] Power supply issues: An unstable power supply may affect the CPU clock frequency, causing tasks to take longer to complete.
[0100] S62. In response to the interrupt signal, the security core writes the first log in the memory into a non-volatile storage medium.
[0101] After the security core is started, it monitors the operating status of the business core in real time. These states can include normal operating states (such as executing applications, processing data, etc.) and abnormal operating states (such as crashes, freezes, and infinite loops). When the business core is in an abnormal operating state, the security core can detect the state change of the business core in time. This can be achieved through abnormal signals, timer interrupts, or other mechanisms. For example, the abnormal operating state of the business core can be notified to the security core through the watchdog.
[0102] After receiving the interrupt signal, the safety core will take action immediately: first, it will write the first log in the memory to the shared non-volatile storage medium area to ensure that these important first logs will not be lost in the event of power failure or restart; then, the safety core will reset the business core, which is a means of trying to restore the normal operation of the business core. Through reset, the error state or abnormality in the business core can be cleared, so that it can be restarted and restored to normal operation, thereby trying to quickly restore the BMC multi-core heterogeneous system containing the current business core and reduce the downtime caused by business core abnormalities.
[0103] S63: In response to the first log in the memory being completely written into the non-volatile storage medium, resetting the service core.
[0104] After the first log is written to the non-volatile storage medium, the security core can check, verify and compare the write operation status to confirm that the first log in the memory has been completely dumped to the non-volatile storage medium. When the first log in the memory has been completely written to the non-volatile storage medium, the business core is reset.
[0105] Before resetting the business core, the security core can communicate with the business core to ensure that the business core can complete necessary cleanup and preparation work before resetting, such as closing open files and releasing occupied resources.
[0106] The resetting of the service core may include the following reset modes:
[0107] In the first exemplary reset method, after the security core confirms that the first log in the memory has been completely written to the non-volatile storage medium, the security core can initiate a reset operation on the business core. The reset operation means resetting the operating state of the business core, restoring the business core that is currently in an abnormal operating state to an initial state or a preset safe state to eliminate possible error states or potential security risks. After the security core completes the reset operation on the business core, the security core still needs to continue to monitor the state of the business core. If the business core returns to normal operating state, the first log in the non-volatile storage medium is dumped. That is, when the business core is reset by the security core and restored to normal operating state, the business core writes the first log in the non-volatile storage medium into the memory.
[0108] In the second exemplary reset method, there is a priority order between the security core performing the reset operation and restarting the business core by powering off and then powering on again. First, the security core performs a reset operation on the business core. If the business core still cannot be restored to a normal operating state after the reset operation is completed, it is necessary to power off and then power on again to restart the business core. When the business core is restored to a normal operating state, the first log in the non-volatile storage medium is dumped. That is, if the business core is not restored to a normal operating state by the reset operation, and then the business core is restored to a normal operating state by powering off and then powering on again, the business core writes the first log in the non-volatile storage medium to the memory.
[0109] In the third exemplary reset mode, after the security core confirms that the first log in the memory has been completely written to the non-volatile storage medium, it can directly attempt to restore the business core to a normal operating state by powering off and then powering on again, and when the business core is restored to a normal operating state, the first log in the non-volatile storage medium is dumped. That is, when the business core is restored to a normal operating state by powering off and then powering on again, the business core writes the first log in the non-volatile storage medium to the memory.
[0110] S64: The service core determines that there is a power-on flag in the BMC and there is a first log in the non-volatile storage medium, and the service core writes the first log in the non-volatile storage medium into the memory.
[0111] Among them, the power-on flag is a flag bit in the BMC register, which is used to determine whether the BMC has completed the power-off and power-on action. When the BMC is powered on, the value in the register can be automatically cleared to the default value by the hardware. This default value can be 0 or a specific non-zero value. The value of the register will only be lost when the BMC is powered off. Therefore, for the above-mentioned second exemplary reset method or the third exemplary reset method, the business core can determine whether there is a power-on flag in the current BMC by reading the flag bit in the register.
[0112] For example, when the BMC is powered off and then powered on again, the business core reads the value of the register. If the read value is the default value, the business core can determine that the current BMC is powered on for the first time and the current register has a power-on flag. If the read value is not the default value, the business core can determine that the current BMC has been powered on before and has not completed the power-off and power-on action. In this case, the administrator can power off and power on the business core again.
[0113] Powering off and then powering on again is a troubleshooting method that can clear the memory status of the BMC and reset all hardware components to their initial status in an attempt to restore the normal operation of the business core, thereby resolving some problems caused by configuration errors or software conflicts. This operation can resolve temporary faults or software problems and restore the business core to normal operation.
[0114] From a hardware perspective, powering off and then powering on the BMC multi-core heterogeneous system can be achieved through the BMC power supply module. BMC is a small management system independent of the server's main computing node, used to deploy, diagnose, and manage servers. It can have an independent power supply module to control the power status of the BMC. This means that the power on and off operations of the BMC will not directly affect the power status of the server's main computing node. In actual application scenarios, the BMC is connected to the BMC's power supply unit, and the BMC can be powered off by disconnecting the connection between the BMC and the BMC's power supply unit. The BMC can be powered on by connecting the BMC to the BMC's power supply unit.
[0115] In another optional implementation, the entire server can be powered off and then powered on again to achieve the effect of resetting the operating status of the business core in the BMC. The server can be configured with its own power switch, which allows the administrator to directly control the power status of the server. When the administrator operates the power switch of the server, it is actually controlling the power supply module of the server to provide power to the server. The administrator can turn the power of the server on or off by pressing or toggling this switch.
[0116] During the power-off and power-on operation, the service core determines whether there is a power-on mark in the current BMC multi-core heterogeneous system, and checks whether there is a dumped first log in the non-volatile storage medium. If both conditions are met, the service core restores the first log in the non-volatile storage medium to the memory, and clears the first log and the power-on mark in the non-volatile storage medium, ensuring that the next time the BMC multi-core heterogeneous system is started, there will be no confusion or error due to the old first log.
[0117] Therefore, in the scenario where the business core needs to be powered off, by combining the collaborative work of the business core and the security core, and utilizing mechanisms such as watchdog timeout interruption, non-volatile storage media, and flag judgment, the safe preservation and recovery of the first log is ensured, thereby facilitating subsequent problem location and system maintenance.
[0118] In an optional implementation, the service core can also perform some additional operations to ensure the stability and security of the BMC. Figure 7 As shown, Figure 7 The third log storage method flow chart provided in the embodiment of the present application further includes the following steps after step S64:
[0119] S65. When the first log in the non-volatile storage medium is completely written into the memory, the service core clears the first log in the non-volatile storage medium.
[0120] The business core can clear the old first log that is no longer needed in the non-volatile storage medium to free up storage space and avoid data confusion. In addition, the business core can also record this reset event to facilitate subsequent maintenance and troubleshooting of the BMC.
[0121] In an optional implementation, after the service core is reset by powering off and then powering on again in S63, when the service core is restored to a normal operating state, the service core can verify whether the first log in the non-volatile storage medium is available, such as Figure 8 As shown, Figure 8 The fourth log storage method flow chart provided in the embodiment of the present application further includes the following steps after step S63:
[0122] S66: When the service core is restored to a normal operating state by powering off and then powering on again, and there is a first log in the non-volatile storage medium, the service core detects the first log.
[0123] The service core is restored to a normal operating state by powering off and then powering on again, and when there is a first log in the non-volatile storage medium, the service core may perform at least one of the following steps to check and verify whether the first log in the memory or the non-volatile storage medium is available:
[0124] Step A1: Check whether the first log meets the preset integrity condition.
[0125] The preset integrity condition is a restriction condition for verifying whether the first log is complete, and the restriction condition can be obtained according to the hash value, log length, log size, log format, etc. In an actual application scenario, the business core reads the first log in the non-volatile storage medium and verifies the integrity of the first log according to the preset integrity condition. The process may include at least one of the following steps:
[0126] Check the hash value of the first log to ensure that the data has not been tampered with or damaged during transmission or storage. Check whether the length or size of the first log is as expected to prevent data truncation or missing. Check whether the format and structure of the first log are correct to ensure that they can be parsed and analyzed correctly.
[0127] Step A2: Check whether the first log meets the preset validity condition.
[0128] The preset validity condition is a restriction condition for verifying whether the first log is valid. The restriction condition can be obtained according to settings such as a timestamp, a sequence number, a generation order, and a generation time. In an actual application scenario, the business core detects the validity of the first log based on the preset validity condition, which may include at least one of the following steps:
[0129] Check the timestamps or sequence numbers in the first log to confirm that they were generated in the correct order and time. Analyze the contents of the first log to find out whether there are any anomalies, errors, or warnings.
[0130] Based on the above integrity and validity checks, the security core can determine the reliability of the first log in the current memory or non-volatile storage medium. If the first log is complete and valid, the security core can consider that these first logs can be used to locate the cause of system abnormality.
[0131] If the detection result is abnormal, execute step S66; if the detection result is not abnormal, execute step S67.
[0132] S67: When the detection result is abnormal, the business core generates an alarm message.
[0133] The alarm information is used to inform the administrator that the first log in the current non-volatile storage medium is unavailable, thereby avoiding misjudgment due to an error in the first log.
[0134] It should be noted that an abnormality in the detection result indicates that the data in the first log is unavailable and an abnormality exists; in actual application scenarios, step A1 and step A2 may be performed in sequence or simultaneously.
[0135] S68. When there is no abnormality in the detection result, the service core writes the first log in the non-volatile storage medium into the memory.
[0136] The fact that there is no abnormality in the detection result indicates that the data in the first log is available. Therefore, the service core can read the first log in the non-volatile storage medium and write it completely into the memory.
[0137] On the one hand, after an abnormality occurs in the business core, restoring the first log from the non-volatile storage medium to the memory helps the business core to quickly recover to the operating state before the business core failure by reading the first log, and the business core can directly perform fault diagnosis through the first log in the memory, avoiding the delay of repeatedly reading logs from the non-volatile medium.
[0138] On the other hand, the write and read operations of non-volatile storage media are usually much slower than memory operations, and frequent disk I / O operations will increase the system load and power consumption. The access speed of memory is much faster than non-volatile storage media such as hard disks and flash memory. Since the log data needs to be read later to analyze the cause of the abnormality, the business core restores the first log in the non-volatile storage medium to the memory, which can reduce the number of accesses to the non-volatile storage medium and significantly reduce the delay of data access.
[0139] S69: When the first log in the non-volatile storage medium is completely written into the memory, the service core clears the first log in the non-volatile storage medium.
[0140] When the first log in the non-volatile storage medium has been completely written to the memory, the first log in the non-volatile storage medium is the same as the first log in the memory. In order to free up storage space in the non-volatile storage medium, in this case, only the first log in the memory can be retained for subsequent fault cause analysis.
[0141] In an optional implementation, when the service core is reset using the first exemplary reset method, that is, the service core is reset through the security core, and the service core is restored to a normal operating state after the security core performs the reset operation, there is no need to power off and then power on again, and the first log in the memory is not lost, that is, the log exists in both the memory and the non-volatile storage medium area. In this case, the first log in the memory or the non-volatile storage medium can be directly used to locate the cause of the abnormality. See Fig. 9 , Fig. 9 The fifth log storage method flow chart provided in the embodiment of the present application further includes, after steps S61 to S63:
[0142] S70: After the service core is reset to a normal operating state by the security core, the service core clears the first log in the non-volatile storage medium.
[0143] That is, when the first exemplary reset method is adopted, when the business core is reset to a normal operating state by the security core, the first log in the memory is not lost, that is, the log exists in both the memory and the non-volatile storage medium area. In this case, only the first log in the memory can be retained for subsequent fault cause analysis. The first log in the non-volatile storage medium is cleared to ensure that the non-volatile storage medium has sufficient available space.
[0144] In another optional implementation, when the business core is restored to a normal operating state after the security core performs a reset operation, there are logs in both the memory and the non-volatile storage medium area. To ensure the accuracy and security of the logs, the business core can compare the logs in the non-volatile storage medium with the logs in the memory, and if the comparison is inconsistent, the logs in the non-volatile storage medium shall prevail. Fig.10 As shown, Fig.10 The sixth log storage method flow chart provided in the embodiment of the present application further includes, after steps S61 to S63:
[0145] S81. In response to the business core being successfully reset by the security core, the business core compares the first log in the non-volatile storage medium with the log in the memory.
[0146] Before comparison, the business core may pre-process the first logs read from two different sources. The processing may include data format conversion, timestamp alignment, data cleaning, etc., to ensure that the two data sets can be compared in the same way.
[0147] The business core compares the logs in the non-volatile storage medium and the memory one by one. This usually involves comparing key information such as the timestamp, event description, parameter value, etc. of each log. During the comparison process, the security core detects the first log that is inconsistent or conflicting. These inconsistencies may appear as differences in timestamps, mismatches in event descriptions, or changes in parameter values.
[0148] When the comparison result indicates that the first log in the non-volatile storage medium is consistent with the log in the memory, step S82 is executed; when the comparison result indicates that the first log in the non-volatile storage medium is inconsistent with the log in the memory, step S83 is executed.
[0149] S82: When the comparison result indicates that the first log in the non-volatile storage medium is consistent with the log in the memory, the service core clears the first log in the non-volatile storage medium.
[0150] The first log in the non-volatile storage medium is cleared, and only the first log in the memory is retained for subsequent fault cause analysis, ensuring that the non-volatile storage medium has sufficient available space.
[0151] S83: When the comparison result indicates that the first log in the non-volatile storage medium is inconsistent with the log in the memory, the service core clears the log in the memory and writes the first log in the non-volatile storage medium into the memory.
[0152] If it is confirmed that the first log is inconsistent, the business core takes the log in the non-volatile storage medium as the standard, clears the log in the memory, and writes the log in the non-volatile storage medium into the memory for locating the cause of the abnormality.
[0153] In an optional implementation, the business core can immediately trigger an alarm mechanism when it detects that the log in the non-volatile storage medium is inconsistent with the log in the memory. An alarm message can be sent to the system administrator or a designated security team to notify them of the inconsistency of the dumped log. The alarm message can include the specific content, location, timestamp, etc. of the inconsistency so that the administrator can quickly locate and resolve the problem.
[0154] At the same time, the business core can also record the inconsistency event of this comparison. The business core saves the inconsistency log, comparison results and related information of the triggered alarm in the non-volatile storage medium to the memory. As a result, the system administrator or security team can conduct detailed review and analysis later to understand the cause and impact of the inconsistency.
[0155] In an optional implementation, the business core can further compare and verify the first log in the non-volatile medium with the log in the memory. That is, without clearing the log in the memory, the first log in the non-volatile medium is written into the memory, and the logs from the two storage media are placed in different storage areas and compared to eliminate possible reading errors or data corruption problems. If the verification result still shows inconsistency, the business core can perform a detailed analysis of the inconsistent part.
[0156] The business core can query key information such as the timestamp, event description, parameter value, etc. of each inconsistent log. By comparing the logs from the two storage media, the business core can preliminarily determine the nature and possible causes of the inconsistency, such as data transmission errors, storage medium failures, or malicious tampering.
[0157] In order to verify the cause of the inconsistency, the business core can use preset technical means. For example, the business core can use a hash algorithm to verify the logs written in the non-volatile storage medium to confirm whether the data has been tampered with during transmission or storage. In addition, the security core can also use digital signature technology to verify the integrity and authenticity of the data.
[0158] In addition to technical means, the business core can also combine the system's context information and business logic for comprehensive analysis. For example, it can view other related logs of the business core during the time period to understand the BMC's operating status and event sequence, and further infer the possible source and impact of inconsistent logs.
[0159] Based on the results of the analysis and verification in the above process, the security core can formulate corresponding treatment measures. If it is confirmed that the inconsistency is caused by system failure or data transmission error, then the corresponding repair measures can be taken; if malicious tampering or attack is suspected, then the corresponding security measures can be taken to protect the security of the system.
[0160] See also Fig.11 ,Should Fig.11 This is a flow chart of the seventh log storage method provided in an embodiment of the present application. The following describes the contents of each part of the figure:
[0161] The business core is mainly responsible for the management functions of the BMC and the interaction with the server hardware devices, such as monitoring the server status, executing management commands, etc. As shown in the figure "1. The business core generates logs during normal operation", the business core executes tasks and continuously generates logs and writes them into the memory during operation. Exemplarily, the memory can be DDR (Double Data Rate), which is a high-speed dynamic random access memory used to store data generated during system operation, including logs generated by the business core. In the figure, DDR is used as a temporary storage medium to store the logs generated by the business core.
[0162] The business core watchdog in the figure refers to the watchdog used to monitor the working status of the business core. If the business core does not send a signal to the business core watchdog within the specified time, the business core watchdog will trigger a timeout interrupt and send interrupt signals to the security core and the business core at the same time, that is, "2. Watchdog timeout interrupt" in the figure. In actual application, this interrupt signal may be shielded by the business core in an abnormal operating state.
[0163] When the business core watchdog times out and sends an interrupt signal to the security core, the security core responds to the interrupt signal and then dumps the first log in the DDR, as shown in the figure "3. Write the first log in the memory to the non-volatile storage medium", and writes the first log in the volatile storage medium to the non-volatile storage medium to ensure the persistence of the data. The non-volatile storage medium can be EMMC.
[0164] After the dump is completed, the security core can try to reset the business core. If the reset is unsuccessful, execute "4. After the security core reset fails, start the business core by powering on and off" in the figure, that is, it is necessary to restart the BMC by powering on and off to restart the business core and restore it to normal operation. The business core executes "5. Determine whether there is a power-on mark in the BMC and the non-volatile storage medium has the first log, and write the first log in the non-volatile storage medium to the memory" in the figure. The business core determines whether there is a power-on mark in the BMC and the non-volatile storage medium has the first log, and the business core writes the first log in the non-volatile storage medium to the memory.
[0165] Therefore, the embodiments of the present application have the following beneficial effects:
[0166] In the BMC multi-core heterogeneous system, the security core is responsible for saving the first log in the business core memory to the non-volatile storage medium when an abnormal interrupt occurs. Even if the business core reset fails, the system loses power or restarts, the first log will not be lost. After the system restarts, the first log can be restored from the non-volatile storage medium and loaded into the memory. By analyzing the restored first log, the cause of the abnormal interrupt event can be found and corresponding processing measures can be taken. This method helps to improve the stability and reliability of the system, and also helps to reduce the risk of data loss due to system failures.
[0167] Based on the methods introduced in the above embodiments, the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the methods in the above embodiments.
[0168] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product, characterized in that when the computer program product runs on a processor, the processor executes the method in the above embodiment.
[0169] Based on the method in the above embodiment, the embodiment of the present application provides a computing device, which includes a motherboard and a chip. Among them, the chip is integrated on the motherboard, and the chip includes at least one memory for storing programs; at least one processor for executing the program stored in the memory, and when the program stored in the memory is executed, the processor is used to execute the method in the above embodiment. In the embodiment of the present application, the computing device can be a network device such as a server and a host. The chip can be a BMC, a chip storing BIOS, etc. In the embodiment of the present application, the type of computing device and the type of chip are not limited.
[0170] It should be noted that in other embodiments, BMC has different names in different computing devices. For example, the BMC of Huawei servers and Super Fusion servers is called iBMC, the BMC of HPE servers is called iLO, and the BMC of DELL servers is called iDRAC.
[0171] Based on the method in the above embodiment, the present application embodiment also provides a chip. Fig.12 , Fig.12 This is a schematic diagram of the structure of a chip provided in an embodiment of the present application. Fig.12 As shown, the chip 1100 includes one or more processors 1101, an interface circuit 1102, and a memory 1103. The processor 1101 may also include a business core and a security core. The memory may include a memory and a non-volatile storage medium. The processor 1101, the interface circuit 1102, and the memory 1103 may be connected via a bus or other means.
[0172] The processor 1101 may be an integrated circuit chip having signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 1101 or by instructions in the form of software. The above processor 1101 may be a general-purpose processor, a digital communicator (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The disclosed methods and steps in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0173] The interface circuit 1102 can be used to send or receive data, instructions or information. The processor 1101 can use the data, instructions or other information received by the interface circuit 1102 to process, and can send the processing completion information through the interface circuit 1102.
[0174] It should be noted that the corresponding functions of the processor 1101 and the interface circuit 1102 can be implemented through hardware design, software design, or a combination of hardware and software, and there is no limitation here.
[0175] It is understandable that the size of the sequence number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. In addition, in some possible implementations, each step in the above embodiment can be selectively executed according to actual conditions, and can be partially executed or fully executed, which is not limited here.
[0176] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)), etc.
[0177] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0178] The above description is merely an exemplary embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. A log storage method, characterized in that: Applied to a baseboard management controller BMC, the BMC includes a business core, a security core, a memory and a non-volatile storage medium, the method includes: Acquiring the operating status of the service core during the security verification; When the business core is in an abnormal operation state, the security core writes the first log in the memory to the non-volatile storage medium; When the business core resumes normal operation, the business core writes a first log in the non-volatile storage medium into the memory; the first log is a log generated by the business core in normal operation and written into the memory.
2. The method according to claim 1, characterized in that The BMC also includes an abnormal interrupt module, and the operation status of the service core is obtained during the security verification, including: During the security verification, a signal sent by an abnormal interruption module is obtained, and the abnormal interruption module is used to determine whether the service core is in an abnormal operation state, and when it is determined that the service core is in an abnormal operation state, an interruption signal is sent to the security core; When the business core is in an abnormal operation state, the security core writes the first log in the memory to the non-volatile storage medium, including: When the security core receives an interrupt signal sent by the abnormal interrupt module, the security core writes the first log in the memory into the non-volatile storage medium.
3. The method according to claim 1, characterized in that The service core is restored to a normal operating state including: The service core is restored to a normal operating state by powering off and then powering on again.
4. The method according to claim 1, characterized in that: The service core is restored to a normal operating state including: The security core performs a reset operation on the service core, where the reset operation is used to reset the operating state of the service core.
5. The method according to claim 4, characterized in that The method further comprises: In the case that the service core is not restored to a normal operating state by the reset operation of the security core, the service core is restored to a normal operating state by powering off and then powering on again.
6. The method according to claim 4, characterized in that When the security core performs a reset operation on the service core and the service core recovers to a normal operating state, the service core writes the first log in the non-volatile storage medium into the memory, including: The service core compares the first log in the non-volatile storage medium with the log in the memory; When the comparison result indicates that the first log in the non-volatile storage medium is inconsistent with the log in the memory, the service core clears the log in the memory and writes the first log in the non-volatile storage medium into the memory.
7. The method according to any one of claims 1 to 5, characterized in that: The service core writes the first log in the non-volatile storage medium into the memory, including: The business core detects whether the first log in the non-volatile storage medium meets a preset validity condition and / or a preset integrity condition; In response to the first log in the non-volatile storage medium meeting a preset validity condition and / or a preset integrity condition, the first log in the non-volatile storage medium is written into the memory.
8. The method according to any one of claims 1 to 6, characterized in that: After the service core writes the first log in the non-volatile storage medium into the memory, the method further includes: When the first log in the non-volatile storage medium is completely written into the memory, the service core clears the first log in the non-volatile storage medium.
9. A BMC, characterized in that: The BMC includes a processor and a memory, the memory is used to store a computer program, and the processor is used to execute the computer program to implement the log storage method according to any one of claims 1 to 8.
10. A computing device, characterized in that The computing device includes a processor, a memory and a BMC, and the BMC is used to execute the log storage method according to any one of claims 1 to 8.
