Process information capturing method and device, electronic equipment and storage medium

By automatically monitoring and collecting container process information, the problem of difficulty in timely capturing process information when containers are abnormal in the Kubernetes environment is solved, thus achieving rapid fault location and stability assurance.

CN122044919APending Publication Date: 2026-05-15INNER MONGOLIA YILI IND GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411640233.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In a Kubernetes environment, when container CPU and memory usage spikes abnormally or Java process memory overflows, causing container malfunctions, it is difficult to manually capture process information in a timely manner, making fault localization difficult and affecting container stability.

Method used

By monitoring container runtime information, the system automatically identifies target containers and obtains their process information, including sending call requests, collecting script execution data, and deploying diagnostic tools, thus enabling rapid process information capture.

Benefits of technology

No manual operation is required, which shortens the time for obtaining process information, improves the capture speed, ensures the stability of the target container, and enhances the efficiency of fault location and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122044919A_ABST
    Figure CN122044919A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a process information capturing method and device, electronic equipment and a storage medium, the method can be applied to the electronic equipment, the electronic equipment is used for monitoring operation states of multiple containers, the method comprises the steps that operation information of the multiple containers is acquired, and the operation information comprises index values of monitoring indexes; according to the operation information of the multiple containers and the threshold value of the monitoring index, whether a target container exists in the multiple containers or not is determined, and the index value of the monitoring index of the target container is larger than the threshold value; in response to the existence of the target container, obtaining process information of the target container, and storing the process information; and generating notification information, wherein the notification information is used for indicating the information identifier and the storage position of the process information. According to the method, when it is determined that the target container exists, the process information of the target container can be obtained in time, so that operation and maintenance personnel can rapidly perform fault positioning and maintenance on the target container based on the process information, and the operation stability of the target container is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, electronic device and storage medium for capturing process information. Background Technology

[0002] In real-world Kubernetes (k8s or kube) maintenance scenarios, there are often abnormal phenomena such as an increase in container central processing unit (CPU) memory or Java process memory overflow, which can lead to container malfunctions.

[0003] In related technologies, operations and maintenance personnel can manually capture the process information inside the container when the above-mentioned abnormal phenomena occur, and locate the cause of the abnormal phenomena based on the process information, so as to avoid the container from failing in subsequent operation.

[0004] However, the time when a process in a container becomes abnormal may be very short, and it is difficult to capture the process information in time by manual capture. This makes it impossible for maintenance personnel to locate the fault in the target container later, thus making it difficult to ensure the stability of the container's operation. Summary of the Invention

[0005] The process information capture method, apparatus, electronic device, and storage medium provided in this application are used to capture the process information of a target container in a timely manner, so that operation and maintenance personnel can quickly locate and maintain the target container based on the process information, which is beneficial to ensuring the stability of the target container's operation.

[0006] In a first aspect, embodiments of this application provide a method for capturing process information, in which an electronic device is used to monitor the running status of multiple containers, the method comprising:

[0007] Obtain the operational information of the multiple containers, including the indicator values ​​of the monitoring indicators;

[0008] Based on the operational information of the plurality of containers and the threshold values ​​of the monitoring indicators, it is determined whether there is a target container among the plurality of containers, wherein the indicator value of the monitoring indicator of the target container is greater than the threshold value.

[0009] In response to the existence of the target container, the process information of the target container is obtained and stored;

[0010] A notification message is generated, which is used to indicate the information identifier and storage location of the process information.

[0011] In one possible implementation, obtaining the process information of the target container includes:

[0012] The service interface sends the first call request to the server, the call request being used to request the execution of the information collection script to collect the process information;

[0013] Obtain the first response information corresponding to the first call request sent by the server through the service interface, and obtain the process information based on the first response information.

[0014] In one possible implementation, obtaining the process information based on the first response information includes:

[0015] Based on the first response information, determine the execution result of the information collection script;

[0016] In response to the execution result being successful, the process information is obtained from the first response information;

[0017] In response to the execution result being an execution failure, if the current number of requests for the call request is less than the maximum number of requests, a second call request is sent to the server through the service interface, and the second response information corresponding to the second call request is obtained, as well as the process information is obtained based on the second response information.

[0018] In one possible implementation, the method further includes:

[0019] If the execution result is an execution failure and the current request count is greater than or equal to the maximum request count, an error message is generated.

[0020] The error message indicates that the process information of the target container failed to be obtained.

[0021] In one possible implementation, the information collection script is used to instruct the following operations to be performed:

[0022] Determine whether diagnostic tools are deployed in the target container;

[0023] If the diagnostic tool is not deployed in the target container, obtain the installation package of the diagnostic tool;

[0024] Deploy the diagnostic tool in the target container based on the installation package;

[0025] The diagnostic tool is used to collect process information of the target container, and then the diagnostic tool is deleted from the target container.

[0026] In one possible implementation, determining the target container among the plurality of containers based on the operational information of the plurality of containers and the threshold values ​​of the monitoring indicators includes:

[0027] From the operational information of each container, obtain the indicator values ​​of the monitoring indicators for each container;

[0028] Among the plurality of containers, the container whose indicator value of the monitoring indicator is greater than the threshold is identified as the target container.

[0029] In one possible implementation, after generating the notification information, the method further includes:

[0030] Display the notification information; and / or,

[0031] The notification information is sent to the user equipment.

[0032] Secondly, embodiments of this application provide a process information capture device, which, in an electronic device, is used to monitor the operating status of multiple containers, including:

[0033] The transceiver module is used to acquire the operating information of the multiple containers, including the indicator values ​​of monitoring indicators.

[0034] The processing module is used to determine, based on the operating information of the plurality of containers and the threshold of the monitoring indicator, whether there is a target container among the plurality of containers, wherein the indicator value of the monitoring indicator of the target container is greater than the threshold.

[0035] The transceiver module is also configured to obtain the process information of the target container in response to the existence of the target container;

[0036] The processing module is also used to store the process information;

[0037] The processing module is also used to generate notification information, which is used to indicate the information identifier and storage location of the process information.

[0038] In one possible implementation, the transceiver module is specifically used for:

[0039] The service interface sends the first call request to the server, the call request being used to request the execution of the information collection script to collect the process information;

[0040] Obtain the first response information corresponding to the first call request sent by the server through the service interface, and obtain the process information based on the first response information.

[0041] In one possible implementation, the transceiver module is further configured to:

[0042] Based on the first response information, determine the execution result of the information collection script;

[0043] In response to the execution result being successful, the process information is obtained from the first response information;

[0044] In response to the execution result being an execution failure, if the current number of requests for the call request is less than the maximum number of requests, a second call request is sent to the server through the service interface, and the second response information corresponding to the second call request is obtained, as well as the process information is obtained based on the second response information.

[0045] In one possible implementation, the transceiver module is further configured to:

[0046] If the execution result is an execution failure and the current request count is greater than or equal to the maximum request count, an error message is generated.

[0047] The error message indicates that the process information of the target container failed to be obtained.

[0048] In one possible implementation, the information collection script is used to instruct the following operations to be performed:

[0049] Determine whether diagnostic tools are deployed in the target container;

[0050] If the diagnostic tool is not deployed in the target container, obtain the installation package of the diagnostic tool;

[0051] Deploy the diagnostic tool in the target container based on the installation package;

[0052] The diagnostic tool is used to collect process information of the target container, and then the diagnostic tool is deleted from the target container.

[0053] In one possible implementation, the processing module is specifically used for:

[0054] From the operational information of each container, obtain the indicator values ​​of the monitoring indicators for each container;

[0055] Among the plurality of containers, the container whose indicator value of the monitoring indicator is greater than the threshold is identified as the target container.

[0056] In one possible implementation, the processing module is further configured to:

[0057] Display the notification information; and / or,

[0058] The notification information is sent to the user equipment.

[0059] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0060] The memory stores computer-executed instructions;

[0061] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0062] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0063] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0064] This application provides a method, apparatus, electronic device, and storage medium for capturing process information. The method can be applied to an electronic device used to monitor the operating status of multiple containers. The method includes: acquiring operating information of multiple containers; determining whether a target container exists among the multiple containers based on the operating information and threshold values ​​of monitoring indicators; in response to the existence of a target container, acquiring and storing the process information of the target container; and generating notification information. This method can acquire operating information of multiple containers, determine the indicator values ​​of monitoring indicators for each container based on the operating information, and identify the container as a target container when the indicator value exceeds the corresponding threshold, automatically triggering the process information collection operation of the target container. This allows for rapid acquisition of the target container's process information without manual operation, shortening the capture time and increasing the capture speed. It ensures that the process information of the target container can be successfully collected when abnormal phenomena occur, enabling maintenance personnel to quickly locate and maintain the target container based on the process information, thus ensuring the stability of the target container's operation. Attached Figure Description

[0065] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0066] Figure 1 This application provides an illustration of an application scenario.

[0067] Figure 2 Flowchart of the process information capture method provided in this application Figure 1 ;

[0068] Figure 3 Flowchart of the process information capture method provided in this application Figure 2 ;

[0069] Figure 4 A schematic diagram of the process information capture device provided in this application;

[0070] Figure 5 A schematic diagram of the structure of the electronic device provided in this application.

[0071] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0072] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0073] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.

[0074] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0075] First, the relevant terms involved in the embodiments of this application will be explained.

[0076] Grafana is a cross-platform, open-source web application platform for data visualization. Users can configure the data sources they need to connect to in Grafana, and after the configuration is complete, Grafana can display data charts and warning messages from that data source in a web browser.

[0077] Kubernetes (k8s or kube): is an open-source container orchestration platform that can be used to automate many of the manual operations involved in deploying, managing, and scaling containerized applications.

[0078] A Pod is the smallest deployable unit of computing created and managed in Kubernetes. A Pod can be a group (or one or more) of containers.

[0079] To facilitate understanding of the process information capture method provided in the embodiments of this application, the following will be combined with... Figure 1 The application scenarios of the embodiments of this application will be introduced.

[0080] Figure 1 This application provides an illustration of an application scenario, such as... Figure 1 As shown, multiple containers run in the Kubernetes system. This electronic device can communicate and interact with each container in the Kubernetes system and can be used to monitor the running status of multiple containers in Kubernetes.

[0081] It should be noted that the Kubernetes system can be deployed on the electronic device; or, the Kubernetes system can be deployed on other physical servers or a server cluster consisting of multiple physical servers, and the electronic device can communicate and interact with the physical server or the server cluster.

[0082] Based on the above scenario, it's clear that operations and maintenance (O&M) personnel can use this electronic device to determine if any containers in Kubernetes are experiencing abnormal fluctuations in CPU or memory usage. Currently, O&M personnel can manually capture process information within containers when these abnormalities occur using this electronic device. For example, after discovering an anomaly in a container, O&M personnel can manually open a Kubernetes access tool and execute commands to obtain process information from the target container experiencing the anomaly. This process takes at least several minutes. However, the time during which the process in the target container experiences an anomaly may be very short. It's possible that the target container has recovered before the O&M personnel have even obtained the process information, making it impossible to capture the process information at the time of the anomaly. This hinders subsequent fault localization by O&M personnel, making it difficult to ensure the stability of the container's operation.

[0083] The process information capture method provided in this application can be applied to an electronic device used to monitor the running status of multiple containers. The method includes: acquiring the running information of multiple containers; determining whether a target container exists among the multiple containers based on the running information and threshold values ​​of monitoring indicators; in response to the existence of a target container, acquiring and storing the process information of the target container; and generating notification information. This method can acquire the running information of multiple containers, determine the indicator values ​​of monitoring indicators for each container based on the running information, and identify the container as a target container when the indicator value exceeds the corresponding threshold, automatically triggering the process information collection operation of the target container. This allows for rapid acquisition of the target container's process information without manual operation, shortening the capture time and improving the capture speed. It ensures that the process information of the target container can be successfully collected when abnormal phenomena occur, enabling maintenance personnel to quickly locate and maintain the target container based on the process information, thus ensuring the stability of the target container's operation.

[0084] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0085] Figure 2 Flowchart of the process information capture method provided in this application Figure 1 ,like Figure 2 As shown, this method can be applied to Figure 1 In the electronic device shown, the method may include the following steps:

[0086] S201. Obtain the running information of multiple containers.

[0087] In some embodiments, an electronic device may be equipped with a management platform that can be used to execute the process information capture method provided in the embodiments of this application. For example, the management platform may be Grafana.

[0088] Operational information may include the values ​​of monitored metrics. Optionally, the electronic device can acquire operational information from multiple containers in real time to facilitate timely monitoring of the operational status of each container.

[0089] In some embodiments, the runtime information may also include the environment identifier, namespace identifier, and container identifier of the container.

[0090] It is understood that the environment identifier can be used to indicate the K8S environment in which the container is running, and the environment identifier can be the name or code of the K8S environment; the namespace identifier can be used to indicate the namespace in which the K8S environment is located, and the namespace identifier can be the name of the namespace; the container identifier can be the name or number of the container.

[0091] The number of monitoring indicators can be one or more. It should be noted that "more" in the embodiments of this application refers to two or more.

[0092] For example, the monitoring metric can be at least one of the following: CPU utilization, CPU usage, memory utilization, memory usage, input / output (IO) utilization, or network resource usage.

[0093] For example, the monitoring metric is CPU utilization, and the metric value can be 85%.

[0094] S202. Based on the operational information and monitoring indicator thresholds of multiple containers, determine whether the target container exists among the multiple containers.

[0095] The monitoring indicators for the target container can exceed the threshold.

[0096] The number of target containers can be one or more. In the case of multiple target containers, the number and type of monitoring indicators of any two target containers (e.g., target container 1 and target container 2) can be the same; or, the number of monitoring indicators of target container 1 and target container 2 can be the same but the type can be different; or, the number of monitoring indicators of target container 1 and target container 2 can be different but the type can be the same.

[0097] For example, the monitoring metrics for both target container 1 and target container 2 are CPU utilization and memory utilization; or, the monitoring metrics for target container 1 are CPU utilization and IO utilization, and the monitoring metrics for target container 2 are CPU utilization and memory utilization; or, the monitoring metrics for target container 2 are CPU utilization, and the monitoring metrics for target container 2 are CPU utilization and memory utilization.

[0098] This threshold can be the alarm threshold for each monitoring indicator. Electronic devices can determine the alarm threshold for each monitoring indicator based on the configuration information input by the user, and pre-store the alarm threshold for each monitoring indicator. The alarm thresholds for each monitoring indicator can be different. For example, the alarm threshold for CPU utilization can be 85%, and the alarm threshold for IO utilization can be 60%.

[0099] S203. In response to the existence of the target container, obtain the process information of the target container and store the process information.

[0100] Understandably, in the absence of a target container, electronic devices can continue to monitor the operational status of each container.

[0101] The target container can run processes, and each process can include at least one thread.

[0102] The process information may include the process identifier, for example, the process identifier (PID).

[0103] In some embodiments, the process information may include information about at least one thread of the process, and the thread information may include metric values ​​for various monitoring metrics of the thread. For example, the process information may include the CPU utilization of at least one thread.

[0104] An electronic device can obtain complete process information for a given process, meaning it can obtain information about each thread within that process. Alternatively, it can obtain partial process information, meaning it can obtain information about a subset of the process's multiple threads. For example, if the process has 100 threads, the electronic device can obtain information about the top 50 threads with the highest CPU utilization.

[0105] The maintenance personnel can pre-configure the storage location of the process information in the electronic device, and the electronic device can store the process information based on the storage location configured by the maintenance personnel.

[0106] It should be noted that the process of the electronic device obtaining the process information of the target container will be... Figure 3 Detailed explanation is provided in the embodiments.

[0107] S204. Generate notification information.

[0108] Notification information can be used to indicate the information identifier and storage location of process information.

[0109] The information identifier may include the process identifier and the container identifier of the target container in which the process resides. In some embodiments, the information identifier may also include the environment identifier and namespace identifier corresponding to the target container, the acquisition time information and / or storage time information of the process information.

[0110] The notification information may include the address of the storage location, which the user device can use to determine the storage location of the process information.

[0111] The process information capture method provided in this application embodiment can promptly identify a target container among multiple containers based on the threshold of monitoring indicators and the running information of multiple containers, and automatically obtain the process information of the target container. This allows operation and maintenance personnel to quickly locate and maintain the target container based on the process information, which is beneficial to ensuring the stability of the target container's operation.

[0112] Figure 3 Flowchart of the process information capture method provided in this application Figure 2 ,like Figure 3 As shown, in this embodiment... Figure 2 Based on the embodiments, the process of obtaining process information of the target container is described in detail. The method includes:

[0113] S301. Obtain the running information of multiple containers.

[0114] It should be noted that the specific execution process of step S301 can be referred to the specific execution process of step S201, and will not be repeated here.

[0115] S302. Obtain the indicator values ​​of the monitoring indicators for each container from the operation information of each container.

[0116] Optionally, a keyword extraction method can be used to extract the values ​​of monitoring indicators from the operational information of each container. For example, the keywords can be the names of each monitoring indicator.

[0117] For example, if you need to extract the CPU utilization of each container from the runtime information of each container, you can set "CPU utilization" as a keyword and extract the CPU utilization value of each container from the runtime information of each container based on this keyword.

[0118] S303. Among multiple containers, the container whose monitoring indicator value is greater than the threshold is identified as the target container.

[0119] Operations personnel can configure different monitoring metrics for different containers based on the type of business they handle, and also configure different thresholds for containers with the same monitoring metrics. For example, assuming the monitoring metric is CPU utilization, if container 1 is used to handle high-priority business and its stable operation needs to be prioritized, then the CPU utilization threshold for container 1 is relatively strict and set to 65%; if container 2 is used to handle low-priority business and its smooth operation needs to be guaranteed, then the CPU utilization threshold for container 2 can be set to 80%.

[0120] Understandably, if the monitoring index value of at least one container is greater than the corresponding threshold, then this at least one container can be identified as the target container.

[0121] S304. In response to the existence of the target container, send the first call request to the server through the service interface.

[0122] In some embodiments, operations and maintenance personnel can deploy a web server service using a programming language (e.g., Java or Go), which can provide a service interface that a management platform in an electronic device (e.g., Grafana) can invoke based on a web hook notification mechanism.

[0123] Optionally, this service may also provide a query interface that allows users to query process information for each target container in the storage. Both the service interface and the query interface can be Application Programming Interfaces (APIs).

[0124] A request can be used to request the execution of an information collection script to collect process information.

[0125] Understandably, enterprises typically set up multiple Kubernetes (K8S) environments, each running multiple containers. It's possible that the same container in different K8S environments might have the same container identifier. In this case, the call request can include the target container's environment identifier, namespace identifier, and container identifier to enable the server to accurately identify the target container.

[0126] Operations and maintenance personnel can pre-write the information collection script and establish the calling relationship between the service interface and the information collection script.

[0127] For example, the server can be, but is not limited to, a standalone physical server, a server cluster consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0128] In some embodiments, the server needs to meet the following conditions when executing the information collection script: the server can interact with the K8S system; the kubectl tool is installed and configured on the server; the kubecm tool is installed and configured on the server, and the information of each K8S environment is pre-configured in the kubecm tool so that the information collection script can quickly switch between each K8S environment and perform various operations in each K8S environment when it is executed.

[0129] In some embodiments, the information collection script can be used to instruct the following operations to be performed:

[0130] (1) Determine whether diagnostic tools are deployed in the target container.

[0131] If no diagnostic tools are deployed in the target container, step (2) can be performed.

[0132] If diagnostic tools are deployed in the target container, step (4) can be performed.

[0133] Diagnostic tools can be used to provide performance analysis and troubleshooting capabilities for processes running in containers. For example, such a diagnostic tool could be the open-source tool Arthas, which can be used to obtain information on the top N threads with the highest CPU utilization in processes running in each container.

[0134] (2) Obtain the installation package for the diagnostic tool.

[0135] In some embodiments, when the server needs to execute the information collection script, the server can obtain the installation package of each diagnostic tool from the service platform corresponding to each diagnostic tool.

[0136] (3) Deploy diagnostic tools in the target container based on the installation package.

[0137] In some embodiments, the server may copy the installation package to the process in which the target container is running, and obtain the installation information of the diagnostic tool based on the installation package, so as to deploy the diagnostic tool in the process using the installation information.

[0138] (4) Collect process information of the target container through diagnostic tools and delete the diagnostic tools in the target container.

[0139] The server can collect process information of the target container through diagnostic tools and return the process information to the electronic device; alternatively, the server can store the collected process information in a storage location configured by the operations and maintenance personnel and return the storage address of the process information to the electronic device.

[0140] After obtaining the process information, the diagnostic tool can be deleted from the target container to achieve "install-as-you-go" functionality, avoiding any business intrusion impact from the diagnostic tool on the target container and ensuring the stable and secure operation of the target container.

[0141] S305. Obtain the first response information corresponding to the first call request sent by the server through the service interface, and obtain the process information based on the first response information.

[0142] In some embodiments, the electronic device can determine the execution result of the information collection script based on the first response information; if the execution result is successful, process information is obtained from the first response information; if the execution result is unsuccessful, and the current request count of the call request is less than the maximum request count, a second call request is sent to the server through the service interface, and the second response information corresponding to the second call request is obtained, as well as the process information is obtained based on the second response information.

[0143] It is understandable that the specific execution process of "obtaining process information based on the second response information" can be referred to the specific execution process of "obtaining process information based on the first response information", and will not be elaborated here.

[0144] In some embodiments, if the execution result is an execution failure and the current request count is greater than or equal to the maximum request count, an error message is generated; wherein, the error message is used to indicate that the process information of the target container failed to be obtained.

[0145] S306, Stored process information.

[0146] S307. Generate a notification message.

[0147] It should be noted that the specific execution process of steps S306 and S307 can be referred to the specific execution process of steps S203 and S204, and will not be repeated here.

[0148] S308, Display notification information; and / or, send notification information to user equipment.

[0149] The electronic device may include a display screen, on which the notification information is displayed to remind the user to obtain the process information of the target container based on the notification information, and to perform timely operation and maintenance on the target container based on the process information to avoid the target container from malfunctioning.

[0150] The user device can be a mobile phone or computer used by the user. In one example, the notification information can be sent from the electronic device to the user device in the form of an email, SMS, or notification message from an enterprise application.

[0151] In some embodiments, users can log in to the management platform of the electronic device (e.g., Grafana) and obtain the notification information through the management platform.

[0152] Compared to the original manual capture of target container process information, the process information capture method provided in this application embodiment can obtain the running information of multiple containers, determine the indicator value of each container's monitoring indicator based on the running information of each container, and identify the container as the target container when the indicator value of the container's monitoring indicator exceeds the corresponding threshold, and automatically trigger the target container's process information collection operation to quickly obtain the target container's process information without manual operation. This helps to shorten the capture time of the target container's process information and improve the capture speed, so as to ensure that the process information of the target container can be successfully collected when the target container has abnormal phenomena. This allows operation and maintenance personnel to quickly locate and maintain the target container based on the process information, which helps to ensure the stability of the target container's operation.

[0153] Figure 4 A schematic diagram of the structure of the process information capture device provided in this application is shown below. Figure 4 As shown, the process information capture device 10 provided in this embodiment can be applied to... Figure 1 In the electronic device shown in the embodiment, the electronic device can be used to monitor the operating status of multiple containers, and the process information capturing device 10 may include:

[0154] The transceiver module 11 is used to acquire the operating information of the plurality of containers, the operating information including the indicator values ​​of monitoring indicators;

[0155] Processing module 12 is used to determine whether there is a target container among the multiple containers based on the operation information of the multiple containers and the threshold of the monitoring indicator, wherein the indicator value of the monitoring indicator of the target container is greater than the threshold.

[0156] The transceiver module 11 is also configured to obtain the process information of the target container in response to the existence of the target container;

[0157] The processing module 12 is also used to store the process information;

[0158] The processing module 12 is also used to generate notification information, which is used to indicate the information identifier and storage location of the process information.

[0159] In one possible implementation, the transceiver module 11 is specifically used for:

[0160] The service interface sends the first call request to the server, the call request being used to request the execution of the information collection script to collect the process information;

[0161] Obtain the first response information corresponding to the first call request sent by the server through the service interface, and obtain the process information based on the first response information.

[0162] In one possible implementation, the transceiver module 11 is further configured to:

[0163] Based on the first response information, determine the execution result of the information collection script;

[0164] In response to the execution result being successful, the process information is obtained from the first response information;

[0165] In response to the execution result being an execution failure, if the current number of requests for the call request is less than the maximum number of requests, a second call request is sent to the server through the service interface, and the second response information corresponding to the second call request is obtained, as well as the process information is obtained based on the second response information.

[0166] In one possible implementation, the transceiver module 11 is further configured to:

[0167] If the execution result is an execution failure and the current request count is greater than or equal to the maximum request count, an error message is generated.

[0168] The error message indicates that the process information of the target container failed to be obtained.

[0169] In one possible implementation, the information collection script is used to instruct the following operations to be performed:

[0170] Determine whether diagnostic tools are deployed in the target container;

[0171] If the diagnostic tool is not deployed in the target container, obtain the installation package of the diagnostic tool;

[0172] Deploy the diagnostic tool in the target container based on the installation package;

[0173] The diagnostic tool is used to collect process information of the target container, and then the diagnostic tool is deleted from the target container.

[0174] In one possible implementation, the processing module 12 is specifically used for:

[0175] From the operational information of each container, obtain the indicator values ​​of the monitoring indicators for each container;

[0176] Among the plurality of containers, the container whose indicator value of the monitoring indicator is greater than the threshold is identified as the target container.

[0177] In one possible implementation, the processing module 12 is further configured to display the notification information; and / or,

[0178] The transceiver module 11 is also used to send the notification information to the user equipment.

[0179] The process information capture device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0180] Figure 5 A schematic diagram of the structure of the electronic device provided in this application. Figure 5 As shown, the electronic device 20 provided in this embodiment includes at least one processor 21 and a memory 22. Optionally, the device 20 also includes a communication component 23. The processor 21, the memory 22, and the communication component 23 are connected via a bus 24.

[0181] In the specific implementation process, at least one processor 21 executes computer execution instructions stored in memory 22, causing at least one processor 21 to perform the above-described method.

[0182] The specific implementation process of processor 21 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0183] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0184] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0185] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0186] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0187] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0188] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0189] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0190] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0191] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0192] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0193] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0194] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0195] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for capturing process information, characterized in that, In the application of electronic equipment, the electronic equipment is used to monitor the operating status of multiple containers, and the method includes: Obtain the operational information of the multiple containers, including the indicator values ​​of the monitoring indicators; Based on the operational information of the plurality of containers and the threshold values ​​of the monitoring indicators, it is determined whether there is a target container among the plurality of containers, wherein the indicator value of the monitoring indicator of the target container is greater than the threshold value. In response to the existence of the target container, the process information of the target container is obtained and stored; A notification message is generated, which is used to indicate the information identifier and storage location of the process information.

2. The method according to claim 1, characterized in that, The process information of the target container is obtained, including: The service interface sends the first call request to the server, the call request being used to request the execution of the information collection script to collect the process information; Obtain the first response information corresponding to the first call request sent by the server through the service interface, and obtain the process information based on the first response information.

3. The method according to claim 2, characterized in that, The step of obtaining the process information based on the first response information includes: Based on the first response information, determine the execution result of the information collection script; In response to the execution result being successful, the process information is obtained from the first response information; In response to the execution result being an execution failure, if the current number of requests for the call request is less than the maximum number of requests, a second call request is sent to the server through the service interface, and the second response information corresponding to the second call request is obtained, as well as the process information is obtained based on the second response information.

4. The method according to claim 3, characterized in that, The method further includes: If the execution result is an execution failure and the current request count is greater than or equal to the maximum request count, an error message is generated. The error message indicates that the process information of the target container failed to be obtained.

5. The method according to any one of claims 2-4, characterized in that, The information collection script is used to instruct the execution of the following operations: Determine whether diagnostic tools are deployed in the target container; If the diagnostic tool is not deployed in the target container, obtain the installation package of the diagnostic tool; Deploy the diagnostic tool in the target container based on the installation package; The diagnostic tool is used to collect process information of the target container, and then the diagnostic tool is deleted from the target container.

6. The method according to any one of claims 1-5, characterized in that, Based on the operational information of the plurality of containers and the threshold values ​​of the monitoring indicators, the target container is determined from the plurality of containers, including: From the operational information of each container, obtain the indicator values ​​of the monitoring indicators for each container; Among the plurality of containers, the container whose indicator value of the monitoring indicator is greater than the threshold is identified as the target container.

7. The method according to any one of claims 1-6, characterized in that, After generating the notification information, the method further includes: Display the notification information; and / or, The notification information is sent to the user equipment.

8. A process information capturing device, characterized in that, In the application of electronic equipment, the electronic equipment is used to monitor the operating status of multiple containers, including: The transceiver module is used to acquire the operating information of the multiple containers, including the indicator values ​​of monitoring indicators. The processing module is used to determine, based on the operating information of the plurality of containers and the threshold of the monitoring indicator, whether there is a target container among the plurality of containers, wherein the indicator value of the monitoring indicator of the target container is greater than the threshold. The transceiver module is also configured to obtain the process information of the target container in response to the existence of the target container; The processing module is also used to store the process information; The processing module is also used to generate notification information, which is used to indicate the information identifier and storage location of the process information.

9. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.