BMC fault recording method and device, computer equipment and storage medium
By recording fault logs and saving them to a memory technology device partition when the BMC operating system kernel crashes, the problem of difficulty in preserving fault information after a kernel crash is solved, enabling efficient fault diagnosis and repair and improving maintenance efficiency.
Patent Information
- Application Number
- CN202511072745.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-11-18
AI Technical Summary
In existing technologies, when the kernel of the BMC operating system crashes, it is difficult to retain fault log information, which makes it impossible for maintenance personnel to know the fault point and cause in time. Reproducing and troubleshooting the problem is time-consuming and laborious, and existing solutions such as the Kdump mechanism consume system resources and affect performance.
A method for recording BMC faults is provided, which generates a fault log file by printing fault log information, transmitting it to a circular fault buffer and saving it to a pre-configured memory technology device partition, and using a first index and a second index to distinguish cached log data, thereby forming a stable fault log file.
It enables timely recording and saving of fault logs, allowing maintenance personnel to understand the fault location and cause immediately, improving the efficiency of fault diagnosis and repair, and does not consume BMC resources, making it suitable for different BMC systems.
Smart Images

Figure CN120973571A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, specifically to a BMC fault recording method, apparatus, computer equipment, and storage medium. Background Technology
[0002] With the rapid development of internet and cloud computing technologies, the demand for servers is constantly increasing. As the number of servers grows, the need for remote server management also rises. Remote server management, as the name suggests, means that engineers do not need to directly operate the server; instead, operations are completed through a remote management client on the BMC (Baseboard Management Controller). During remote server management, BMC malfunctions are not uncommon, making fault diagnosis of the BMC itself an important task in server maintenance.
[0003] Currently, BMC primarily uses Linux as its operating system. As a software system, Linux inevitably encounters various problems during practical applications. Some serious problems can even lead to system crashes. Kernel crashes are among the most serious errors in Linux systems, typically causing the system to completely stop responding.
[0004] Kernel crashes can have a variety of causes, such as memory management errors, synchronization and concurrency issues, hardware or driver failures, and kernel code logic errors. Currently, when a kernel crash occurs, the operating system is typically rebooted. Although crash logs can be printed when a debug serial port is available, this port is not visible when the product is not in a debugging phase (e.g., at a customer's site), making it impossible to directly pinpoint the fault location and cause. Troubleshooting and resolving kernel crashes usually requires maintenance personnel to spend considerable time and effort reproducing and troubleshooting the problem. Summary of the Invention
[0005] In view of this, one or more embodiments of this disclosure provide a BMC fault recording method, apparatus, computer equipment and storage medium, which can effectively record fault logs, making it convenient for maintenance personnel to know the fault location and fault cause in a timely and accurate manner, and efficiently complete BMC fault diagnosis and repair.
[0006] This disclosure provides a BMC fault logging method, the method comprising: printing fault log information in response to a kernel failure of a target operating system in a target BMC; acquiring a pre-configured memory technology device partition; transmitting the fault log information to a circular fault buffer to form cached log data, the circular fault buffer including a first index and a second index, the first index being used to mark the start position of the cached log data and the second index being used to mark the end position of the cached log data; saving the cached log data to the memory technology device partition to generate a fault log file; and reading and outputting the fault log file of the memory technology device partition in response to a user read instruction.
[0007] This disclosure also provides a BMC fault recording device, the device comprising: a fault information generation unit, configured to print fault log information in response to a kernel failure of the target operating system of the target BMC; a storage device determination unit, configured to acquire a pre-configured memory technology device partition; a fault information caching unit, configured to transmit the fault log information to a circular fault cache to form cached log data, the circular fault cache including a first index and a second index, the first index being used to mark the start position of the cached log data and the second index being used to mark the end position of the cached log data; a log file generation unit, configured to save the cached log data to the memory technology device partition to generate a fault log file; and a log file output unit, configured to read and output the fault log file of the memory technology device partition in response to a user read instruction.
[0008] This disclosure also provides a computer device including a memory and a processor, the memory being used to store a computer program that, when executed by the processor, implements the BMC fault recording method described above.
[0009] This disclosure also provides a computer-readable storage medium for storing a computer program that, when executed by a processor, implements the above-described BMC fault recording method.
[0010] This disclosure provides a technical solution through one or more embodiments. When the kernel of the target operating system fails, fault log information can be printed in a timely manner, recording information such as the fault node and the cause of the fault. Transmitting the fault log information to a circular fault buffer can effectively retain a certain length of cached log data and avoid information redundancy. The design of the first and second indexes facilitates the differentiation of each cached log data and also facilitates the subsequent transfer of cached log data. Utilizing pre-configured memory technology device partitioning, cached log data can be uniformly retained to form a stable fault log file.
[0011] The technical solutions provided by one or more embodiments of this disclosure can effectively record fault logs, solve the problem of message timeliness, and enable maintenance personnel to know the fault point and the cause of the problem as soon as possible based on the fault log file. Maintenance personnel do not need to rebuild the environment and reproduce and troubleshoot the problem, thus improving the efficiency of problem solving.
[0012] The technical solutions provided by one or more embodiments of this disclosure do not rely on external hardware (serial cable, etc.), do not occupy the running memory of BMC, and do not increase the CPU load of BMC. They can achieve real-time monitoring of BMC operating system faults and save the fault scene in a timely manner when the kernel crashes. Attached Figure Description
[0013] The features and advantages of the embodiments of this disclosure will be more clearly understood by referring to the accompanying drawings, which are illustrative and should not be construed as limiting the present disclosure in any way. In the drawings:
[0014] Figure 1 A schematic diagram of the steps of a BMC fault recording method in one embodiment of this disclosure is shown;
[0015] Figure 2 A schematic diagram of a ring-shaped fault buffer area is shown in one embodiment of this disclosure;
[0016] Figure 3 This illustration shows a flowchart of the process for forming cached log data in one embodiment of the present disclosure;
[0017] Figure 4 This invention illustrates a flowchart of a user reading a fault log file in one embodiment of the present disclosure.
[0018] Figure 5 A flowchart illustrating a BMC fault recording method in one embodiment of this disclosure is shown;
[0019] Figure 6 A schematic diagram of the functional modules of a BMC fault recording device in one embodiment of this disclosure is shown;
[0020] Figure 7 A schematic diagram of the structure of a computer device according to one embodiment of the present disclosure is shown. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0022] In related technologies, operating system kernel fault diagnosis mainly relies on manual analysis. When problems occur outside the debugging phase, it typically involves a tedious process of reproducing and troubleshooting, including inquiring about the scenario, setting up the problematic machine environment, flashing the problematic version of the code, reproducing the problem, analyzing the exception stack, deducing disassembly parameters, analyzing source code, speculating on the cause of the fault, injecting and reproducing the fault, and testing and verifying the solution. Furthermore, kernel faults are numerous and diverse, and some problems even occur only occasionally, further increasing the difficulty of troubleshooting.
[0023] In related technologies, because it's difficult to retain on-site logs when kernel problems occur, maintenance personnel cannot immediately identify the fault location, let alone the cause. Therefore, maintenance personnel typically build an environment in a debugging setting based on the operational scenario to reproduce and troubleshoot the problem. This not only requires extensive professional knowledge from maintenance personnel but also involves a lengthy analysis cycle, making it a rather inconvenient and reactive approach. Furthermore, the environment built later often differs from the actual problem environment, and may not fully reproduce the problem, making it difficult to resolve. This process also easily leads to duplicate analysis, significantly impacting problem-solving efficiency.
[0024] In related technologies, serial port connection technology can be used for on-site debugging to obtain real-time information on kernel crash issues. However, this is generally only possible in a laboratory environment. For problems that cannot be reproduced in a laboratory environment, on-site visits are necessary, which limits the applicability of this solution.
[0025] In related technologies, a kernel crash dump (Kdump) scheme is employed. When a kernel anomaly occurs, a backup kernel image can be used to promptly save the operating system's memory for diagnosis and analysis. The Kdump mechanism stores all memory and register information of the operating system into a single file when a kernel failure occurs. This file can be analyzed and retrieved later. Kdump uses fast boot system technology to easily guide a backup kernel (the capture kernel) to process the memory contents of the current kernel (the kernel experiencing the crash) and save the current kernel's memory contents to a file.
[0026] However, the Kdump mechanism requires complex pre-configuration steps such as reserving memory and configuring boot files. Furthermore, the Kdump mechanism also consumes a certain amount of system memory and Central Processing Unit (CPU) resources, leading to reduced available memory, increased CPU load, and increased disk I / O load, thus impacting the overall performance of the operating system.
[0027] In view of this, the BMC fault recording method provided in one embodiment of the present disclosure can effectively record fault logs, solve the problem of message timeliness, and enable maintenance personnel to know the fault point and the cause of the problem as soon as possible based on the fault log file, and efficiently complete BMC fault diagnosis and repair.
[0028] Please see Figure 1 The present disclosure provides a BMC fault recording method according to one embodiment, which may include the following multiple steps.
[0029] S1: In response to a kernel failure in the target operating system of the target BMC, print fault log information.
[0030] In this implementation, the target operating system is typically Linux, but depending on the application scenario, it can be extended to an embedded real-time operating system (RTOS) or some vendor-specific systems. Kernel crashes are among the most serious errors in a target operating system, often causing the system to completely stop responding. Therefore, when the kernel of the target operating system fails, fault log information can be printed promptly, recording the fault node, cause, and other information. Timely retention of fault log information facilitates efficient BMC fault diagnosis and repair by maintenance personnel later on.
[0031] In some implementations, fault log information may include, but is not limited to, fault cause information, register information, and call stack information. Fault cause information may represent the direct exception that triggered the kernel crash, such as a null pointer exception, page fault, or assertion failure; register information may represent a snapshot of the registers at the time of the kernel crash; and call stack information may represent the function call chain from the point of exception to the program entry point, recording the call paths between functions, which is helpful for quickly locating the problematic line of code.
[0032] In some implementations, the step of printing fault log information in response to a kernel failure in the target operating system of the target BMC includes: disabling local interrupts of the processor of the target operating system in response to a kernel failure in the target operating system; acquiring a console lock; and printing the fault log information based on the console lock.
[0033] Specifically, disabling local interrupts on the target operating system's processor (such as local APIC IRQs, I / OAPIC IRQs, timer interrupts, etc.) prevents interrupts from disrupting the subsequent processing of fault log information, ensuring that the fault log file is not preempted by local interrupts before its generation. Locking based on console locks ensures that the fault log information can be printed completely without being affected by other printing tasks.
[0034] In some implementations, the fault log information is sent to a kernel dump tool so that the kernel dump tool can back up the fault log information.
[0035] Specifically, when the target BMC has sufficient memory and CPU resources, backing up the fault log information using a kernel dump tool (such as Kdump) reduces the risk of losing the fault log information. It is important to emphasize that backing up the fault log information using a kernel dump tool is an optional, not mandatory, step.
[0036] S2: Obtain the pre-configured memory technology device partition.
[0037] In this embodiment, the Memory Technology Device (MTD) is a usable component in the operating system kernel that can support various types of flash memory storage devices (such as NAND, NOR flash, EEPROM, and other non-volatile memory). The MTD can be partitioned, meaning a new MTD partition can be planned specifically for storing subsequent fault log files. The flexible partitioning configuration of the memory technology device makes the overall method widely applicable and can be effectively extended to different BMCs.
[0038] S3: Transmit the fault log information to a circular fault buffer to form cached log data. The circular fault buffer includes a first index and a second index. The first index is used to mark the starting position of the cached log data, and the second index is used to mark the ending position of the cached log data.
[0039] In this embodiment, the circular fault buffer is a fixed-size, logically contiguous memory area used to temporarily store data streams in a first-in, first-out (FIFO) manner. Transmitting fault log information to the circular fault buffer effectively retains a certain length of cached log data, avoiding information redundancy. The design of the first and second indexes facilitates the differentiation of each cached log data set and also facilitates the subsequent transfer of cached log data.
[0040] Please see Figure 2In a practical application example, fault log information can be transmitted to a circular fault buffer named "log_buf". The first index can be denoted as "log_first_idx", marking the beginning of a segment of cached log data. The second index can be denoted as "log_next_idx", marking the end of a segment of cached log data, or the beginning of the next segment of cached log data.
[0041] In some implementations, transmitting the fault log information to a circular fault buffer to form cached log data includes: determining the second index based on the fault log information; obtaining the upper limit of the cache capacity of the circular fault buffer; determining the first index and the cache data length based on the comparison result between the second index and the upper limit of the cache capacity; determining a target buffer in the circular fault buffer based on the first index and the cache data length; and transmitting the fault log information to the target buffer to form the cached log data.
[0042] Optionally, if the second index is not greater than the upper limit of the cache capacity, then the first index is determined to be zero, and the length of the cached data is determined to be the second index.
[0043] Optionally, if the second index is greater than the cache capacity limit, then the first index is determined to be the difference between the second index and the cache capacity limit, and the cache data length is determined to be the cache capacity limit.
[0044] Since the second index marks the end position of the cached log data, it reflects the total length of the fault log information. If the second index is not greater than the cache capacity limit, it means the circular fault cache can completely cache the fault log information. In this case, the first index can be set to zero, and the cached data length can be determined to be the second index. Based on this, the resulting target cache can completely record the fault log information, ensuring data integrity. If the second index is greater than the cache capacity limit, it means the circular fault cache cannot completely cache the fault log information, and the earliest cached fault log information will be overwritten to some extent. In this case, the first index can be determined as the difference between the second index and the cache capacity limit, and the cached data length can be determined to be the cache capacity limit. Based on this, the resulting target cache can record the latest data fragments of the fault log information to the greatest extent, ensuring data reliability.
[0045] Please see Figure 3 In a practical application example, "log_next_idx" is the second index, "CRASHLOGSIZE" is the upper limit of the cache capacity, "log_start_idx" is the first index, "len" is the length of the cached data, and "logbuffer" is the target cache area. Figure 3 The data processing flow of the above method is clearly demonstrated.
[0046] S4: Save the cached log data to the memory technology device partition to generate a fault log file.
[0047] In this embodiment, by utilizing pre-configured memory technology device partitions, cached log data can be uniformly retained to form stable fault log files. The memory technology device partitions can retain multiple fault log files, and can retain fault log files for a specific period, facilitating fault traceability and statistical analysis.
[0048] In some implementations, after generating the fault log file, a preset delay function can be used to delay the restart of the target operating system. Once it is confirmed that the fault log file is securely stored in the memory technology device partition, the target operating system is restarted after a certain period of time, allowing the target operating system to quickly recover its working state and ensuring the stable operation of the target BMC.
[0049] S5: In response to a user read command, read and output the fault log file of the memory technology device partition.
[0050] In this implementation, users (typically operations and maintenance personnel) can log in to the BMC via its client and issue commands to collect fault log files. After locating the BMC's memory technology device partition, users can choose to download all fault log files in one click; alternatively, they can send selection commands to selectively download only the required fault log files. Subsequently, users can analyze the downloaded fault log files to perform fault diagnosis and repair.
[0051] Please see Figure 4 In a practical application example, during the operation of the BMC, the user can log in to the BMC using a client such as a web browser. The user then selects a one-click log collection option. The BMC will automatically access the memory technology device partition, retrieve the fault log file, and download it to the user-defined file download area. Based on the downloaded fault log file, the user can analyze and process it to complete fault diagnosis and repair work for the BMC operating system.
[0052] Please see Figure 5 The present disclosure provides a BMC fault recording method according to one embodiment, which may include the following process.
[0053] An abnormal operation of the operating system (such as Linux) kernel causes the system to crash, triggering a troubleshooting process.
[0054] Local interrupts can be disabled, for example, by using the local_irq_disable function.
[0055] Acquire the console lock.
[0056] Print fault log information, including fault cause information, register information, and call stack information.
[0057] Call the fault notification interface function, such as panic notifier, to notify the subsequent processing flow to be executed automatically.
[0058] Based on the user's pre-configuration, determine whether to back up the fault log information using a kernel dump tool (such as Kdump).
[0059] The next step is to convert the fault log information into a fault log file, which corresponds to steps S2 to S4 above. Specifically, this includes: finding the currently configured memory technology device partition, where the data in the ring fault buffer will be written later; obtaining the fault log information and writing it to the target cache area of the ring fault buffer according to its maximum cache capacity; initializing the portion of the memory technology device partition that will be used, and writing the cached log data in the target cache area to the memory technology device partition through an interface function; and releasing the relevant memory of the ring fault buffer area (target cache area).
[0060] Once the BMC is started, you can log in to the BMC to download and process the fault log files.
[0061] It should be noted that BMC generally adopts a dual-image redundancy scheme. Even if the current operating system image fails to run, it will switch to the backup operating system image to ensure that BMC can start and enable users to collect fault log files.
[0062] In existing technologies, due to the lack of a processing step to convert fault log information into fault log files, if the operating system experiences a kernel crash, the fault log information cannot be preserved. This makes it difficult for maintenance personnel to effectively obtain on-site information later, increasing the difficulty of fault location and diagnosis. Using the method and process provided in this embodiment, the fault scene information of the operating system can be effectively saved, improving the real-time performance and effectiveness of fault diagnosis. This disclosed technical solution has a wide range of applications, minimal impact on the operation of the BMC operating system, and can achieve lossless insertion.
[0063] This disclosure provides a technical solution through one or more embodiments. When the kernel of the target operating system fails, fault log information can be printed in a timely manner, recording information such as the fault node and the cause of the fault. Transmitting the fault log information to a circular fault buffer can effectively retain a certain length of cached log data and avoid information redundancy. The design of the first and second indexes facilitates the differentiation of each cached log data and also facilitates the subsequent transfer of cached log data. Utilizing pre-configured memory technology device partitioning, cached log data can be uniformly retained to form a stable fault log file.
[0064] The technical solutions provided by one or more embodiments of this disclosure can effectively record fault logs, solve the problem of message timeliness, and enable maintenance personnel to know the fault point and the cause of the problem as soon as possible based on the fault log file. Maintenance personnel do not need to rebuild the environment and reproduce and troubleshoot the problem, thus improving the efficiency of problem solving.
[0065] The technical solutions provided by one or more embodiments of this disclosure do not rely on external hardware (serial cable, etc.), do not occupy the running memory of BMC, and do not increase the CPU load of BMC. They can achieve real-time monitoring of BMC operating system faults and save the fault scene in a timely manner when the kernel crashes.
[0066] Please see Figure 6 This disclosure also provides a BMC fault recording device, the device comprising:
[0067] The fault information generation unit 100 is used to print fault log information in response to a kernel failure of the target operating system of the target BMC.
[0068] Storage device determination unit 200 is used to obtain a pre-configured memory technology device partition;
[0069] The fault information caching unit 300 is used to transmit the fault log information to a circular fault cache area to form cached log data. The circular fault cache area includes a first index and a second index. The first index is used to mark the starting position of the cached log data, and the second index is used to mark the ending position of the cached log data.
[0070] The log file generation unit 400 is used to save the cached log data to the memory technology device partition and generate a fault log file;
[0071] The log file output unit 500 is used to read and output the fault log file of the memory technology device partition in response to a user read command.
[0072] In one implementation, the fault log information includes at least one of fault cause information, register information, and call stack information.
[0073] In one embodiment, the fault information caching unit 300 is specifically used for: determining the second index based on the fault log information; obtaining the upper limit of the cache capacity of the circular fault cache area; determining the first index and the cache data length based on the comparison result between the second index and the upper limit of the cache capacity; determining a target cache area in the circular fault cache area based on the first index and the cache data length; and transmitting the fault log information to the target cache area to form the cache log data.
[0074] In one embodiment, determining the first index and the cache data length based on the comparison result between the second index and the cache capacity limit includes: if the second index is not greater than the cache capacity limit, then determining the first index to be zero, and determining the cache data length to be the second index.
[0075] In one embodiment, determining the first index and the cache data length based on the comparison result of the second index and the cache capacity limit includes: if the second index is greater than the cache capacity limit, then determining the first index as the difference between the second index and the cache capacity limit, and determining the cache data length as the cache capacity limit.
[0076] In one embodiment, the fault information generation unit 100 is specifically used to: in response to a fault in the kernel of the target operating system, disable the local interrupts of the processor of the target operating system; acquire a console lock, and print the fault log information based on the console lock.
[0077] In one embodiment, the BMC fault recording device further includes a fault information backup unit. This fault information backup unit is used to send the fault log information to a kernel dump tool, so that the kernel dump tool backs up the fault log information.
[0078] In one embodiment, the BMC fault recording device further includes a system restart unit. This system restart unit is used to delay restarting the target operating system using a preset delay function.
[0079] The various units described in the above embodiments can be implemented by a computer chip or by a product with a certain function. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0080] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0081] Please see Figure 7 This disclosure also provides a computer device, which includes a memory and a processor. The memory is used to store a computer program, and when the computer program is executed by the processor, it implements the above-described BMC fault recording method.
[0082] This disclosure also provides a computer-readable storage medium for storing a computer program that, when executed by a processor, implements the above-described BMC fault recording method.
[0083] The processor can be a central processing unit (CPU). It can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations thereof.
[0084] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor executes various functional applications and data processing by running the non-transitory software programs, instructions, and modules stored in the memory, thereby implementing the methods in the above-described embodiments.
[0085] The memory may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor, etc. Furthermore, the memory may include high-speed random access memory and non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0086] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium can also include combinations of the above types of memory.
[0087] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, embodiments of apparatus, devices, and storage media are basically similar to method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0088] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
[0089] Although embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A BMC fault recording method, characterized in that, The method includes: In response to a kernel failure in the target operating system of the target BMC, print fault log information; Obtain the pre-configured memory technology device partition; The fault log information is transmitted to a circular fault buffer to form cached log data. The circular fault buffer includes a first index and a second index. The first index is used to mark the starting position of the cached log data, and the second index is used to mark the ending position of the cached log data. The cached log data is saved to the memory technology device partition to generate a fault log file; In response to a user read command, the fault log file of the memory technology device partition is read and output.
2. The method according to claim 1, characterized in that, The fault log information includes at least one of the following: fault cause information, register information, and call stack information.
3. The method according to claim 1 or 2, characterized in that, The step of transmitting the fault log information to a circular fault buffer to form cached log data includes: The second index is determined based on the fault log information; Obtain the maximum cache capacity of the ring fault buffer; Based on the comparison result between the second index and the upper limit of the cache capacity, the first index and the length of the cache data are determined; Based on the first index and the cache data length, a target cache area is determined in the circular fault cache area; The fault log information is transmitted to the target cache area to form the cache log data.
4. The method according to claim 3, characterized in that, The step of determining the first index and the cache data length based on the comparison result between the second index and the cache capacity limit includes: If the second index is not greater than the upper limit of the cache capacity, then the first index is determined to be zero, and the length of the cached data is determined to be the second index.
5. The method according to claim 3, characterized in that, The step of determining the first index and the cache data length based on the comparison result between the second index and the cache capacity limit includes: If the second index is greater than the cache capacity limit, then the first index is determined to be the difference between the second index and the cache capacity limit, and the cache data length is determined to be the cache capacity limit.
6. The method according to claim 1, characterized in that, The response to a kernel failure in the target operating system of the target BMC, printing fault log information, includes: In response to a kernel failure in the target operating system, local interrupts of the target operating system's processor are disabled; Acquire the console lock, and based on the console lock, print the fault log information.
7. The method according to claim 1, characterized in that, After saving the cached log data to the memory technology device partition and generating a fault log file, the method further includes: The target operating system is restarted by using a preset delay function.
8. A BMC fault recording device, characterized in that, The device includes: The fault information generation unit is used to print fault log information in response to a kernel failure of the target operating system in the target BMC. Storage device determination unit, used to obtain pre-configured memory technology device partitions; A fault information caching unit is used to transmit the fault log information to a circular fault cache area to form cached log data. The circular fault cache area includes a first index and a second index. The first index is used to mark the starting position of the cached log data, and the second index is used to mark the ending position of the cached log data. The log file generation unit is used to save the cached log data to the memory technology device partition and generate a fault log file; The log file output unit is used to read and output the fault log file of the memory technology device partition in response to a user read command.
9. A computer device, characterized in that, The computer device includes a memory and a processor, the memory being used to store a computer program that, when executed by the processor, implements the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 7.
Citation Information
Cited By
Fault analysis method and electronic equipment
CN121597473A
Fault analysis method and electronic device
CN121597473B
Embedded recording method and system for dual-period data before and after failure of fan master control system
CN121785961A