Server kernel exception monitoring method and device, storage medium and server

By connecting the baseboard management controller to the electronic device through the interface, kernel logs are obtained and abnormal alarms are reported through the private network. This solves the shortcomings of existing technologies in monitoring the impact of network conditions and enables timely detection and accurate alarms when the network is poor.

CN114911684BActive Publication Date: 2026-01-02BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210551979.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-18
Publication Date
2026-01-02
Estimated Expiration
2042-05-18

AI Technical Summary

Technical Problem

Existing technologies for monitoring Linux operating system kernel anomalies are easily affected by network conditions, leading to a failure to provide timely feedback on anomalies or misjudgments. Furthermore, the cause of anomalies cannot be analyzed after the kdump service fails.

Method used

By connecting the baseboard management controller to the electronic device interface, the kernel log of the operating system is obtained, and abnormal alarms are reported to the monitoring platform through the private network to ensure that kernel abnormalities can still be detected in a timely manner when the network conditions are poor.

Benefits of technology

A monitoring device for the Linux kernel was implemented, which connects to the monitoring platform via a dedicated network. This provides a method for monitoring server kernel anomalies, ensuring that kernel anomalies can be detected in a timely manner even when network conditions are poor, and reporting alarms to the monitoring platform via the private network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114911684B_ABST
    Figure CN114911684B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method and device for monitoring server kernel exception, a storage medium and a server, the server comprising a baseboard management controller and an electronic device running an operating system, the baseboard management controller being connected with an interface on the electronic device, and the baseboard management controller being connected to a monitoring platform through a private network, the method being applied to the baseboard management controller, comprising: obtaining a log string corresponding to a kernel log of the operating system in the electronic device through the interface connected with the electronic device; identifying whether there is an abnormal log record in the log string; and if there is an abnormal log record in the log string, reporting a kernel exception alarm to the monitoring platform through the private network. The present scheme can ensure that the kernel log of the operating system in the electronic device is always collected and the kernel exception alarm is normally reported to the monitoring platform regardless of the network condition of the server.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of servers, in particular, to a server kernel exception monitoring method and device, a storage medium and a server. BACKGROUND

[0002] The operating system plays a very important role in the server running process. As a software, the operating system will undoubtedly have various exceptions. Among them, the kernel exception is the most widespread one. Once the kernel exception occurs, the entire operating system will be in an unusable state, and various services running thereon will also be affected. Therefore, it is necessary to monitor the kernel exception of the operating system of the server.

[0003] The Linux operating system is the most widely used operating system in the enterprise server field at present. At present, the monitoring of the Linux operating system kernel mainly has the following two ways:

[0004] First, a log monitoring service is run on the Linux operating system, and kernel logs are collected and analyzed at regular intervals. This method depends on good network conditions of the server. If the network condition is problematic, or the exception is caused by a network-related kernel subsystem, the abnormal information cannot be fed back to the outside in the first time, thereby losing the significance of monitoring.

[0005] Second, the health status of the Linux operating system is monitored remotely through the network heartbeat of the server. When the connection is lost for a period of time, it is determined that the Linux operating system kernel is down. However, the server network problem may also cause the loss of network heartbeat. Therefore, this method has a certain possibility of misjudgment. At the same time, the post-analysis mainly depends on the kdump service of Linux to save the scene of the down. If the kdump service is invalid, the subsequent abnormal reason cannot be clearly determined. SUMMARY

[0006] This part is provided to briefly introduce the concepts, which will be described in detail in the specific embodiments part. This part is not intended to identify the key features or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.

[0007] In a first aspect, the present disclosure provides a server kernel exception monitoring method. The server includes a baseboard management controller and an electronic device carrying an operating system. The baseboard management controller is connected with an interface on the electronic device, and the baseboard management controller is connected to a monitoring platform through a private network. The method is applied to the baseboard management controller and includes:

[0008] acquire, through an interface connected with the electronic device, a log string corresponding to the kernel log of the operating system in the electronic device;

[0009] identify whether there is an abnormal log record in the log string;

[0010] if there is an abnormal log record in the log string, report a kernel abnormality alarm to the monitoring platform through the private network.

[0011] In a second aspect, the present disclosure provides a server kernel abnormality monitoring device, the server comprising a baseboard management controller and an electronic device carrying an operating system, the baseboard management controller being connected with an interface on the electronic device and connected to a monitoring platform through a private network, the device being configured in the baseboard management controller and comprising:

[0012] a log acquisition module configured to acquire, through an interface connected with the electronic device, a log string corresponding to the kernel log of the operating system in the electronic device;

[0013] an abnormality identification module configured to identify whether there is an abnormal log record in the log string;

[0014] an abnormality alarm module configured to, when there is an abnormal log record in the log string, report a kernel abnormality alarm to the monitoring platform through the private network.

[0015] In a third aspect, the present disclosure provides a computer readable storage medium having a computer program stored thereon, the program being executed by a processing device to implement the method of the first aspect.

[0016] In a fourth aspect, the present disclosure provides a server comprising:

[0017] an electronic device carrying an operating system;

[0018] a baseboard management controller connected with an interface on the electronic device and connected to a monitoring platform through a private network, and configured to implement the method of the first aspect to monitor the kernel abnormality of the operating system in the electronic device.

[0019] In the above technical solution, the baseboard management controller is electrically connected with the interface of the electronic device, so that the baseboard management controller can collect the kernel log of the operating system in the electronic device at all times without being affected by the network condition of the server, and the baseboard management controller is connected with the monitoring platform through a private network and is in a different network segment from the server network, so that even if the server network has a problem, the private network can still work normally, the baseboard management controller can report a kernel abnormality alarm to the monitoring platform normally, and the monitoring platform can discover the kernel abnormality in the server in a timely manner.

[0020] Other features and advantages of the present disclosure will be described in the following detailed description. BRIEF DESCRIPTION OF DRAWINGS

[0021] The above and other features, advantages and aspects of embodiments of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which:

[0022] Figure 1 A flow chart of a method for monitoring server kernel exception is shown according to an exemplary embodiment;

[0023] Figure 2 A schematic diagram of connection between a server and a monitoring platform is shown according to an exemplary embodiment;

[0024] Figure 3 A schematic diagram of connection between a server and a monitoring platform is shown according to an exemplary embodiment;

[0025] Figure 4 A flow chart of a method for monitoring server kernel exception is shown according to an exemplary embodiment;

[0026] Figure 5 A flow chart of a method for monitoring server kernel exception is shown according to an exemplary embodiment;

[0027] Figure 6 A block diagram of a monitoring device for server kernel exception is shown according to an exemplary embodiment;

[0028] Figure 7 A block diagram of an electronic device in a server is shown according to an exemplary embodiment. DETAILED DESCRIPTION

[0029] Embodiments of the present disclosure will be described herein below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be interpreted as being limited to the embodiments set forth herein, but rather, these embodiments are provided so that the present disclosure can be more thoroughly and completely understood. It is understood that the drawings and embodiments of the present disclosure are for exemplary purposes only and are not intended to limit the scope of the present disclosure.

[0030] It is understood that each of the steps recited in the method embodiments of the present disclosure can be performed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit performing the steps shown. The scope of the present disclosure is not limited in this respect.

[0031] The term "include" and variations thereof as used herein mean "to include, without limitation." The term "based on" means "based at least in part on." The term "one embodiment" means "at least one embodiment." The term "another embodiment" means "at least one additional embodiment." The term "some embodiments" means "at least some embodiments." Related terms shall be construed accordingly.

[0032] It should be noted that the terms "first", "second", etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not intended to limit the order or interdependence of the functions performed by these devices, modules or units.

[0033] It should be noted that the modification of "one" or "multiple" mentioned in the present disclosure is illustrative rather than limiting, and those skilled in the art should understand that "one or more" should be understood unless otherwise explicitly indicated in the context.

[0034] The names of the messages or information exchanged between the devices in the embodiments of the present disclosure are only used for illustrative purposes, and are not intended to limit the scope of the messages or information.

[0035] All actions of obtaining signals, information or data in the present disclosure are carried out in accordance with the corresponding data protection regulations and policies of the country where the device is located, and with the authorization given by the corresponding device owner.

[0036] It can be understood that, before using the technical solutions disclosed in the embodiments of the present disclosure, the type, use range, use scenario, etc. of the personal information involved in the present disclosure should be informed to the user and the authorization of the user should be obtained through appropriate means in accordance with relevant laws and regulations.

[0037] For example, in response to receiving the active request of the user, prompt information is sent to the user to explicitly prompt the user that the operation requested to be performed will require obtaining and using the personal information of the user. Thus, the user can voluntarily choose whether to provide the personal information to the electronic device, application program, server or storage medium, etc. software or hardware performing the operation of the technical solutions of the present disclosure according to the prompt information.

[0038] As an optional but non-limiting implementation manner, in response to receiving the active request of the user, the manner of sending prompt information to the user may, for example, be a pop-up window manner, and the prompt information may, for example, be presented in the form of text in the pop-up window. In addition, the pop-up window may, for example, also carry a selection control for the user to select "agree" or "disagree" to provide the personal information to the electronic device.

[0039] It can be understood that the above notification and user authorization process is only illustrative and does not limit the implementation of the present disclosure, and other ways that meet the relevant laws and regulations can also be applied to the implementation of the present disclosure.

[0040] At the same time, it can be understood that the data involved in the technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of the relevant laws and regulations and the relevant provisions.

[0041] In view of the technical problems in the related art, the present embodiment provides a server kernel exception monitoring method. It should be noted that in the present embodiment, the server includes a baseboard management controller (BMC) and an electronic device carrying an operating system, wherein the baseboard management controller is connected with an interface on the electronic device, which can be a serial port or a video graphics array (VGA) interface, etc., and the baseboard management controller is connected to a monitoring platform through a private network. The operating system carried on the electronic device can be Linux or Windows, etc., and the present disclosure does not limit the specific form of the operating system.

[0042] Figure 1 A flowchart of a server kernel exception monitoring method provided by an example embodiment is shown, which is applied to a baseboard management controller, as shown in Figure 1 The method comprises the following steps:

[0043] S110, obtaining a log string corresponding to a kernel log of an operating system in an electronic device through an interface connected with the electronic device.

[0044] The log string corresponding to the kernel log refers to a log text corresponding to the kernel log.

[0045] S120, identifying whether there is an abnormal log record in the log string.

[0046] The identification of whether there is an abnormal log record in the log string can be performed by keyword matching or the like. For example, in the above step, the log string is matched with each abnormal log record in an abnormal log record library, respectively, wherein if the log string hits any abnormal log record (indicating that the operating system kernel in the electronic device has an abnormal problem corresponding to the hit abnormal log record), it is determined that there is an abnormal log record in the log string, and the following step S130 is performed.

[0047] If the log string does not hit any abnormal log record, it is determined that there is no abnormal log record in the log string, and then the kernel log corresponding to the log string of the operating system in the electronic device is obtained through the interface connected to the electronic device, and it is continued to identify whether there is an abnormal log record in the log string, that is, the steps S110-S120 are repeated.

[0048] In S130, if there is an abnormal log record in the log string, the kernel abnormality alarm is reported to the monitoring platform through the private network.

[0049] If it is determined that there is an abnormal log record in the log string, the kernel abnormality alarm is reported to the monitoring platform through the private network, indicating that there is an abnormality in the operating system kernel of the electronic device.

[0050] It can be understood that, in the above process, since the baseboard management controller is electrically connected with the interface of the electronic device, the baseboard management controller can be ensured to always collect the kernel log of the operating system in the electronic device without being affected by the network condition of the server, and the baseboard management controller is connected with the monitoring platform through the private network and is in a different network segment from the server network, so that even if the server network has a problem, the private network can ensure normal work, and the baseboard management controller can normally report the kernel abnormality alarm to the monitoring platform, so that the monitoring platform can timely discover the kernel abnormality in the server.

[0051] It should be noted that the baseboard management controller is occasionally used in some servers, but in these servers, the baseboard management controller is only used for special control such as server power on / off and server internal fan on / off, and through the embodiments of the present disclosure, the baseboard management controller can have the functions of monitoring the kernel abnormality of the server and reporting the abnormality to the monitoring platform in addition to the above-mentioned conventional functions.

[0052] Figure 2 A connection schematic diagram of a server and a monitoring platform in an example embodiment is shown, in which the baseboard management controller is connected with the target serial port of the electronic device, and the baseboard management controller is connected with the monitoring platform through the private network, wherein the electronic device is configured to send the log string corresponding to the kernel log of the operating system through the target serial port.

[0053] Optionally, in step S110, the baseboard management controller monitors the target serial port and receives the log string sent by the electronic device through the target serial port.

[0054] Exemplarily, in a Linux environment, the serial port name is ttySx, and in the electronic device, ttyS0 is taken as the target serial port, and the electronic device is configured in advance to send the log string corresponding to the Linux kernel log to the outside through ttyS0. In the specific implementation, the operating system of the electronic device will continuously generate kernel logs line by line, and whenever a new line of kernel log is generated, the electronic device will send the log string corresponding to the newly generated line of kernel log to the baseboard management controller through the serial port ttyS0. The baseboard management controller receives the log string corresponding to the line of kernel log, matches the log string with each abnormal log record in the abnormal log record library respectively, if the log string hits any abnormal log record, it is determined that there is an abnormal log record in the log string, then reports the kernel exception alarm to the monitoring platform through the private network, and according to the abnormal type corresponding to the hit abnormal log record, indicates the specific problem of the kernel exception in the alarm.

[0055] For example, the abnormal log record library includes the following two abnormal log records:

[0056] (1) BUG: unable to handle kernel NULL pointer dereference

[0057] (2) BUG: soft lockup

[0058] When the log string hits the abnormal log record (1), it indicates that the operating system kernel has a null pointer dereference access, so the kernel exception alarm is reported to the monitoring platform through the private network, and the abnormal problem of the kernel null pointer dereference access is indicated in the alarm. When the log string hits the abnormal log record (2), it indicates that the operating system kernel has a soft deadlock, so the kernel exception alarm is reported to the monitoring platform through the private network, and the abnormal problem of the kernel soft deadlock is indicated in the alarm.

[0059] Optionally, in step S130, the kernel exception alarm is reported to the monitoring platform through the private network, and the context log string corresponding to the log string with the abnormal log record is also uploaded to the monitoring platform for post-analysis. The context log string includes the previous M lines of logs and the next N lines of logs of the line of kernel log with the abnormal log record. M and N are positive integers.

[0060] The baseboard management controller saves the line of kernel log after receiving the log string corresponding to the line of kernel log, the previous M lines of logs of the line of kernel log can be obtained according to the saved kernel log, and the next N lines of logs can be obtained according to the log string sent by the electronic device in the future.

[0061] For the above embodiment, by configuring the electronic device, the substrate management controller can directly obtain the text of the kernel log, i.e., the log string, from the target serial port of the electronic device. For the substrate management controller, it is convenient to directly analyze the text of the kernel log, and the required power consumption is small.

[0062] Figure 3 A connection diagram of a server and a monitoring platform in an example embodiment is shown, in which the substrate management controller is connected with the VGA interface of the electronic device, and the substrate management controller is connected with the monitoring platform through a private network. The VGA interface of the electronic device is used to output a display image, which contains at least one line of kernel logs. Assuming that a display is directly connected with the VGA interface, one line of kernel logs can be observed on the screen of the display.

[0063] Optionally, in step S110, the substrate management controller captures the display image output by the VGA interface of the electronic device, obtains an image frame, and then identifies the log string corresponding to the kernel log contained in the image frame based on an Optical Character Recognition (OCR) algorithm.

[0064] Optionally, considering that the original resolution of the image frame can be high and processing is relatively slow, in order to improve the processing efficiency of the substrate management controller, the image resolution of the image frame is first reduced to a low-resolution image frame. Since the OCR algorithm is relatively mature in string recognition, a slightly lower resolution of the image frame basically does not affect the recognition effect of the log string, and the processing speed of the image frame can be improved. In addition, in some cases, the image frame can be a color image, and the present scheme only needs to focus on the string in the image frame and does not care about other contents in the image frame. Therefore, after the image frame is transformed into a low-resolution image frame, the low-resolution image frame is binarized to reduce noise in the image frame, so that the recognition result of the OCR algorithm can be more accurate.

[0065] Therefore, when identifying the log string corresponding to the kernel log contained in the image frame, the image resolution of the image frame is first reduced to obtain a low-resolution image frame, then the low-resolution image frame is binarized to obtain a processing frame, and then the log string corresponding to the kernel log contained in the processing frame is identified based on the OCR algorithm.

[0066] In a specific implementation, the baseboard management controller captures the display image output from the VGA interface of the electronic device, thereby obtaining image frames frame by frame. After obtaining each image frame, the baseboard management controller identifies the log string in the image frame, matches the log string in the image frame with each abnormal log record in the abnormal log record library, and determines that there is an abnormal log record in the log string if the log string hits any abnormal log record. Then, the baseboard management controller reports the kernel exception alarm to the monitoring platform through the private network, and indicates the specific problem of the kernel exception in the alarm according to the abnormal type corresponding to the hit abnormal log record.

[0067] Optionally, in step S130, the kernel exception alarm is reported to the monitoring platform through the private network, and the context image frame of the image frame in which the abnormal log record exists is also uploaded to the monitoring platform, so that the monitoring platform can perform post-analysis. The context image frame includes the previous M' image frames and the subsequent N' image frames of the image frame in which the abnormal log record exists. M' and N' are positive integers.

[0068] The baseboard management controller saves each image frame after capturing the image frame. The previous M' image frames of the image frame can be obtained according to the saved image frames, and the subsequent N' image frames of the image frame can be obtained according to the image frames captured from the VGA interface of the electronic device in the future.

[0069] For the above embodiment, the baseboard management controller captures the display output of the electronic device, and obtains the text of the kernel log by performing image recognition on the captured image frames. Compared with the previous embodiment, a certain power consumption is consumed, but the electronic device does not need to be specially configured, and the generality is strong.

[0070] Figure 4 A flowchart of a server kernel exception monitoring method provided by an example embodiment is shown. In this embodiment, the baseboard management controller is connected with a target serial port of an electronic device, and the baseboard management controller is connected with a monitoring platform through a private network. The electronic device is configured to send a log string corresponding to a kernel log of an operating system to the outside through the target serial port. Figure 4 As shown in the figure, the method includes:

[0071] S210, monitoring the target serial port and receiving the log string sent by the electronic device through the target serial port.

[0072] S220, identifying whether there is an abnormal log record in the log string.

[0073] S230, if there is an abnormal log record in the log string, reporting a kernel exception alarm to the monitoring platform through the private network.

[0074] Exemplarily, in a Linux environment, the serial port name is ttySx, as shown in the following table. Figure 2 As shown in the table, in the electronic device, ttyS0 is taken as the target serial port, and the electronic device is configured in advance to send the log string corresponding to the Linux kernel log to the outside through ttyS0. In the specific implementation, the operating system of the electronic device will continuously generate kernel logs line by line, and whenever a new line of kernel log is generated, the electronic device will send the log string corresponding to the newly generated line of kernel log to the baseboard management controller through the serial port ttyS0. The baseboard management controller receives the log string corresponding to the line of kernel log, matches the log string with each abnormal log record in the abnormal log record library respectively, and if the log string hits any abnormal log record, it is determined that there is an abnormal log record in the log string, and then the kernel abnormality alarm is reported to the monitoring platform through the private network, and the specific problem of the kernel abnormality is indicated in the alarm according to the abnormal type corresponding to the hit abnormal log record.

[0075] Optionally, in step 230, when the kernel abnormality alarm is reported to the monitoring platform through the private network, the context log string corresponding to the log string of the abnormal log record is also uploaded to the monitoring platform for post-analysis. The context log string includes the previous M lines of logs and the next N lines of logs of the line of kernel log with the abnormal log record. M and N are positive integers.

[0076] The baseboard management controller saves the line of kernel log after receiving the log string corresponding to the line of kernel log, the previous M lines of logs of the line of kernel log can be obtained according to the saved kernel log, and the next N lines of logs can be obtained according to the log string sent by the electronic device in the future.

[0077] For the above embodiment, the electronic device is configured so that the baseboard management controller can directly obtain the text of the kernel log, i.e. the log string, from the target serial port of the electronic device, which is convenient for the baseboard management controller to analyze based on the text of the kernel log, and the power consumption is small.

[0078] Figure 5 A flowchart of a method for monitoring server kernel abnormality provided by an exemplary embodiment is shown, in which the baseboard management controller is connected with the VGA interface of the electronic device, and the baseboard management controller is connected with the monitoring platform through a private network. The VGA interface of the electronic device is used to output a display image, and the display image contains at least one line of kernel log. Figure 5 As shown in the table, the method comprises:

[0079] S310, capturing the display image output by the VGA interface of the electronic device to obtain an image frame.

[0080] S320, identifying a log string corresponding to the kernel log contained in the image frame based on the OCR algorithm.

[0081] S330, identifying whether there is an abnormal log record in the log string.

[0082] S340, if there is an abnormal log record in the log string, reporting a kernel abnormality alarm to a monitoring platform through a private network.

[0083] Optionally, in order to improve the processing efficiency of the baseboard management controller, when identifying the log string corresponding to the kernel log contained in the image frame in step S320, first, the image resolution of the image frame is reduced to obtain a low-resolution image frame, then the low-resolution image frame is binarized to obtain a processing frame, and then the log string corresponding to the kernel log contained in the processing frame is identified based on the OCR algorithm.

[0084] In a specific implementation, the baseboard management controller captures the display image output from the VGA interface of the electronic device, thereby obtaining image frames one by one. After obtaining each image frame, the log string in the image frame is identified, and the log string in the image frame is matched with each abnormal log record in the abnormal log record library respectively. If the log string hits any abnormal log record, it is determined that there is an abnormal log record in the log string, and then a kernel abnormality alarm is reported to the monitoring platform through the private network, and the specific problem of the kernel abnormality is indicated in the alarm according to the abnormal type corresponding to the hit abnormal log record.

[0085] Optionally, in step S340, while reporting the kernel abnormality alarm to the monitoring platform through the private network, the context image frame of the image frame with the abnormal log record is also uploaded to the monitoring platform, so as to facilitate the monitoring platform to analyze afterwards. The context image frame includes the previous M' image frames and the subsequent N' image frames of the image frame with the abnormal log record. M' and N' are positive integers.

[0086] The baseboard management controller saves each image frame after capturing it. The previous M' image frames of the image frame can be obtained according to the saved image frames, and the subsequent N' image frames can be obtained according to the image frames captured from the VGA interface of the electronic device in the future.

[0087] For the above embodiment, the baseboard management controller captures the display output of the electronic device, and the image recognition is performed on the captured image frame to obtain the text of the kernel log. Compared with the previous embodiment, a certain power consumption is consumed, but the electronic device does not need to be specially configured, and the universality is strong.

[0088] It should be noted that, since the Linux kernel is open source, all possible abnormal problems of the kernel can be found by exhaustive method, and recorded as abnormal log records to form an abnormal log record library, and then the obtained log string is matched with each abnormal log record in the abnormal log record library one by one, so that all abnormal problems of the server kernel can be found through the matching of the abnormal log records, so as to monitor whether the kernel is abnormal, determine the specific problem of the kernel abnormality, and achieve the purpose of comprehensive monitoring of the kernel abnormality.

[0089] In addition, since the baseboard management controller is connected with the monitoring platform by a private network and does not affect the server network, the alarm information of the baseboard management controller can be unaffected by the server network condition, so as to ensure that the kernel abnormality alarm can be timely reported to the monitoring platform.

[0090] Compared with the traditional monitoring method, the technical solution of the embodiment of the present disclosure is not affected by the server network condition, and the misjudgment possibility is very low, and the kdump service can be complementary to each other, that is, when the kernel is down, the saved situation of the down site and / or the context log (including the context log string or the context image frame) saved in the monitoring platform can be analyzed after the event, and even the kernel log saved in the baseboard management controller can be analyzed after the event.

[0091] Figure 6 A block diagram of a server kernel abnormality monitoring device provided by an example embodiment is shown.

[0092] The server includes a baseboard management controller and an electronic device carrying an operating system, the baseboard management controller is connected with an interface on the electronic device, and the baseboard management controller is connected to a monitoring platform by a private network. The device is configured in the baseboard management controller, as shown in the figure, the device 400 includes: Figure 6

[0093] The log acquisition module 410 is configured to acquire a log string corresponding to a kernel log of the operating system in the electronic device through an interface connected with the electronic device;

[0094] The abnormality identification module 420 is configured to identify whether there is an abnormal log record in the log string;

[0095] The abnormality alarm module 430 is configured to report a kernel abnormality alarm to the monitoring platform through the private network when there is an abnormal log record in the log string.

[0096] ​Optionally, the abnormality identifying module 420 is configured to match the log string with each abnormal log record in the abnormal log record library respectively, and determine that the log string contains an abnormal log record when the log string hits any abnormal log record.

[0097] Optionally, the baseboard management controller is connected with a target serial port of the electronic device, and the electronic device is configured to send the log string corresponding to the kernel log of the operating system to the outside through the target serial port. The log obtaining module 410 is configured to monitor the target serial port and receive the log string sent by the electronic device through the target serial port.

[0098] Optionally, the abnormality alarming module 430 is configured to report the kernel abnormality alarm to the monitoring platform through the private network, and upload the context log string corresponding to the log string containing the abnormal log record to the monitoring platform.

[0099] Optionally, the baseboard management controller is connected with a VGA interface of the electronic device, and the VGA interface is configured to output a display image containing at least one line of kernel log. The log obtaining module 410 comprises:

[0100] an image capturing module configured to capture the display image output by the VGA interface of the electronic device to obtain an image frame;

[0101] an image recognizing module configured to recognize the log string corresponding to the kernel log contained in the image frame based on an OCR algorithm.

[0102] Optionally, the image recognizing module is configured to reduce the image resolution of the image frame, perform a binaryzation process on the image frame with reduced resolution to obtain a processed frame, and recognize the log string corresponding to the kernel log contained in the processed frame based on the OCR algorithm.

[0103] Optionally, the abnormality alarming module 430 is configured to report the kernel abnormality alarm to the monitoring platform through the private network, and upload the context image frame corresponding to the image frame containing the abnormal log record to the monitoring platform.

[0104] As to the apparatus in the above-mentioned embodiments, the specific manners in which the modules perform operations have been described in details in the embodiments of the method, and thus will not be described in details here.

[0105] In an exemplary embodiment, a computer readable storage medium is provided, which stores a computer program. The program is executed by a processing apparatus to implement the monitoring method provided in the above-mentioned embodiments.

[0106] In an example embodiment, a server is provided, comprising:

[0107] An electronic device hosting an operating system;

[0108] A baseboard management controller connected to an interface on the electronic device and connected to a monitoring platform through a private network, for implementing the monitoring method provided by the foregoing embodiments to monitor an abnormality of an operating system kernel in the electronic device.

[0109] Reference is made below to Figure 7 which shows a structural schematic diagram of an electronic device 600 in a server of an embodiment of the present disclosure, in which an operating system is hosted, including but not limited to Linux or Windows, etc. Figure 7 The electronic device shown is merely an example and should not bring any limitation to the functions and use range of the embodiments of the present disclosure.

[0110] As shown in Figure 7 , the electronic device 600 can include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 602 or loaded from a storage device 608 into a random access memory (RAM) 603, such as performing various services running on a Linux kernel. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604. Among them, the input / output (I / O) interface 605 can include a serial port and / or a VGA interface, etc., for connecting with a baseboard management controller.

[0111] Generally, the following devices can be connected to the I / O interface 605: input devices 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 608 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 609. The communication devices 609 are connected to a server network and can allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 600 with various devices is shown, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices can be alternatively implemented or provided.

[0112] Note that the computer readable storage medium of the present disclosure described above can be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the foregoing. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0113] In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0114] The computer readable storage medium described above carries one or more programs, and the baseboard management controller executes the one or more programs, so that the baseboard management controller: obtains a log string corresponding to a kernel log of the operating system in the electronic device through an interface connected with the electronic device; identifies whether there is an abnormal log record in the log string; and if there is an abnormal log record in the log string, reports a kernel exception alarm to the monitoring platform through the private network.

[0115] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architectures, functions, and operations of the systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams can represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different orders than those noted in the accompanying drawings. For example, two blocks that are represented in succession can actually be executed in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and the combination of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0116] The modules involved in the embodiments of the present disclosure can be implemented in the form of software or in the form of hardware. In some cases, the name of the module does not constitute a limitation on the module itself, for example, the log acquisition module can also be described as a "module for acquiring a log string corresponding to a kernel log of an operating system in an electronic device".

[0117] According to one or more embodiments of the present disclosure, example 1 provides a method for monitoring server kernel exceptions, the server comprising a baseboard management controller and an electronic device running an operating system, the baseboard management controller being connected with an interface on the electronic device, and the baseboard management controller being connected to a monitoring platform through a private network, the method being applied to the baseboard management controller, comprising:

[0118] obtaining, through the interface connected with the electronic device, a log string corresponding to a kernel log of the operating system in the electronic device;

[0119] identifying whether there is an abnormal log record in the log string;

[0120] if there is an abnormal log record in the log string, reporting a kernel exception alarm to the monitoring platform through the private network.

[0121] According to one or more embodiments of the present disclosure, example 2 provides the method of example 1, wherein the identifying whether there is an abnormal log record in the log string comprises:

[0122] matching the log string with each abnormal log record in an abnormal log record library respectively;

[0123] if the log string hits any abnormal log record, it is determined that there is an abnormal log record in the log string.

[0124] According to one or more embodiments of the present disclosure, example 3 provides the method of example 1 or 2, wherein the baseboard management controller is connected with a target serial port of the electronic device, and the electronic device is configured to send the log string corresponding to the kernel log of the operating system to the outside through the target serial port;

[0125] the obtaining, through the interface connected with the electronic device, the log string corresponding to the kernel log of the operating system in the electronic device comprises:

[0126] monitoring the target serial port and receiving the log string sent by the electronic device through the target serial port.

[0127] According to one or more embodiments of the present disclosure, example 4 provides the method of example 3, wherein the reporting the kernel exception alarm to the monitoring platform through the private network comprises:

[0128] reporting the kernel exception alarm to the monitoring platform through the private network, and uploading a context log string corresponding to the log string with the abnormal log record to the monitoring platform.

[0129] According to one or more embodiments of the present disclosure, example 5 provides the method of example 1 or 2, the baseboard management controller is connected with a VGA interface of the electronic device, the VGA interface is used for outputting a display image, and the display image contains at least one kernel log;

[0130] The log string corresponding to the kernel log of the operating system in the electronic device is obtained through the interface connected with the electronic device, including:

[0131] The display image output by the VGA interface of the electronic device is captured to obtain an image frame;

[0132] The log string corresponding to the kernel log contained in the image frame is recognized based on an OCR algorithm.

[0133] According to one or more embodiments of the present disclosure, example 6 provides the method of example 5, and the log string corresponding to the kernel log contained in the image frame is recognized based on an OCR algorithm, including:

[0134] The image resolution of the image frame is reduced, and the reduced resolution image frame is binarized to obtain a processing frame;

[0135] The log string corresponding to the kernel log contained in the processing frame is recognized based on an OCR algorithm.

[0136] According to one or more embodiments of the present disclosure, example 7 provides the method of example 5, and the kernel exception alarm is reported to the monitoring platform through the private network, including:

[0137] The kernel exception alarm is reported to the monitoring platform through the private network, and the context image frame corresponding to the image frame with the abnormal log record is uploaded to the monitoring platform.

[0138] According to one or more embodiments of the present disclosure, example 8 provides a server kernel exception monitoring device, the server includes a baseboard management controller and an electronic device with an operating system, the baseboard management controller is connected with an interface on the electronic device, and the baseboard management controller is connected to a monitoring platform through a private network, the device is configured in the baseboard management controller, and includes:

[0139] A log acquisition module is configured to obtain a log string corresponding to a kernel log of an operating system in an electronic device through an interface connected with the electronic device;

[0140] An exception recognition module is configured to recognize whether there is an abnormal log record in the log string;

[0141] The anomaly alarm module is used to report a kernel anomaly alarm to the monitoring platform through the private network when there are abnormal log records in the log string.

[0142] According to one or more embodiments of this disclosure, Example 9 provides the apparatus of Example 8, wherein the anomaly identification module is configured to match the log string with each anomaly log record in the anomaly log record database, and determine that an anomaly log record exists in the log string when the log string matches any anomaly log record.

[0143] According to one or more embodiments of this disclosure, Example 10 provides an apparatus of Example 8 or 9, wherein the baseboard management controller is connected to a target serial port of the electronic device, and the electronic device is configured to send a log string corresponding to the kernel log of the operating system to the outside world through the target serial port; the log acquisition module is used to monitor the target serial port and receive the log string sent by the electronic device through the target serial port.

[0144] According to one or more embodiments of this disclosure, Example 11 provides the apparatus of Example 10, wherein the anomaly alarm module is used to report kernel anomaly alarms to the monitoring platform through the private network, and upload the context log string corresponding to the log string with anomaly log record to the monitoring platform.

[0145] According to one or more embodiments of this disclosure, Example 12 provides an apparatus of Example 8 or 9, wherein the baseboard management controller is connected to a VGA interface of the electronic device, the VGA interface being used to output a display image, the display image containing at least one line of kernel log; the log acquisition module includes:

[0146] An image capture module is used to capture the display image output from the VGA interface of the electronic device and obtain image frames;

[0147] The image recognition module is used to recognize the log string corresponding to the kernel log contained in the image frame based on the OCR algorithm.

[0148] According to one or more embodiments of this disclosure, Example 13 provides the apparatus of Example 12, wherein the image recognition module is configured to reduce the image resolution of the image frame and perform binarization processing on the reduced resolution image frame to obtain a processed frame, and recognize the log string corresponding to the kernel log contained in the processed frame based on an OCR algorithm.

[0149] According to one or more embodiments of the present disclosure, example 14 provides the apparatus of example 12, wherein the exception alarm module is configured to report the kernel exception alarm to the monitoring platform through the private network, and upload the context image frame corresponding to the image frame in which the exception log is recorded to the monitoring platform.

[0150] According to one or more embodiments of the present disclosure, example 15 provides a computer readable storage medium having stored thereon a computer program, which when executed by a processing apparatus, implements the method of any one of examples 1-7.

[0151] According to one or more embodiments of the present disclosure, example 16 provides a server, comprising:

[0152] An electronic device running an operating system;

[0153] A baseboard management controller connected to an interface on the electronic device and connected to a monitoring platform through a private network, and configured to implement the method of any one of examples 1-7 to monitor an exception of a kernel of the operating system in the electronic device.

[0154] The above description is merely exemplary of the disclosure and the application of the principles thereof and the scope of the disclosure is not limited to the specific embodiments described herein, but only by the claims that follow. It will be readily apparent to those skilled in the art that varying substitutions and modifications can be made to the embodiments described herein without departing from the scope and spirit of the disclosure. For example, features described herein can be combined, swapped, or eliminated in any combination.

[0155] In addition, while operations are depicted in a particular, chronological sequence in this disclosure, this should not be understood as requiring such order unless specifically specified. Certain activities can be performed in different order or concurrently with each other. Additionally, certain activities can be performed simultaneously. Similarly, while several specific implementations have been contended, these should not be interpreted as limiting the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination. Conversely, various features that are described in the context of a single embodiment can also be implemented or practiced separately or in any suitable subcombination. Moreover, although specific implementations have been embodied and described herein, it will be appreciated that various modifications, alternatives, and equivalents can be used with the subject matter of the present disclosure without departing from the true spirit and scope of the present disclosure.

[0156] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims

1. A method of monitoring server kernel exceptions, the method comprising: The server comprises a baseboard management controller and an electronic device running an operating system, the baseboard management controller is electrically connected with an interface on the electronic device, and the baseboard management controller is connected to a monitoring platform through a private network, the method is applied to the baseboard management controller, and comprises the following steps: acquiring, through the interface connected with the electronic device, a log string corresponding to a kernel log of the operating system in the electronic device; identifying whether there is an abnormal log record in the log string; if there is an abnormal log record in the log string, reporting a kernel exception alarm to the monitoring platform through the private network, wherein the private network and a network of the server are in different network segments.

2. The method of claim 1, wherein, The identification of whether there is an abnormal log record in the log string comprises the following steps: matching the log string with each abnormal log record in an abnormal log record library respectively; if the log string hits any abnormal log record, it is determined that there is an abnormal log record in the log string.

3. The method according to claim 1 or 2, characterized in that, The baseboard management controller is connected with a target serial port of the electronic device, and the electronic device is configured to send the log string corresponding to the kernel log of the operating system to the outside through the target serial port; The acquisition of the log string corresponding to the kernel log of the operating system in the electronic device through the interface connected with the electronic device comprises the following steps: monitoring the target serial port and receiving the log string sent by the electronic device through the target serial port.

4. The method of claim 3, wherein, The reporting of the kernel exception alarm to the monitoring platform through the private network comprises the following steps: reporting the kernel exception alarm to the monitoring platform through the private network, and uploading a context log string corresponding to the log string with the abnormal log record to the monitoring platform.

5. The method according to claim 1 or 2, characterized in that, The baseboard management controller is connected with a VGA interface of the electronic device, the VGA interface is used for outputting a display image, and the display image contains at least one line of kernel log; The acquisition of the log string corresponding to the kernel log of the operating system in the electronic device through the interface connected with the electronic device comprises the following steps: capturing the display image output by the VGA interface of the electronic device to obtain an image frame; identifying the log string corresponding to the kernel log contained in the image frame based on an OCR algorithm.

6. The method of claim 5, wherein, The identification of the log string corresponding to the kernel log contained in the image frame based on the OCR algorithm comprises the following steps: reducing the image resolution of the image frame and performing a binarization processing on the image frame with reduced resolution to obtain a processing frame; identifying the log string corresponding to the kernel log contained in the processing frame based on the OCR algorithm.

7. The method of claim 5, wherein, The reporting of the kernel exception alarm to the monitoring platform through the private network comprises the following steps: reporting the kernel exception alarm to the monitoring platform through the private network, and uploading a context image frame corresponding to the image frame with the abnormal log record to the monitoring platform.

8. A server kernel exception monitoring apparatus, characterized by comprising: The server comprises a baseboard management controller and an electronic device carrying an operating system, the baseboard management controller is electrically connected with an interface on the electronic device, and the baseboard management controller is connected to a monitoring platform through a private network, the device is configured in the baseboard management controller, and comprises: A log acquisition module is configured to acquire a log string corresponding to a kernel log of the operating system in the electronic device through an interface connected with the electronic device; An abnormality identification module is configured to identify whether there is an abnormal log record in the log string; An abnormality alarm module is configured to report a kernel abnormality alarm to the monitoring platform through the private network when there is an abnormal log record in the log string, wherein the private network and the network of the server are in different network segments.

9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processing device to implement the method in any one of claims 1-7.

10. A server, characterized by Comprise: An electronic device carrying an operating system; A baseboard management controller connected with an interface on the electronic device and connected to a monitoring platform through a private network, which is used to implement the method in any one of claims 1-7 to monitor the abnormality of the operating system kernel in the electronic device.

Citation Information

Patent Citations

  • An abnormality information display method and a substrate management controller

    CN109344041A

  • Information recording method, management equipment and storage medium

    CN112565514A