Substrate management controller process monitoring method and electronic equipment

By monitoring the correlation strength between the number of file handles and CPU usage, combined with the contextual information of the baseboard management controller process, the problem of the inability to timely detect handle growth anomalies in the existing technology is solved, and high-accuracy anomaly detection and rapid fault repair are achieved.

CN120743684AActive Publication Date: 2025-10-03INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511223359.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2025-10-03
Estimated Expiration
2045-08-29

AI Technical Summary

Technical Problem

The existing technology is unable to promptly detect abnormal handle growth of the baseboard management controller process and is unable to locate code-level leaks, resulting in resource exhaustion and service crashes.

Method used

By monitoring the correlation strength between the number of file handles and CPU usage at multiple sampling moments, the growth trend of file handles is analyzed. Combined with the context information of the baseboard management controller process, the abnormal code path is determined to improve the accuracy of process abnormality judgment.

Benefits of technology

It enables timely detection of handle leaks, reduces system downtime, improves the accuracy of process anomaly judgment and business continuity, and avoids false positives and missed reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120743684A_ABST
    Figure CN120743684A_ABST
Patent Text Reader

Abstract

The invention discloses a substrate management controller process monitoring method and electronic equipment, and relates to the technical field of servers, and the method comprises the steps: analyzing the increase trend of file handles by monitoring the number of file handles at a plurality of sampling moments, and analyzing the association strength between the increase trend of the file handles and the utilization rate of a central processing unit; according to the association strength, the number of file handles at multiple sampling moments and the utilization rate of a central processing unit, the process abnormity of the substrate management controller is judged, the accuracy of process abnormity judgment can be improved, and the problem of large-amplitude or sudden increasing handle leakage in a short time due to overlong sampling interval can be avoided to a certain extent; under the condition that the substrate management controller process is determined to be abnormal, the specific abnormal code path is positioned according to the context information of the substrate management controller process, so that the troubleshooting time is shortened, the service does not need to be stopped or restarted, and the service continuity is not influenced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server technology, and in particular to a method for monitoring a baseboard management controller process and an electronic device. Background Art

[0002] In a BMC (Baseboard Management Controller) system, some background service processes may experience resource leaks (such as handle leaks) after running for a long time, leading to a continuous increase in file descriptors. This can eventually exhaust system resources and cause service unavailability or crashes. However, related technologies can only take periodic snapshots of the file descriptor directory of the current BMC process, making it impossible to detect abnormal handle growth in a timely manner or locate leaks at the code level. Summary of the Invention

[0003] The present application provides a method and electronic device for monitoring a baseboard management controller process, so as to at least solve the problem in the related art that abnormal handle growth cannot be discovered in time and code-level leak location cannot be performed.

[0004] The present application provides a method for monitoring a baseboard management controller process, which is applied to a baseboard management controller, and includes the following steps: obtaining central processing unit (CPU) usage and the number of file handles in a process file descriptor directory at multiple collection moments; determining file handle growth information at the multiple collection moments based on the number of file handles in the process file descriptor directory at the multiple collection moments; determining the strength of correlation between the file handle growth information and the CPU usage based on the file handle growth information and the CPU usage at the multiple collection moments; and, when it is determined that the baseboard management controller process is abnormal based on the strength of correlation, the file handle growth information at the multiple collection moments, and the CPU usage, determining an abnormal code path based on context information of the baseboard management controller process to monitor the baseboard management controller process.

[0005] The present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the aforementioned baseboard management controller process monitoring method is implemented.

[0006] This application analyzes the growth trend of file handles by monitoring the number of file handles at multiple sampling moments, and analyzes the correlation strength between the growth trend of file handles and the CPU usage rate. The baseboard management controller process abnormality is judged based on the correlation strength, the number of file handles at multiple sampling moments, and the CPU usage rate. This can improve the accuracy of process abnormality judgment, and to a certain extent avoid missing the problem of large or sudden handle leakage in a short period of time due to too long sampling intervals. When the baseboard management controller process abnormality is determined based on the file handle growth information, the specific abnormal code path is located based on the context information of the baseboard management controller process, which reduces the troubleshooting time and does not require stopping or restarting the service, and does not affect business continuity. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0008] Figure 1 Schematic diagram of a method for monitoring a baseboard management controller process in the related art according to some embodiments of the present application; Figure 2 is a flowchart of a method for monitoring a baseboard management controller process according to some embodiments of the present application; Figure 3 is a block diagram of a monitoring system for a baseboard management controller process according to some embodiments of the present application; Figure 4 is a block diagram of a monitoring system for a baseboard management controller process according to other embodiments of the present application; Figure 5 is a block diagram of an electronic device according to some embodiments of the present application. DETAILED DESCRIPTION

[0009] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0010] It should be noted that, in the description of the present application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second" and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. In order to enable those skilled in the art to better understand the present application scheme, the present application is further described in detail below in conjunction with the accompanying drawings and specific embodiments. In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the monitoring method of the baseboard management controller process depends, the specific application environment architecture or specific hardware architecture is described here.

[0011] The following describes in detail a method for monitoring a baseboard management controller process and an electronic device according to an embodiment of the present application with reference to the accompanying drawings.

[0012] With the continuous expansion of massive servers and edge devices, system reliability and availability have become core requirements in data centers and industrial control scenarios. As the "gatekeeper" of the server platform, the BMC undertakes key functions such as hardware monitoring, firmware management, and remote operation and maintenance. In recent years, the open source firmware project OpenBMC, based on Linux (an operating system), D-Bus (Desktop Bus), and Redfish (an open standard developed by the Distributed Management Task Force), has rapidly developed and gained widespread adoption, providing an open and scalable underlying platform for centralized management and intelligent operation and maintenance of heterogeneous hardware. Initial BMCs were mostly based on the Intelligent Platform Management Interface (IPMI), which could only monitor a few hardware metrics such as server temperature, voltage, and fan speed. Subsequently, the industry promoted the Redfish standard, which replaced IPMI with a RESTful API + JSON (Representational State Transfer Application Programming Interface + JavaScript Object Notation) format, expanding its functionality and facilitating integration with upper-layer cloud platforms. With the widespread adoption of containerization and microservices, time series databases and visualization platforms have emerged, enabling multi-dimensional, customizable metric collection and display. However, process-level resource leaks (especially the continued growth of file handles) still rely heavily on periodic sampling using general-purpose monitoring agents.

[0013] For example, in related technologies, an external script or lightweight monitoring agent is usually deployed, such as a collectd (an open source system performance data collection tool) plug-in, which takes a periodic snapshot of the file descriptor directory of the baseboard management controller process, writes the result into a log, and sends it to the monitoring system. Figure 1 , specifically including the following steps: First, a sampling script, such as the operating system's cron (a scheduled task scheduling tool) or a lightweight monitoring agent, takes periodic discrete snapshots (for example, every 5 minutes) of the baseboard management controller process's file descriptor directory (for example, / proc / [pid] / fd). It then reads the number of entries in the / proc / [pid] / fd directory, which represents the total number of file descriptors opened by the current process. This number is then written to a local log or sent to a time series database via HTTP Push (client-side push) or the Grafana Agent (a monitoring agent) interface. Finally, the total number of file descriptors opened by the current process is compared with a preset threshold. If the total number of file descriptors exceeds the preset threshold, an email, SNMP Trap (Simple Network Management Protocol Trap), or AlertManager notification is sent.

[0014] However, the sampling interval for the number of file handles is fixed and long, making it difficult to capture large or sudden handle leaks in a short period of time. Manually set thresholds are difficult to adapt to different modules or different operating stages, and are prone to false positives or missed reports. As a result, it is impossible to detect abnormal handle growth trends in a timely manner, and it is impossible to locate code-level leaks.

[0015] Based on this, the present application analyzes the growth trend of file handles by monitoring the number of file handles at multiple sampling moments, and analyzes the correlation strength between the growth trend of file handles and the CPU usage rate. The baseboard management controller process abnormality is judged based on the correlation strength, the number of file handles at multiple sampling moments, and the CPU usage rate. This can improve the accuracy of process abnormality judgment, and to a certain extent avoid missing the problem of large or sudden handle leakage in a short period of time due to too long sampling intervals. When it is determined that the baseboard management controller process is abnormal, the specific abnormal code path is located according to the context information of the baseboard management controller process, which reduces the troubleshooting time and does not require stopping or restarting the service, and does not affect business continuity.

[0016] Figure 2 FIG. 1 is a flow chart of a method for monitoring a baseboard management controller process according to some embodiments of the present application. Figure 2The method for monitoring the baseboard management controller process of the embodiment of the present application may include the following steps: S110, obtaining CPU usage and the number of file handles in the process file descriptor directory at multiple collection moments.

[0017] Specifically, a timer, such as an Asio timer, can be used to periodically execute Linux file I / O to collect the number of file handles in the process file descriptor directory at multiple collection points. For example, in the BMC Web UI (Baseboard Management Controller Web User Interface), the user can select the BMC process identifier, such as the process name or PID (Process Identifier), and configure a sampling period for the selected BMC process (e.g., 1 second). Once configured, the timer is started to read the number of file handles in the process file descriptor directory every 1 second, record the timestamp, and store the file handle count and timestamp in a pre-set time series database, such as InfluxDB (Influx Database) or lightweight SQLite (a database). Accordingly, system commands, such as top, can be used to poll and obtain the CPU usage at the corresponding collection point.

[0018] In this way, the configurable second-level sampling period monitors the number of file handles in the process file descriptor directory in real time, so that frame-sent, short-term leakage bursts can also be accurately captured. This can to a certain extent avoid the risk of missed detection in periodic snapshots, and thus effectively prevent system call failures and process crashes caused by the rapid exceeding of the handle number limit.

[0019] S120 , determining file handle growth information at multiple collection moments based on the number of file handles in the process file descriptor directory at multiple collection moments.

[0020] Specifically, each time the number of file handles count_i in the process file descriptor directory at the current collection moment is stored in the database, the file handle growth information at the collection moment can be determined based on the number of file handles in the process file descriptor directory at the current collection moment and the number of file handles in the process file descriptor directory at the previous collection moment. For example, the number of file handles in the process file descriptor directory at the current collection moment and the number of file handles in the process file descriptor directory at the previous collection moment can be input into a preset formula to output the file handle growth rate at the current collection moment, thereby determining the file handle growth information at multiple collection moments.

[0021] S130 , determining the correlation strength between the file handle growth information and the CPU usage rate based on the file handle growth information and the CPU usage rate at multiple collection moments.

[0022] Specifically, to determine the strength of the correlation between file handle growth information and CPU usage, after each predetermined number (e.g., five) of file handle growth information and CPU usage is collected, the strength of the correlation between the file handle growth information and CPU usage is determined based on the predetermined number of file handle growth information and CPU usage. For example, the file handle growth information and CPU usage at the five collected moments can be input into a predetermined formula to output the strength of the correlation between the file handle growth information and CPU usage. S140 , when it is determined that the BMC process is abnormal based on the correlation strength, the file handle growth information at multiple acquisition moments, and the CPU usage, determine an abnormal code path based on the context information of the BMC process to monitor the BMC process.

[0023] Specifically, after determining the correlation strength, the file handle growth information at multiple collection moments, and the CPU usage rate, it is possible to determine whether the baseboard management controller process is abnormal based on the correlation strength, the file handle growth information at multiple collection moments, and the CPU usage rate. For example, the average of the file handle growth information at multiple collection moments and the average of the CPU usage rates at multiple collection moments are calculated. When multiple of the correlation strength, the average of the file handle growth information at multiple collection moments, and the average of the CPU usage rates at multiple collection moments are greater than corresponding thresholds, it is determined that the baseboard management controller process is abnormal.

[0024] If a BMC process is determined to be abnormal, a snapshot acquisition interface is called to collect contextual information of the BMC process, such as the BMC process's call stack table and file descriptor list. Based on the BMC process's call stack table and file descriptor list, an abnormal code path is determined. For example, if the call stack table determines that the currently executing function is performing a file path open operation, and the file descriptor list determines that the number of times a file path is opened continues to increase, then the function chain in the call stack table can be determined to be an abnormal code path.

[0025] This application analyzes the growth trend of file handles by monitoring the number of file handles at multiple sampling moments, and analyzes the correlation strength between the growth trend of file handles and the CPU usage rate. The baseboard management controller process abnormality is judged based on the correlation strength, the number of file handles at multiple sampling moments, and the CPU usage rate. This can improve the accuracy of process abnormality judgment, and to a certain extent avoid missing the problem of large or sudden handle leakage in a short period of time due to too long sampling intervals. When it is determined that the baseboard management controller process is abnormal, the specific abnormal code path is located according to the context information of the baseboard management controller process, which reduces the troubleshooting time and does not require stopping or restarting the service, and does not affect business continuity. In some embodiments, the file handle growth information includes a file handle growth rate, and the correlation strength between the file handle growth information and the CPU usage rate is determined based on the file handle growth information and the CPU usage rate at multiple collection moments, including: respectively calculating the mean of the file handle growth rate and the mean of the CPU usage rate; determining the file handle growth rate deviation at multiple collection moments based on the difference between the file handle growth rate at multiple collection moments and the mean of the file handle growth rate; determining the CPU usage rate deviation at multiple collection moments based on the difference between the CPU usage rate at multiple collection moments and the mean of the CPU usage rate; determining the correlation strength between the file handle growth information and the CPU usage rate based on the file handle growth rate deviation at multiple collection moments and the CPU usage rate deviation at multiple collection moments.

[0026] In some embodiments, based on the file handle growth rate deviations at multiple collection moments and the central processing unit usage deviations at multiple collection moments, the correlation strength between the file handle growth information and the central processing unit usage is determined, including: determining the product of the square root of the sum of the squares of the file handle growth rate deviations at multiple collection moments and the square root of the sum of the squares of the central processing unit usage deviations at multiple collection moments as a first product; determining the sum of the products of the file handle growth rate deviations at multiple collection moments and the central processing unit usage deviations at corresponding collection moments as a first sum value; and determining the correlation strength between the file handle growth information and the central processing unit usage based on the ratio between the first sum value and the first product.

[0027] In an embodiment of the present application, the determination of the correlation strength between the file handle growth information and the CPU usage rate based on the file handle growth information and the CPU usage rate at five collection moments is taken as an example for illustration, but this is not a limitation of the present application. That is, every time five file handle growth information and CPU usage rates are collected, the correlation strength between the file handle growth information and the CPU usage rate is calculated once, and then whether the process is abnormal is judged based on the correlation strength.

[0028] For example, after obtaining the file handle growth rate and CPU usage rate from the first to the fifth collection time, the obtained data is preprocessed, for example, by checking the data's integrity and consistency and removing obviously erroneous or unreasonable data points to remove noise and outliers in the collected data and ensure data quality. Assume that the file handle growth rates from the first to the fifth collection time after preprocessing are 12%, 15%, 18%, 20%, and 22%, respectively. Accordingly, the CPU usage rates from the first to the fifth collection time are 60%, 65%, 70%, 75%, and 80%, respectively.

[0029] The average file handle growth rate calculated for the five data collection moments is 17.4%, and the average CPU usage calculated for the five data collection moments is 70%.

[0030] The deviations between the file handle growth rates at multiple collection moments and the mean of the file handle growth rates were -5.4%, -2.4%, 0.6%, 2.6%, and 4.6%, respectively. The deviations between the CPU usage rates at multiple collection moments and the mean of the CPU usage rates were -10%, -5%, 0%, 5%, and 10%, respectively.

[0031] The sum of the products of the deviations of the file handle growth rates at the five collection moments and the deviations of the CPU usage rates at the corresponding collection moments is calculated to be 0.125, that is, the first sum value is determined to be 1.5568%.

[0032] The square root of the sum of the squares of the deviations of the file handle growth rates at the five acquisition moments is calculated as =0.0795.

[0033] The square root of the sum of the squares of the CPU usage deviations at the five sampling moments is calculated as =0.025.

[0034] The product of the square root of the sum of the squares of the deviations of the file handle growth rates at the five collection moments and the square root of the sum of the squares of the deviations of the CPU usage rates at the five collection moments is 0.0795×0.025=0.01256.

[0035] The ratio between the first sum and the first product is calculated to be 9.95, thereby determining that the correlation strength between the file handle growth information and the CPU usage is 9.95.

[0036] In this way, by determining the correlation strength between the file handle growth information and the CPU usage, the accuracy of process abnormality monitoring can be improved.

[0037] In some embodiments, the file handle growth information includes a file handle growth rate. The file handle growth information at multiple collection moments is determined based on the number of file handles in the process file descriptor directory at multiple collection moments, including: determining the number of file handle growth at multiple collection moments based on the difference between the number of file handles in the process file descriptor directory at multiple collection moments and the number of file handles in the process file descriptor directory at the corresponding previous collection moment; and determining the file handle growth rate at multiple collection moments based on the ratio between the number of file handle growth at multiple collection moments and the number of file handles in the process file descriptor directory at the corresponding previous collection moment.

[0038] For example, the difference between the number of file handles in the process file descriptor directory at the current collection time and the number of file handles in the process file descriptor directory at the previous collection time can be calculated; this difference is the file handle growth rate at the current collection time. Furthermore, the ratio of the file handle growth rate at the current collection time to the number of file handles in the process file descriptor directory at the previous collection time can be calculated; this ratio is the file handle growth rate at the current collection time. Similarly, the file handle growth rate can be calculated for multiple collection times.

[0039] In this way, by calculating the file handle growth rate to analyze the growth trend of the file handles, it is possible to more accurately determine whether the baseboard management controller process is abnormal.

[0040] In some embodiments, the file handle growth information includes a file handle growth rate, and determining a baseboard management controller process abnormality based on correlation strength, file handle growth information at multiple acquisition moments, and central processing unit utilization includes: calculating the average of the file handle growth rate and the average of the central processing unit utilization; determining a process abnormality coefficient based on the average of the file handle growth rate, the average of the central processing unit utilization, and the correlation strength; and determining a baseboard management controller process abnormality when the process abnormality coefficient is greater than a preset process abnormality coefficient threshold. The preset process abnormality coefficient threshold can be calibrated based on actual conditions, and the user can configure the aforementioned weight coefficient in the BMC Web UI, without specific limitations herein.

[0041] Specifically, after calculating the correlation strength, the mean of the file handle growth rate, and the mean of the CPU usage rate, the correlation strength, the mean of the file handle growth rate, and the mean of the CPU usage rate can be input into a preset formula or a preset model to output a process abnormality coefficient. Furthermore, the process abnormality coefficient is compared with a preset process abnormality coefficient threshold to determine whether the baseboard management controller process is abnormal. For example, if the process abnormality coefficient is greater than the preset process abnormality coefficient threshold, the baseboard management controller process is determined to be abnormal; if the process abnormality coefficient is less than or equal to the preset process abnormality coefficient threshold, the baseboard management controller process is determined to be normal.

[0042] In some embodiments, a process abnormality coefficient is determined based on the mean of the file handle growth rate, the mean of the CPU usage rate, and the correlation strength, including: determining the process abnormality coefficient based on the sum of the products of the mean of the file handle growth rate, the mean of the CPU usage rate, and the correlation strength and the corresponding weight coefficients. The weight coefficients corresponding to the mean of the file handle growth rate, the mean of the CPU usage rate, and the correlation strength can be calibrated according to actual conditions. For example, the first weight coefficient corresponding to the mean of the file handle growth rate is 0.4, the second weight coefficient corresponding to the mean of the CPU usage rate is 0.3, and the third weight coefficient corresponding to the correlation strength is 0.3. The user can configure the above weight coefficients in the BMC Web UI, and no specific restrictions are imposed here.

[0043] For example, the average value of the file handle growth rate, the average value of the CPU usage rate, the correlation strength, and the corresponding weight coefficient may be input into the following formula to calculate the process abnormality coefficient: Process abnormality coefficient = (mean of file handle growth rate × first weight coefficient) + (mean of CPU usage × second weight coefficient) + (association strength × third weight coefficient).

[0044] In this way, by comprehensively considering the file handle growth rate, the CPU usage rate and their correlation strength and calculating the process abnormality coefficient accordingly, it is possible to effectively and accurately identify whether the baseboard management controller process has an abnormality.

[0045] In some embodiments, the file handle growth information includes the file handle growth rate, and the baseboard management controller process abnormality is determined based on the association strength, the file handle growth information at multiple acquisition moments, and the central processing unit usage rate, including: calculating the average of the file handle growth rate and the average of the central processing unit usage rate; when multiple of the association strength, the average of the file handle growth rate, and the average of the central processing unit usage rate are greater than the corresponding preset thresholds, determining that the baseboard management controller process is abnormal.

[0046] Specifically, after calculating the correlation strength, the mean of the file handle growth rate, and the mean of the CPU usage, the correlation strength, the mean of the file handle growth rate, and the mean of the CPU usage can also be compared with corresponding thresholds to determine whether the baseboard management controller process is abnormal. For example, if two or three of the correlation strength, the mean of the file handle growth rate, and the mean of the CPU usage are greater than the corresponding threshold, then the baseboard management controller process is determined to be abnormal; if only one of the correlation strength, the mean of the file handle growth rate, and the mean of the CPU usage is greater than the corresponding threshold, or if the correlation strength, the mean of the file handle growth rate, and the mean of the CPU usage are all less than or equal to the corresponding threshold, then the baseboard management controller process is determined to be normal.

[0047] For example, the association strength can be compared with a preset association strength threshold, the mean file handle growth rate can be compared with a preset file handle growth rate threshold, and the mean CPU usage can be compared with a preset CPU usage threshold. If the association strength is greater than the preset association strength threshold, the mean file handle growth rate is greater than the preset file handle growth rate threshold, and the mean CPU usage is greater than the preset CPU usage threshold, then a baseboard management controller process abnormality is determined. The preset association strength threshold, the preset file handle growth rate threshold, and the CPU usage threshold can all be calibrated based on actual conditions. Users can configure these thresholds in the BMC Web UI, and no specific restrictions are set here.

[0048] In this way, by comprehensively analyzing the file handle growth rate and CPU usage rate at multiple collection moments, calculating their averages respectively, and combining the correlation strength, it is possible to quickly and accurately determine whether the baseboard management controller process is abnormal. When multiple key indicators exceed the preset thresholds at the same time, the process abnormality is quickly determined, avoiding the problem of misjudgment of a single indicator. This not only improves the accuracy of anomaly detection, reduces the possibility of false alarms and missed alarms, but also significantly improves the detection speed.

[0049] In some embodiments, the number of file handles in the process file descriptor directory, the process memory usage, the CPU usage, the number of threads, and the number of context switches at multiple collection moments can also be obtained; the file handle growth information at multiple collection moments is determined based on the number of file handles in the process file descriptor directory at multiple collection moments; the correlation strength between the file handle growth information and the process memory usage, the CPU usage, the number of threads, and the number of context switches at multiple collection moments is determined respectively; and the baseboard management controller process abnormality is determined based on the correlation strength, the process memory usage, the CPU usage, the number of threads, and the number of context switches at multiple collection moments.

[0050] Specifically, process memory usage, CPU utilization, number of threads, and number of context switches at multiple collection points can be polled using system commands such as top. File handle growth information can be represented by the file handle growth rate. The correlation strength between the file handle growth rate and process memory usage, number of threads, and number of context switches is determined in the same way as the correlation strength between file handle growth information and CPU utilization, so this section will not be elaborated on here.

[0051] The mean of the file handle growth rate, the mean of the process memory usage, the mean of the CPU utilization, the mean of the number of threads, and the mean of the number of context switches are calculated respectively. Based on the mean of the file handle growth rate, the mean of the process memory usage, the mean of the CPU utilization, the mean of the number of threads, and the mean of the number of context switches, and the sum of the product of the strength of the correlation between the file handle growth information and the process memory usage, the number of threads, and the number of context switches and the corresponding weight coefficients, a process abnormality coefficient is determined. If the process abnormality coefficient is greater than a preset process abnormality coefficient threshold, it is determined that the baseboard management controller process is abnormal; otherwise, it is determined that the baseboard management controller process is not abnormal.

[0052] In this way, by collecting multiple key system indicators (including the number of file handles, process memory usage, CPU utilization, number of threads, number of context switches, etc.) and calculating their averages, and at the same time determining the correlation strength between file handle growth information and each indicator, the status of the baseboard management controller process can be evaluated more comprehensively and accurately. By introducing weight coefficients and comprehensively calculating the process anomaly coefficients, not only the accuracy of anomaly detection is improved, the problem of misjudgment of a single indicator is avoided, but also the flexibility and adaptability of detection are enhanced.

[0053] In some embodiments, the file handle growth information also includes the number of file handle increases and the file handle growth rate. A baseboard management controller process abnormality may also be determined based on the file handle growth information, including: determining a baseboard management controller process abnormality when the number of file handle increases is greater than a preset file handle increment threshold, and / or the file handle growth rate is greater than a preset file handle growth rate threshold. The preset file handle increment threshold and the preset file handle growth rate threshold may be calibrated based on actual conditions and are not specifically limited herein. Furthermore, users may configure the preset file handle increment threshold and the preset file handle growth rate threshold for a process in the BMC Web UI.

[0054] Specifically, the number of file handle increases can be compared with a preset file handle increment threshold to determine whether the baseboard management controller process is abnormal. For example, if the number of file handle increases is greater than the preset file handle increment threshold, it indicates that the number of file handles at the current collection time has increased significantly compared to the number of file handles at the previous collection time, and the baseboard management controller process is determined to be abnormal. If the number of file handle increases is less than or equal to the preset file handle increment threshold, the baseboard management controller process is determined to be normal.

[0055] Alternatively, the file handle growth rate can be compared with a preset file handle growth rate threshold to determine whether the baseboard management controller process is abnormal. For example, if the file handle growth rate is greater than the preset file handle growth rate threshold, it indicates that the number of file handles at the current collection time is increasing too quickly, and the baseboard management controller process is determined to be abnormal. If the file handle growth rate is less than or equal to the preset file handle growth rate threshold, the baseboard management controller process is determined to be normal.

[0056] Alternatively, the number of file handle increases may be compared with a preset file handle increment threshold, and the file handle increase rate may be compared with a preset file handle increase rate threshold to determine whether the baseboard management controller process is abnormal. For example, if the number of file handle increases is greater than the preset file handle increment threshold, and the file handle increase rate is greater than the preset file handle increase rate threshold, it indicates that the number of file handles at the current acquisition time has increased too much compared to the number of file handles at the previous acquisition time, and the number of file handles at the current acquisition time has increased too quickly, and the baseboard management controller process is determined to be abnormal. If one or both of the number of file handle increases and the file handle increase rate are less than or equal to the corresponding threshold, the baseboard management controller process is determined to be normal.

[0057] In this way, by monitoring the growth number and growth rate of file handles, and combining the preset file handle increment threshold and file handle growth rate threshold for anomaly judgment, file handle anomalies in the baseboard management controller process can be detected quickly and accurately, thereby better adapting to the characteristics of different operating stages and modules, significantly improving the accuracy and adaptability of anomaly detection, and providing more reliable technical support for server operation and maintenance management.

[0058] In addition, a first average of the number of file handle increases at multiple times and a second average of the file handle growth rate at multiple times can be determined. If the first average is greater than a preset file handle increment threshold and / or the second average is greater than a preset file handle growth rate threshold, a baseboard management controller process anomaly is determined. This can further improve the accuracy of baseboard management controller process anomaly determinations.

[0059] In some embodiments, the context information of the baseboard management controller process includes a call stack table and a file descriptor list of the baseboard management controller process, and determining the abnormal code path based on the context information of the baseboard management controller process includes: determining the collection time of the context information of the baseboard management controller process, and obtaining a log table corresponding to the collection time; when the currently executed function in the call stack table is executing a file path opening operation, and the number of times the file path in the file descriptor list is opened continues to increase, and the log table records a duplicate opening error of the file path, determining that the function chain corresponding to the currently executed function in the call stack table is the abnormal code path.

[0060] Specifically, the context information of the baseboard management controller process includes the baseboard management controller process's call stack table and file descriptor list. The baseboard management controller process's call stack table includes the operations being performed by the currently executing function. The file descriptor list includes the file descriptor number (i.e., file handle number), the file path corresponding to each file descriptor number, for example, each file descriptor in the / proc / [pid] / fd directory is linked to the actual file path, and the file open mode flag for each file descriptor (e.g., read-only, write-only, read-write). To further improve the accuracy of determining the abnormal code path, the collection time of the baseboard management controller process's context information can be determined, and the log table corresponding to the collection time, or a time close to the collection time, can be read. The log table includes error entries at the collection time, or error entries at a time close to the collection time, such as file path open errors. The abnormal code path is determined based on the baseboard management controller process's call stack table, file descriptor list, and error entries in the log table that include the collection time, or error entries at a time close to the collection time.

[0061] For example, when the currently executing function in the call stack table is performing a file path opening operation, and the number of times a file path in the file descriptor list is opened continues to increase, and the error entry in the log table shows a file path repeated opening error, it can be analyzed that the function chain corresponding to the currently executing function in the call stack table of the baseboard management controller process is an abnormal code path.

[0062] In this way, if the baseboard management controller process is determined to be abnormal, a call stack table and file descriptor list snapshot of the process is automatically triggered without stopping or restarting the service, which does not affect business continuity. At the same time, combined with the system log table correlation analysis, the code module and function call path that caused the handle leak are accurately locked, greatly shortening the problem location and repair time.

[0063] In some embodiments, the above method further includes: generating an alarm message and sending it to an external terminal device when it is determined that the baseboard management controller process is abnormal.

[0064] Specifically, when it is determined that the baseboard management controller process is abnormal, an alarm message is generated, such as "The current baseboard management controller process is abnormal", and combined with multiple output channels such as Redfish Event, email or SNMP Trap, it is sent to the terminal device through D-Bus, such as the maintenance personnel's computer or mobile phone.

[0065] In addition, you can set an alarm frequency limit. For the same type of alarm, it will only be sent once within a certain time interval (such as every 5 minutes) to avoid sending the same alarm repeatedly in a short period of time, or multiple alarms of the same type can be merged into one alarm message to reduce the number of alarms.

[0066] In some embodiments, the above method further includes: generating a file handle change curve graph according to the file handle growth quantity and file handle growth rate at multiple acquisition moments, and storing and displaying the file handle change curve graph.

[0067] Specifically, the system continuously collects and stores the number of file handles and the file handle growth rate at each collection moment, storing them in a time series database. A sliding window algorithm is then used to dynamically plot a file handle change curve. Operations and maintenance personnel can view this curve by accessing the Dashboard in the BMC's web management interface. The curve is also stored in a preset storage location in PNG (Portable Network Graphics), SVG (Scalable Vector Graphics), or JSON (JavaScript Object Notation) format. This provides a visual representation of how the number of file handles changes over time.

[0068] In some embodiments, the above method further includes: displaying abnormal code paths and warning information.

[0069] Specifically, operation and maintenance personnel can view abnormal code paths and alarm information by accessing the Dashboard in the BMC web management interface.

[0070] In addition, the BMC's web management interface also provides "Reload Configuration", "Restart Process" or "Manual Recycle" buttons to support quick intervention by operation and maintenance personnel.

[0071] In this way, the Dashboard in the BMC's web management interface uniformly presents file handle change curves, abnormal code paths, and alarm information, and provides "one-click process restart" and "trigger resource recovery" buttons, allowing operations and maintenance to intervene directly on the interface without logging into the command line or relying on external tools. The cooling strategy is combined with multiple alarm channels (Redfish Event, email, SNMP Trap) to avoid alarm storms to a certain extent and ensure that abnormal information is delivered in a timely manner.

[0072] In summary, this application can intervene in the OpenBMC daemon before resources are exhausted, significantly reducing the number of service interruptions caused by file handle leaks, and accelerating fault repair based on abnormal code paths, reducing the mean time to recovery after system downtime, and improving the overall availability of data centers or edge devices.

[0073] In some embodiments, reference Figure 3 ,The monitoring system of the baseboard management controller process includes : an ,acquisition module, an analysis module and a root cause tracing module.

[0074] Among them, the acquisition module 210 is used to obtain the CPU usage rate and the number of file handles in the process file descriptor directory at multiple acquisition times. The analysis module 220 is used to determine the file handle growth information at multiple acquisition times based on the number of file handles in the process file descriptor directory at multiple acquisition times, determine the correlation strength between the file handle growth information and the CPU usage rate based on the file handle growth information at multiple acquisition times, and determine the baseboard management controller process abnormality based on the correlation strength, the file handle growth information at multiple acquisition times, and the CPU usage rate. The root cause tracing module 230 is used to determine the abnormal code path based on the context information of the baseboard management controller process to monitor the baseboard management controller process when the baseboard management controller process abnormality is determined based on the correlation strength, the file handle growth information at multiple acquisition times, and the CPU usage rate.

[0075] According to one embodiment of the present application, the file handle growth information includes the file handle growth rate, and the analysis module 220 is specifically used to calculate the mean of the file handle growth rate and the mean of the central processing unit usage rate; determine the file handle growth rate deviation at multiple collection moments based on the difference between the file handle growth rate at multiple collection moments and the mean of the file handle growth rate; determine the central processing unit usage deviation at multiple collection moments based on the difference between the central processing unit usage at multiple collection moments and the mean of the central processing unit usage rate; determine the correlation strength between the file handle growth rate deviation at multiple collection moments and the central processing unit usage rate deviation at multiple collection moments.

[0076] According to one embodiment of the present application, the analysis module 220 is specifically used to determine the product of the square root of the sum of the squares of the file handle growth rate deviations at multiple collection moments and the square root of the sum of the squares of the central processing unit usage deviations at multiple collection moments as a first product; determine the sum of the products of the file handle growth rate deviations at multiple collection moments and the central processing unit usage deviations at the corresponding collection moments as a first sum value; and determine the correlation strength between the file handle growth information and the central processing unit usage based on the ratio between the first sum value and the first product.

[0077] According to one embodiment of the present application, the analysis module 220 is specifically used to calculate the mean of the file handle growth rate and the mean of the central processing unit usage; determine the process abnormality coefficient based on the mean of the file handle growth rate, the mean of the central processing unit usage and the correlation strength; when the process abnormality coefficient is greater than the preset process abnormality coefficient threshold, determine that the baseboard management controller process is abnormal.

[0078] According to one embodiment of the present application, the analysis module 220 is specifically used to determine the process abnormality coefficient based on the average of the file handle growth rate, the average of the CPU usage rate, and the sum of the product of the correlation strength and the corresponding weight coefficient.

[0079] According to one embodiment of the present application, the analysis module 220 is further used to determine the number of file handle increases at multiple collection moments based on the difference between the number of file handles in the process file descriptor directory at multiple collection moments and the number of file handles in the process file descriptor directory at the corresponding previous collection moment; and determine the file handle growth rate at multiple collection moments based on the ratio between the number of file handle increases at multiple collection moments and the number of file handles in the process file descriptor directory at the corresponding previous collection moment.

[0080] According to one embodiment of the present application, the analysis module 220 is further configured to generate a file handle change curve graph based on the number of file handle increases and the file handle growth rate at multiple acquisition moments.

[0081] According to one embodiment of the present application, the context information of the baseboard management controller process includes a call stack table and a file descriptor list of the baseboard management controller process. The root cause tracing module 230 is specifically used to determine the collection time of the context information of the baseboard management controller process and obtain the log table corresponding to the collection time; when the currently executed function in the call stack table is executing a file path opening operation, and the number of times the file path in the file descriptor list is opened continues to increase, and there is a repeated opening error in the file path recorded in the log table, it is determined that the function chain corresponding to the currently executed function in the call stack table is an abnormal code path.

[0082] As a specific example, see Figure 4 The baseboard management controller process monitoring system of the present application further includes a configuration module 240 , a storage module 250 , an alarm module 260 and a display module 270 .

[0083] Among them, the configuration module 240 is used to provide a RESTful interface, allowing the client to interact with the baseboard management controller through HTTP requests. Operation and maintenance personnel can configure the baseboard management controller processes that need to be monitored, the sampling period of the baseboard management controller processes, the preset process abnormality coefficient threshold, the preset file handle increment threshold, the preset file handle growth rate threshold, the first weight coefficient corresponding to the mean of the file handle growth rate, the second weight coefficient corresponding to the mean of the CPU usage rate, and the third weight coefficient corresponding to the association strength through the BMC Web UI.

[0084] The storage module 250 is used to store the number of file handles and timestamps in the process file descriptor directory at each collection moment, wherein the storage module 250 may be a time series database, such as InfluxDB or lightweight SQLite.

[0085] Alarm module 260 is used to generate an alarm message and send it to an external terminal device when a BMC process anomaly is determined. For example, if a BMC process anomaly is determined, an alarm message, such as "Current BMC process anomaly," is generated and sent to a terminal device, such as a maintenance personnel's computer or mobile phone, via D-Bus using multiple output channels, such as Redfish Event, email, and SNMP traps.

[0086] Display module 270, integrated into the BMC's web management interface, displays abnormal code paths, alarm information, and file handle change graphs. It also provides buttons for "Reload Configuration," "Restart Process," or "Manual Recycle" to support quick intervention by maintenance personnel.

[0087] It should be noted that the above explanation of the embodiment and beneficial effects of the method for monitoring the baseboard management controller process is also applicable to the baseboard management controller process monitoring system of the embodiment of the present application. To avoid redundancy, it will not be elaborated here.

[0088] Corresponding to the above embodiment, the present application also proposes an electronic device.

[0089] See also Figure 5 As shown, the electronic device 300 of the present application includes a memory 310, a processor 320, and a computer program stored in the memory 310 and executable on the processor 320. When the processor executes the computer program, the aforementioned baseboard management controller process monitoring method is implemented.

[0090] It should be noted that the above explanation of the embodiment and beneficial effects of the baseboard management controller process monitoring method is also applicable to the electronic device of the embodiment of the present application. To avoid redundancy, it will not be elaborated here.

[0091] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0092] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0093] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0094] The above is a detailed introduction to the baseboard management controller process monitoring method, system, electronic device and medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A method for monitoring a baseboard management controller process, characterized in that: Applied to a baseboard management controller, the method includes: Get the CPU usage and the number of file handles in the process file descriptor directory at multiple collection times; Determining file handle growth information at multiple collection moments based on the number of file handles in the process file descriptor directory at multiple collection moments; determining, based on the file handle growth information and the CPU usage at the plurality of acquisition moments, a correlation strength between the file handle growth information and the CPU usage; When the baseboard management controller process is determined to be abnormal based on the correlation strength, the file handle growth information at the plurality of acquisition moments, and the CPU usage, an abnormal code path is determined based on the context information of the baseboard management controller process to monitor the baseboard management controller process.

2. The method for monitoring a baseboard management controller process according to claim 1, wherein: The file handle growth information includes a file handle growth rate. Based on the file handle growth information and the CPU usage rate at a plurality of acquisition moments, determining the correlation strength between the file handle growth information and the CPU usage rate includes: Calculating the average of the file handle growth rate and the average of the CPU usage rate; determining file handle growth rate deviations at the plurality of collection moments based on differences between the file handle growth rates at the plurality of collection moments and an average of the file handle growth rates; determining a CPU usage deviation at the plurality of collection moments based on a difference between the CPU usage at the plurality of collection moments and an average of the CPU usage; Based on the file handle growth rate deviations at multiple collection moments and the central processing unit usage rate deviations at multiple collection moments, the correlation strength between the file handle growth information and the central processing unit usage rate is determined.

3. The method for monitoring a baseboard management controller process according to claim 2, wherein: Determining the correlation strength between the file handle growth information and the CPU usage based on the file handle growth rate deviations at the plurality of collection moments and the CPU usage deviations at the plurality of collection moments includes: Determine the product of the square root of the sum of squares of deviations of file handle growth rates at the plurality of collection moments and the square root of the sum of squares of deviations of CPU usage rates at the plurality of collection moments as a first product; Determine a first sum value as the sum of products of file handle growth rate deviations at a plurality of the collection moments and CPU usage rate deviations at corresponding collection moments; Based on a ratio between the first sum and the first product, a correlation strength between the file handle growth information and the CPU usage is determined.

4. The method for monitoring a baseboard management controller process according to claim 1, wherein: The file handle growth information includes a file handle growth rate. The file handle growth information at the plurality of collection moments is determined based on the number of file handles in the process file descriptor directory at the plurality of collection moments, including: determining an increase number of file handles at the plurality of collection moments based on a difference between a number of file handles in the process file descriptor directory at the plurality of collection moments and a number of file handles in the process file descriptor directory at a corresponding previous collection moment; The file handle growth rates at the plurality of collection moments are determined based on the ratios between the growth numbers of the file handles at the plurality of collection moments and the number of file handles in the process file descriptor directory at the corresponding previous collection moment.

5. The method for monitoring a baseboard management controller process according to claim 1, wherein: The file handle growth information includes a file handle growth rate, and determining that the baseboard management controller process is abnormal according to the association strength, the file handle growth information at multiple acquisition moments, and the central processing unit usage rate includes: Calculating the average of the file handle growth rate and the average of the CPU usage rate; Determining a process abnormality coefficient according to the average value of the file handle growth rate, the average value of the central processing unit usage rate, and the correlation strength; When the process abnormality coefficient is greater than a preset process abnormality coefficient threshold, it is determined that the baseboard management controller process is abnormal.

6. The method for monitoring a baseboard management controller process according to claim 5, wherein: Determining a process abnormality coefficient according to the average value of the file handle growth rate, the average value of the central processing unit usage rate, and the correlation strength includes: The process abnormality coefficient is determined based on the average value of the file handle growth rate, the average value of the central processing unit usage rate, and the sum of the product of the association strength and the corresponding weight coefficient.

7. The method for monitoring a baseboard management controller process according to claim 1, wherein: The file handle growth information includes a file handle growth rate, and determining that the baseboard management controller process is abnormal according to the association strength, the file handle growth information at multiple acquisition moments, and the central processing unit usage rate includes: Calculating the average of the file handle growth rate and the average of the CPU usage rate; When multiple values ​​of the correlation strength, the average value of the file handle growth rate, and the average value of the CPU usage rate are greater than corresponding preset thresholds, it is determined that the baseboard management controller process is abnormal.

8. The method for monitoring a baseboard management controller process according to claim 1, wherein: The context information of the baseboard management controller process includes a call stack table and a file descriptor list of the baseboard management controller process. Determining the abnormal code path according to the context information of the baseboard management controller process includes: Determine the collection time of the context information of the baseboard management controller process, and obtain a log table corresponding to the collection time; When the currently executed function in the call stack table is performing a file path opening operation, the number of times the file path in the file descriptor list is opened continues to increase, and the log table records a repeated opening error for the file path, it is determined that the function chain corresponding to the currently executed function in the call stack table is the abnormal code path.

9. The method for monitoring a baseboard management controller process according to claim 4, wherein: The method further comprises: A file handle change curve graph is generated according to the file handle growth quantity and the file handle growth rate at a plurality of the collection moments, and the file handle change curve graph is stored and displayed.

10. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for monitoring the baseboard management controller process according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • System resource leakage detection method and device

    CN107957950A

  • File handle monitoring and analyzing method and device, medium and equipment

    CN111258847A

  • File handle monitoring method and device, file handle leakage analysis method and device and electronic equipment

    CN116126577A

  • Database file operating system and method, terminal equipment and storage medium

    CN118964370A

  • Process monitoring method and device, equipment and storage medium

    CN120179503A