Server abnormal log management method based on CPLD (Complex Programmable Logic Device)

By using CPLD to monitor and store serial port logs in the server, the problems of insufficient real-time performance of the server exception log management solution and excessive BMC resource overhead in the existing technology are solved, and the accurate capture and efficient storage of exception logs are achieved, which improves the server operation efficiency and maintenance capabilities.

CN120216309AActive Publication Date: 2025-06-27联想长风科技(北京)有限公司
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510276629.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-06-27
Estimated Expiration
2045-03-10

AI Technical Summary

Technical Problem

The existing server exception log management solution has problems such as insufficient real-time and excessive BMC resource overhead, which may result in the possible loss of abnormal information, affecting the fault location and repair efficiency.

Method used

Using CPLD-based server exception log management method, the server serial log is monitored and stored through CPLD to improve real-time, ensure complete recording of exception logs, and reduce the resource usage of BMC.

Benefits of technology

It realizes accurate capture and efficient storage of server exception logs, improves the overall operation efficiency and maintenance capabilities of the server, and ensures the integrity of exception information and the optimized use of BMC resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216309A_ABST
    Figure CN120216309A_ABST
Patent Text Reader

Abstract

The invention provides a CPLD (Complex Programmable Logic Device)-based server abnormal log management method, which relates to the technical field of computer servers and comprises the following steps: a server CPU (Central Processing Unit) generates logs in real time and transmits the logs to a BMC (Baseboard Management Controller) through a CPLD; the CPLD mirroring the log and analyzing abnormity, and outputting a service abnormity log; the CPLD stores the log into an EEP ROM; after a BMC access request is received, the CPLD switches the EEPROM permission to the BMC; after the BMC access is finished, sending a termination instruction to the CPLD; and the CPLD recovers the access authority of the BMC to the The technical problems that in the prior art, due to the fact that a server exception log storage method is insufficient in real-time performance, exception information is prone to being lost, BMC resource expenditure is too large, and the operation efficiency of a server is affected are solved, and the technical effects that the server serial port logs are monitored and stored through CP LD, BMC expenditure is reduced, and the operation efficiency of the server is improved are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer servers, and particularly to a method for managing server exception logs based on CPLD. Background Art

[0002] With the continuous expansion of server application scenarios and the growth of business requirements, the stability of servers has become particularly important. During operation, a server may encounter abnormal situations due to hardware failures, software exceptions, or external environmental impacts. To improve the maintainability of servers and the efficiency of fault diagnosis, the recording and management of server exception logs are crucial.

[0003] Server exception logs usually occur only at the moment when the server encounters an exception. If the administrator fails to view them in real time or the logs fail to be stored in a timely manner, key exception information may be lost, thus affecting the efficiency of fault location and repair. Therefore, server products generally adopt various measures to save exception logs for analysis and diagnosis after a fault occurs.

[0004] However, existing server exception log management solutions have certain limitations. For example, some solutions rely on the BMC (Baseboard Management Controller) to monitor the server CPU logs in real time. However, the resources of the BMC itself are limited, and continuous high-frequency collection and storage of logs will occupy a large amount of system resources, affecting the normal operation of the server. In addition, the real-time performance of log storage in some solutions is insufficient, which may result in some key exception information not being recorded, affecting the traceability and analysis of problems.

[0005] To address the above problems, the present invention proposes a method for managing server exception logs based on CPLD (Complex Programmable Logic Device). By utilizing the high real-time performance and low resource overhead characteristics of CPLD, accurate capture and efficient storage of server exception logs are achieved, while reducing the resource occupancy of the BMC and improving the overall operation efficiency and maintenance ability of the server. Summary of the Invention

[0006] The present application provides a method for managing server exception logs based on CPLD, which is used to solve the technical problems in the prior art that the real-time performance of the server exception log saving method is insufficient, resulting in easy loss of exception information and excessive resource overhead of the BMC, thereby affecting the operation efficiency of the server. The technical effect of realizing CPLD monitoring and storing server serial port logs, improving real-time performance, ensuring complete recording of exception logs, while reducing BMC overhead and improving the operation efficiency of the server is achieved.

[0007] In view of the above problems, the present application provides a method for managing server exception logs based on CPLD. The method includes: the server CPU generates server logs in real time and transmits the server logs to the BMC through the CPLD in a transparent manner; the CPLD synchronously mirrors the copy data of the server logs and outputs service exception logs by performing exception analysis on the copy data; the CPLD stores the service exception logs in the EEPROM; after receiving the exception log access request instruction sent by the BMC, the CPLD switches the access permission of the EEPROM to the BMC; after the BMC finishes accessing the EEPROM, it sends an exception log access termination instruction to the CPLD; after receiving the exception log access termination instruction sent by the BMC, the CPLD recovers the access permission of the BMC to the EEPROM.

[0008] One or more technical solutions provided in the present application have at least the following technical effects or advantages:

[0009] A method for managing server exception logs based on CPLD provided in the present application relates to the technical field of computer servers, and solves the technical problems that in the prior art, the real-time performance of the server exception log saving method is insufficient, resulting in easy loss of exception information and excessive resource overhead of the BMC, thus affecting the operation efficiency of the server. It realizes the technical effect of the CPLD monitoring and storing the server serial port logs, improving the real-time performance, ensuring the complete recording of exception logs, reducing the BMC overhead at the same time, and improving the operation efficiency of the server. Description of the Drawings

[0010] Figure 1 It is a schematic flowchart of a method for managing server exception logs based on CPLD provided in the present application.

[0011] Figure 2 It is a schematic flowchart of switching the access permission of the EEPROM to the BMC in a method for managing server exception logs based on CPLD provided in the present application. Detailed Embodiments

[0012] The present application provides a method for managing server exception logs based on CPLD to solve the technical problems that in the prior art, the real-time performance of the server exception log saving method is insufficient, resulting in easy loss of exception information and excessive resource overhead of the BMC, thus affecting the operation efficiency of the server. It realizes the technical effect of the CPLD monitoring and storing the server serial port logs, improving the real-time performance, ensuring the complete recording of exception logs, reducing the BMC overhead at the same time, and improving the operation efficiency of the server.

[0013] Embodiment, as Figure 1As shown in the figure, an embodiment of the present application provides a method for managing server exception logs based on CPLD. The method includes:

[0014] Step S100: The server CPU generates server logs in real time and transmits the server logs to the BMC through the CPLD in a transparent manner.

[0015] Specifically, during the operation of the server, its central processing unit (CPU, full English name: Central Processing Unit) will generate server logs (Server Log) in real time. These logs record the running status, event information, and possible abnormal situations of the server. To ensure the real-time and integrity of the logs, the server CPU transmits the generated logs through a complex programmable logic device (CPLD, full English name: Complex Programmable Logic Device) in a transparent manner (Transparent Transmission), that is, directly transmits the log data to the BMC (Baseboard Management Controller, baseboard management controller). The CPLD will form a direct connection transparent transmission path during this process. As an intermediate bridge, the CPLD will not process or modify the log data, but directly pass the log data to the BMC without any changes, ensuring that the BMC can receive the log information generated by the server CPU in real time. This transparent transmission mechanism not only improves the efficiency of log transmission but also avoids the loss of key information caused by log processing delays.

[0016] Furthermore, step S100 of the present application further includes:

[0017] Step S110: The CPLD switches the log serial port sending end of the server CPU to the log serial port receiving end of the BMC to form a direct connection transparent transmission path; Step S120: Obtain a copy data synchronized with the server logs by mirroring the log data stream flowing through the CPLD in real time.

[0018] Specifically, through its hardware connection ability, the CPLD directly connects the log serial port sending end (i.e., the log output end) of the server CPU to the log serial port receiving end (i.e., the log input end) of the BMC by default, forming a direct transparent transmission path. Specifically, the CPLD is connected to the log output end of the server CPU through the First SerialPort by default, and at the same time is connected to the serial port receiving end of the BMC through the Second Serial Port, thus constructing a complete serial port data path. This path is the direct transparent transmission path, which enables the log data generated by the server CPU to be directly transmitted through the CPLD to the BMC without additional processing or storage, ensuring the real-time and efficient transmission of logs. In addition, while transmitting the log data transparently, the CPLD also performs real-time mirroring on the log data stream flowing through it. The mirroring operation generates a copy data that is completely synchronized with the server log. This copy data can be used for subsequent exception analysis or other processing operations. In this way, the CPLD not only realizes the efficient transparent transmission of logs, but also provides a reliable data source for log backup and analysis, further enhancing the flexibility and reliability of log management.

[0019] Step S200: The CPLD synchronizes and mirrors the copy data of the server log, and outputs a service exception log by performing exception analysis on the copy data.

[0020] Specifically, while the CPLD transparently transmits the log data generated by the server CPU to the BMC, it also synchronously mirrors the log data, that is, generates a copy of the data that is exactly the same as the original log data. This copy of the data is kept in real-time synchronization with the server log to ensure the integrity and accuracy of its content. Subsequently, the CPLD performs abnormality analysis on these copy data. Specifically, the CPLD will, based on predefined abnormality characteristics, such as specific error codes (Error Code 500, indicating an internal server error; Error Code 0x80004005, indicating failure in initializing a hardware device or driver), abnormal states (CPU Overheating, indicating that the CPU temperature exceeds the safety threshold; FanFailure, indicating abnormal rotation speed or stoppage of the server fan), or log patterns (Kernel Panic - Not Syncing: Fatal exception, indicating a crash of the operating system kernel; Connection timeout after 30 seconds, indicating a network connection timeout), perform real-time detection and matching on the copy data. If it is found that the log data contains content that conforms to the abnormality characteristics, the CPLD will capture this data and record it in the abnormality log. These abnormality logs record the faults or abnormal events that occurred during the operation of the server, providing a key basis for subsequent fault diagnosis and maintenance. Through this mechanism, the CPLD not only realizes the real-time transparent transmission of log data, but also can quickly identify and extract abnormal information in the log stream, ensuring that the administrator can timely obtain the problems in the server operation, thereby improving the efficiency and accuracy of fault troubleshooting.

[0021] Furthermore, step S200 further includes:

[0022] Step S210: The CPLD pre-configures a FIFO buffer, where the FIFO buffer is used to temporarily store the copy data of the server log; Step S220: Real-time detect whether the copy data of the server log in the FIFO buffer conforms to the predefined abnormality characteristics; Step S230: If the copy data of the server log does not conform to the predefined abnormality characteristics, continuously transparently transmit the server log to the BMC; Step S240: If the copy data of the server log conforms to the predefined abnormality characteristics, trigger a data capture operation; Step S250: Through the data capture operation, capture the service abnormality log and write the service abnormality log into the EEPROM.

[0023] Specifically, a FIFO buffer (First In First Out Buffer) is pre-configured in the CPLD. This buffer is used to temporarily store the copy data of server logs. The design of the FIFO buffer ensures the ordered storage and reading of log data, avoiding data loss or chaos. The CPLD will detect the log copy data in the FIFO buffer in real time and determine whether it conforms to predefined abnormal characteristics (such as specific error codes, abnormal states, or log patterns). The detection process is as follows: The CPLD starts from the head of the FIFO buffer, reads the log data in sequence, and compares the read log data with the predefined abnormal characteristics in the abnormal characteristic library. It checks whether the log contains specific error codes, detects whether keywords of abnormal states appear in the log, and uses a pattern matching algorithm (such as regular expressions) to determine whether the log conforms to the predefined abnormal pattern. If no abnormal characteristics are found in the log copy data, the CPLD will continue to transparently transmit the log data to the BMC, and at the same time clear the processed data in the FIFO buffer to make room for new logs; on the contrary, if content conforming to the predefined abnormal characteristics is detected in the log copy data, the CPLD will immediately trigger a data capture operation (DataCapture Operation). In the data capture operation, the CPLD extracts the abnormal log data from the FIFO buffer, including the log that triggers the abnormality and the related logs before and after it (such as the first 512 bytes and the last 2048 bytes) to ensure the integrity of the abnormal context, and then writes it as a service abnormal log into the EEPROM (Electrically Erasable Programmable Read-Only Memory). As a non-volatile storage medium, the EEPROM can store these abnormal logs for a long time, and the data will not be lost even if the server is powered off. Through this mechanism, the CPLD can not only monitor log data in real time, but also quickly capture and store key information when an abnormality is found, providing reliable data support for subsequent fault diagnosis and maintenance. At the same time, the use of the FIFO buffer ensures the efficient processing and storage of log data, avoiding problems such as data loss or delay.

[0024] Furthermore, step S210 of this application includes:

[0025] Step S211: The capacity of the FIFO buffer is 512 bytes.

[0026] Specifically, the capacity of the FIFO buffer is designed to be 512 bytes (512 Bytes) to ensure that there is enough storage space to cache the log content when the log data flows through the CPLD, so that the CPLD can perform real-time analysis and anomaly detection. When the log data generated by the server CPU flows through the CPLD, the CPLD will write this data into the FIFO buffer in sequence until the buffer is full. If the buffer is full, the new data will overwrite the earliest written data to ensure that the latest log information is always saved in the buffer. The 512-byte capacity design is to balance storage efficiency and real-time performance. The 512-byte capacity is sufficient to store the log data within a certain time range to ensure that enough information can be captured when an anomaly is detected. Moreover, the smaller buffer capacity reduces the latency of data processing and retrieval, enabling the CPLD to quickly respond to changes in the log data stream and detect anomaly features in a timely manner. Through this design, the FIFO buffer can provide reliable data support for the capture and analysis of anomaly logs while ensuring the real-time processing of log data.

[0027] Furthermore, step S250 includes:

[0028] Step S251: Calculate the write start address based on the circular address pointer of the EEPROM circular storage area; Step S252: Take the 512-byte log data cached in the FIFO buffer before the data capture operation is triggered as the first anomaly log segment and write it into the storage area corresponding to the write start address in the EEPROM; Step S253: Real-time capture the serial data stream sent by the log serial port after the data capture operation is triggered, and take the subsequent 2048-byte log data as the second anomaly log segment and write it into the storage area; Step S254: Among them, the first anomaly log segment and the second anomaly log segment form the complete service anomaly log in the EEPROM.

[0029] Specifically, in the EEPROM, a design of a circular buffer is adopted. The circular buffer manages the data writing position through a circular address pointer. When new log data needs to be written, the CPLD calculates the current write start address according to the current value of the circular address pointer to ensure that the data can be stored in the EEPROM orderly. Before the data capture operation is triggered, 512 bytes of log data have been cached in the FIFO buffer. This part of the data is used as the first exception log segment and is written into the storage area corresponding to the write start address in the EEPROM. After the data capture operation is triggered, the CPLD will capture the serial data stream sent by the log serial port sending end in real time and use the subsequent 2048 - byte log data as the second exception log segment and continue to write it into the storage area of the EEPROM. The first exception log segment (512 bytes) and the second exception log segment (2048 bytes) together constitute the complete service exception log in the EEPROM. This segmented storage method ensures the integrity of the exception log, including both the key log information before the exception occurs and the detailed data after the exception occurs. Through the design of the circular buffer and the management of the circular address pointer, the EEPROM can efficiently store a large amount of log data while avoiding waste of storage space. This mechanism not only improves the flexibility of log storage but also provides comprehensive and reliable data support for subsequent fault analysis and diagnosis.

[0030] Step S300: The CPLD saves the service exception log in the EEPROM.

[0031] Specifically, after detecting abnormal features in the server log, the CPLD will perform a data capture operation and store the captured abnormal log data in the EEPROM. In this process, the CPLD will first write the log data that has been cached in the FIFO before the abnormal occurrence into the EEPROM, and then continue to record the log data after the abnormal occurrence in real time and append it for storage to ensure the integrity of the abnormal log. By storing the abnormal log in the EEPROM, it can ensure that the log data is still available after the server power - off or restart, providing a reliable basis for server fault analysis for the administrator.

[0032] Step S400: After receiving the abnormal log access request instruction sent by the BMC, the CPLD switches the access permission of the EEPROM to the BMC.

[0033] Specifically, when the CPLD receives the exception log access request instruction sent by the BMC, it will perform the following operations to switch the access permission of the EEPROM to the BMC: First, the BMC sends an exception log access request instruction to the CPLD through the I2C interface (Inter-Integrated Circuit, a serial communication protocol), requesting to read the service exception log stored in the EEPROM. After receiving the request instruction, the CPLD will output a control signal to drive the I2C Switch (I2C switch) to switch the access path of the EEPROM. After the access permission is switched, the BMC can read the exception log data in the EEPROM through the I2C interface. Through this mechanism, the CPLD realizes the dynamic management of the access permission of the EEPROM, ensuring that the BMC can only access the exception log data when needed, and the CPLD exclusively controls it at other times, thus ensuring the security of the log data and the stability of the system.

[0034] Furthermore, as Figure 2 shown, step S400 includes:

[0035] Step S410: When the BMC needs to query the server exception log, the BMC sends the exception log access request instruction to the CPLD through the first I2C interface connected to the CPLD; Step S420: After receiving the exception log access request instruction, the CPLD outputs a first control signal through the GPIO pin of the CPLD; Step S430: Drive the I2C Switch to conduct the communication path from the BMC to the EEPROM through the first control signal, where the I2C Switch is used to switch the access permission of the EEPROM.

[0036] Specifically, when the BMC needs to query the server exception log, it sends an exception log access request instruction to the CPLD through the first I2C interface connected to the CPLD. First, the BMC sends an exception log access request instruction to the CPLD through the first I2C interface, requesting to obtain the service exception log stored in the EEPROM. After receiving the access request instruction sent by the BMC, the CPLD outputs a first control signal through its GPIO pins (General Purpose Input / Output), and this control signal is used to drive the I2C Switch to switch the access path of the EEPROM. After receiving the first control signal, the I2C Switch will conduct the communication path from the BMC to the EEPROM and at the same time disconnect the communication path from the CPLD to the EEPROM. In this way, the BMC can directly access the exception log data in the EEPROM through the I2C interface. Through the switching of the I2C Switch, the access permission of the EEPROM is transferred from the CPLD to the BMC. The BMC can read the header information in the EEPROM to understand the storage structure and location of the log, and then read the specific exception log content according to the header information. Through this mechanism, the CPLD realizes the dynamic management of the access permission of the EEPROM, ensuring that the BMC can only access the exception log data when needed, and the CPLD has exclusive control at other times, thus ensuring the security of the log data and the stability of the system.

[0037] Furthermore, step S430 further includes:

[0038] Step S431: The BMC reads the header information of the EEPROM; Step S432: Reads the server exception log according to the header information; Step S433: Performs a log management operation on the server exception log in the EEPROM through the web interface of the BMC, where the log management operation includes but is not limited to deletion.

[0039] Specifically, when the BMC accesses the EEPROM through the I2C interface, it first reads the header information in the EEPROM. The header information records the location and content of the log data stored in the EEPROM. For example, key information such as the start address, length, and timestamp of the log helps the BMC quickly locate and parse specific exception log data. After obtaining the header information, the BMC reads the server exception logs according to the records therein. These log data include detailed information before and after the occurrence of the exception, providing an important basis for fault diagnosis. After the reading is completed, the BMC provides a management function for the exception logs through its Web interface. Server administrators can perform various log management operations through the Web interface. For example, deleting logs: clearing old log data in the EEPROM to free up storage space; marking as read: marking the processed logs as read for subsequent tracking; marking as favorite: marking important exception logs as favorites for quick search and analysis. In this way, the BMC can not only efficiently read and manage the exception logs in the EEPROM, but also provide a convenient operation interface for server administrators, improving the flexibility and efficiency of log management.

[0040] Furthermore, step S430 further includes:

[0041] Step S434: The I2C Switch has a second I2C interface connected to the CPLD, a third I2C interface connected to the BMC, and a common I2C interface connected to the EEPROM.

[0042] Specifically, the I2C Switch is a hardware device for switching communication paths. It has four key I2C interfaces. The first is the first I2C interface, which connects the BMC and the CPLD. It is used for the BMC to send an exception log access request instruction to the CPLD and receive the response from the CPLD. This interface is the direct communication channel between the BMC and the CPLD and is used to coordinate the switching of EEPROM access permissions. The second is the second I2C interface, which connects the CPLD. This interface is used for communication between the CPLD and the I2C Switch, enabling the CPLD to control the switching operation of the I2C Switch. The third is the third I2C interface, which connects the BMC. This interface is used for communication between the BMC and the I2C Switch, enabling the BMC to access the EEPROM through the I2C Switch when needed. The fourth is the common I2C interface, which connects the EEPROM. This interface is the only communication path between the I2C Switch and the EEPROM and is used to transmit log data. The role of the I2C Switch is to dynamically switch the access permissions of the EEPROM according to the control signal of the CPLD. When the CPLD needs to access the EEPROM, the I2C Switch will connect the common I2C interface to the second I2C interface, enabling the CPLD to directly read and write the data in the EEPROM. When the BMC needs to access the EEPROM, the CPLD will drive the I2C Switch to switch the common I2C interface to the third I2C interface through the control signal, enabling the BMC to read the exception log data in the EEPROM. Through this design, the I2C Switch realizes the flexible management of the EEPROM access permissions, ensuring that the CPLD and the BMC can access the EEPROM separately without conflict, thereby improving the security and efficiency of the system.

[0043] Step S500: After the BMC finishes accessing the EEPROM, it sends an exception log access termination instruction to the CPLD.

[0044] Specifically, after the BMC finishes accessing the EEPROM, it sends an exception log access termination instruction to the CPLD through the first I2C interface. First, the BMC accesses the EEPROM through the I2C Switch to read the required exception log data, including the header information and the specific log content. After completing the log reading or other management operations (such as deletion, marking, etc.), the BMC is ready to release the access permission to the EEPROM. At this time, the BMC sends an exception log access termination instruction to the CPLD through the first I2C interface, notifying the CPLD that its access operation has ended. This instruction is a predefined signal used to trigger the CPLD to perform subsequent permission recovery operations. Through this mechanism, the BMC can release the permission in a timely manner after finishing accessing the EEPROM, ensuring the exclusive control of the EEPROM by the CPLD, thereby guaranteeing the security of the log data and the stability of the system.

[0045] Step S600: After receiving the exception log access termination instruction sent by the BMC, the CPLD recovers the access permission of the BMC to the EEPROM.

[0046] Specifically, after receiving the exception log access termination instruction sent by the BMC, the CPLD will perform the following operations to recover the access permission of the BMC to the EEPROM. First, the BMC sends an exception log access termination instruction to the CPLD through the first I2C interface, notifying the CPLD that its access operation has ended. After receiving the termination instruction, the CPLD outputs a second control signal (Second Control Signal) through its GPIO pins. After receiving the second control signal, the I2C Switch will switch the communication path of the EEPROM from the BMC back to the CPLD, returning the access permission of the EEPROM to the CPLD. In this way, the BMC can no longer directly access the data in the EEPROM, enabling the CPLD to resume exclusive control of the EEPROM, ensuring the security of the log data and the stability of the system. Through this mechanism, the CPLD can dynamically manage the access permission of the EEPROM, ensuring that the BMC can only access the log data when needed and recovering the permission in a timely manner after the access ends, avoiding unnecessary resource occupation and security risks.

[0047] Furthermore, step S600 also includes:

[0048] Step S610: When the BMC finishes querying the server exception log, the BMC sends the exception log access termination instruction to the CPLD through the first I2C interface; Step S620: After receiving the exception log access termination instruction, the CPLD outputs a second control signal through the GPIO pins of the CPLD; Step S630: Drive the I2CSwitch to restore the communication path from the CPLD to the EEPROM through the second control signal.

[0049] Specifically, when the BMC finishes querying the server exception log, it sends an exception log access termination instruction to the CPLD through the first I2C interface, notifying the CPLD that its access operation has ended. In this process, the BMC sending the exception log access termination instruction to the CPLD through the first I2C interface indicates that it has completed the reading or other operations of the log data in the EEPROM. After receiving the termination instruction, the CPLD outputs a second control signal through its GPIO pins, and this signal is used to drive the I2CSwitch (I2C switch) to switch the access path of the EEPROM. After receiving the second control signal, the I2C Switch disconnects the connection between the BMC and the EEPROM, and at the same time restores the communication path between the CPLD and the EEPROM. This operation ensures that only the CPLD can access the log information in the EEPROM, and the BMC can no longer directly read or operate the data in the EEPROM. After the switching is completed, the CPLD regains exclusive access to the EEPROM, ensuring the security of the log data and the stability of the system. This mechanism avoids resource conflicts or security issues that may be caused by the BMC occupying the EEPROM access permission for a long time, thereby reducing the BMC overhead and improving the server operation efficiency.

[0050] In summary, a method for managing server exception logs based on CPLD provided by an embodiment of the present application has at least the following technical effects: realizing the CPLD to monitor and store the server serial port logs, improving the real-time performance, ensuring the complete recording of the exception logs, and at the same time reducing the BMC overhead and improving the server operation efficiency.

[0051] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A server abnormality log management method based on CPLD, characterized in that: The method comprises: The server CPU generates a server log in real time, and transparently transmits the server log to the BMC through the CPLD; The CPLD synchronously mirrors the copy data of the server log, and outputs the service exception log by performing exception analysis on the copy data; The CPLD stores the service exception log in the EEPROM; After receiving the abnormal log access request instruction sent by the BMC, the CPLD switches the access right of the EEPROM to the BMC; After the BMC finishes accessing the EEPROM, it sends an abnormal log access termination instruction to the CPLD; After receiving the abnormal log access termination instruction sent by the BMC, the CPLD reclaims the BMC's access rights to the EEPROM.

2. A server abnormality log management method based on CPLD as claimed in claim 1, characterized in that: After receiving the abnormal log access request instruction sent by the BMC, the CPLD switches the access right of the EEPROM to the BMC, including: When the BMC needs to query the server exception log, the BMC sends the exception log access request instruction to the CPLD through the first I2C interface connected to the CPLD; After receiving the abnormal log access request instruction, the CPLD outputs a first control signal through a GPIO pin of the CPLD; The I2C Switch is driven by the first control signal to conduct a communication path from the BMC to the EEPROM, wherein the I2C Switch is used to switch access rights of the EEPROM.

3. A server abnormality log management method based on CPLD as claimed in claim 2, characterized in that: The communication path from the BMC to the EEPROM is turned on by controlling the I2C Switch through the GPIO, and then the method further includes: The BMC reads the header information of the EEPROM; Read the server exception log according to the header information; A log management operation is performed on the server exception log in the EEPROM through the web interface of the BMC, wherein the log management operation includes but is not limited to deletion.

4. A server abnormality log management method based on CPLD as claimed in claim 2, characterized in that: After receiving the abnormal log access termination instruction sent by the BMC, the CPLD reclaims the BMC's access rights to the EEPROM, including: When the BMC finishes querying the server exception log, the BMC sends the exception log access termination instruction to the CPLD through the first I2C interface; After receiving the abnormal log access termination instruction, the CPLD outputs a second control signal through the GPIO pin of the CPLD; The I2C Switch is driven by the second control signal to restore the communication path from the CPLD to the EEPROM.

5. A server abnormality log management method based on CPLD as claimed in claim 1, characterized in that: The server CPU generates server logs in real time and transparently transmits the server logs to the BMC through the CPLD, including: The CPLD switches the log serial port sending end of the server CPU to the log serial port receiving end of the BMC to form a direct transparent transmission path; By mirroring the log data stream flowing through the CPLD in real time, duplicate data synchronized with the server log is obtained.

6. A CPLD-based server abnormality log management method as claimed in claim 5, characterized in that: The CPLD synchronously mirrors the copy data of the server log, and outputs the service exception log by performing exception analysis on the copy data, including: Preconfiguring a FIFO buffer in the CPLD, wherein the FIFO buffer is used to temporarily store the copy data of the server log; Real-time detection of whether the copy data of the server log in the FIFO buffer meets predefined abnormal characteristics; If the copy data of the server log does not meet the predefined abnormal characteristics, the server log is continuously transparently transmitted to the BMC; If the copy data of the server log meets the predefined abnormal characteristics, a data capture operation is triggered; The service exception log is captured through the data capture operation, and the service exception log is written into the EEPROM.

7. A server abnormality log management method based on CPLD as claimed in claim 6, characterized in that: The capacity of the FIFO buffer is 512 bytes.

8. A CPLD-based server abnormality log management method as claimed in claim 2, characterized in that: The I2C Switch has a second I2C interface connected to the CPLD, a third I2C interface connected to the BMC, and a common I2C interface connected to the EEPROM.

9. A CPLD-based server abnormality log management method as claimed in claim 6, characterized in that: Capturing the service exception log through the data capture operation includes: Based on the circular address pointer of the EEPROM ring storage area, calculate the write start address; Before the data capture operation is triggered, the 512-byte log data cached in the FIFO buffer is used as the first abnormal log segment, and written into the storage area corresponding to the write start address in the EEPROM; After the data capture operation is triggered, the serial port data stream sent by the log serial port sending end is captured in real time, and the subsequent 2048 bytes of log data are written into the storage area as the second abnormal log segment; The first exception log segment and the second exception log segment constitute the complete service exception log in the EEPROM.

Citation Information

Patent Citations

  • Redriver parameter configuration monitoring method for server

    CN107729173A

  • Serial port information collection device and method and server

    CN114579400A

  • Redundant disk array controller switching system and method, electronic equipment and medium

    CN116679875A

  • Hard disk fault identification system, method and device of server, server and medium

    CN118606118A

  • Method of collecting error logs

    US20210326208A1