CN113051135A - Application thread pool monitoring method and thread pool monitoring device - Google Patents

Application thread pool monitoring method and thread pool monitoring device Download PDF

Info

Publication number
CN113051135A
CN113051135A CN202110423442.7A CN202110423442A CN113051135A CN 113051135 A CN113051135 A CN 113051135A CN 202110423442 A CN202110423442 A CN 202110423442A CN 113051135 A CN113051135 A CN 113051135A
Authority
CN
China
Prior art keywords
thread pool
application thread
application
monitoring
configuration information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110423442.7A
Other languages
Chinese (zh)
Other versions
CN113051135B (en
Inventor
肖蓉
林欢哲
冯岚
谢嗣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110423442.7A priority Critical patent/CN113051135B/en
Publication of CN113051135A publication Critical patent/CN113051135A/en
Application granted granted Critical
Publication of CN113051135B publication Critical patent/CN113051135B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The document provides a monitoring method and a monitoring device of an application thread pool, belonging to the field of thread pool management, wherein the method comprises the following steps: registering the configuration information of the application thread pool into a line control management timing task by an application system to generate a thread pool monitoring task; and executing the thread pool monitoring task to acquire application thread pool monitoring parameter information, constructing application thread pool log information according to the application thread pool monitoring parameter information and an interactive interface of a background server, and uploading the application thread pool log information to the background server so that the background server monitors the application thread pool according to the application thread pool log information, the personalized performance capacity index of the application thread pool and an index threshold. The method can timely master the running state of the thread pool, and avoid the production problem caused by the full application thread pool.

Description

Application thread pool monitoring method and thread pool monitoring device
Technical Field
The present disclosure relates to the field of open platform systems, and in particular, to a method and an apparatus for monitoring an application thread pool.
Background
Under an open platform system, a plurality of service scenes are flexible in implementation requirements, and often need to be processed at regular time and meet certain timeliness requirements, such as service of issuing cards, loan, staging and the like of banks, service scenes of automatic approval, service scenes of wechat line activity detection, reconciliation, data synchronization among multiple databases and the like can be realized in a mode of customizing a thread pool through a service code layer. Under an open platform system architecture, the use of a large number of service code layer self-defined thread pools may cause serious production problems, such as long transaction response time, low service success rate, sudden increase of cpu memory usage rate and the like, caused by accumulation of requested threads and error reporting due to the fact that the service code layer thread pools have more threads than capacity.
The main consideration direction is to master the running state of the thread pool in time so as to avoid the production problem caused by the fullness of the self-defined thread pool of the service code layer.
Disclosure of Invention
The method is used for solving the problem that the use of a large number of business code layer custom thread pools in the prior art can cause serious production problems.
In order to solve the above technical problem, a first aspect of the present disclosure provides a method for monitoring an application thread pool, including:
acquiring configuration information of an application thread pool, wherein the configuration information comprises monitoring parameters;
registering the configuration information of the application thread pool into a wire control management timing task to generate a thread pool monitoring task;
and executing the thread pool monitoring task to acquire application thread pool monitoring parameter information, constructing application thread pool log information according to the application thread pool monitoring parameter information and an interactive interface of a background server, and uploading the application thread pool log information to the background server so that the background server monitors the application thread pool according to the application thread pool log information, the personalized performance capacity index of the application thread pool and an index threshold.
In a further embodiment herein, obtaining configuration information for the application thread pool comprises:
reading configuration information of an application thread pool from a parameter configuration center;
if the reading fails, reading the configuration information of the application thread pool from the local database;
the local database stores the configuration information of each application thread pool read in advance from the parameter configuration center.
In a further embodiment herein, the method for monitoring the application thread pool further includes:
monitoring the configuration information of each application thread pool in the parameter configuration center, and re-reading the configuration information of each application thread pool after the configuration information of the application thread pool is modified.
In a further embodiment of the present disclosure, the configuration information of the application thread pool is registered in the managed-by-wire timing task in an annotation or API manner, so as to generate a thread pool monitoring task.
In a further embodiment herein, uploading the application thread pool log information to a backend server comprises:
and sending the application thread pool log information to a distributed message publishing and subscribing system, and sending the application thread pool log information to the background server by the distributed message publishing and subscribing system according to the request of the background server.
A second aspect herein provides a method for monitoring an application thread pool, comprising:
receiving and storing application thread pool log information sent by an application system;
according to the personalized performance capacity index of the application thread pool, matching the log information of the application thread pool, and determining the personalized performance capacity index value of the application thread pool;
and comparing the individualized performance capacity index value of the application thread pool with an index threshold value, and generating an alarm if the calculated index value exceeds the index threshold value range.
A third aspect herein provides an application system comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring configuration information of an application thread pool, and the configuration information comprises monitoring parameters;
the monitoring task generation module is used for registering the configuration information of the application thread pool into a line control management timing task to generate a thread pool monitoring task;
and the monitoring task execution module is used for executing the thread pool monitoring task to acquire application thread pool monitoring parameter information, constructing application thread pool log information according to the application thread pool monitoring parameter information and an interactive interface of the background server, and uploading the application thread pool log information to the background server so that the background server monitors the application thread pool according to the application thread pool log information, the personalized performance capacity index and the index threshold of the application thread pool.
A fourth aspect of the present disclosure provides a background server thread pool monitoring apparatus, including:
the storage module is used for receiving and storing application thread pool log information sent by an application system;
the matching module is used for matching the log information of the application thread pool according to the personalized performance capacity index of the application thread pool and determining the personalized performance capacity index value of the application thread pool;
and the comparison module is used for comparing the individualized performance capacity index value of the application thread pool with the index threshold value, and generating an alarm if the calculated index value exceeds the index threshold value range.
In a fifth aspect, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the monitoring method for the application thread pool according to any of the foregoing embodiments.
In a sixth aspect, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the monitoring method for the application thread pool according to any of the foregoing embodiments.
According to the monitoring method and the monitoring device for the application thread pool, the configuration information of the application thread pool is acquired by an application system, and is registered into a wire control management timing task to generate a thread pool monitoring task; executing a thread pool monitoring task to obtain application thread pool monitoring parameter information, constructing application thread pool log information according to the application thread pool monitoring parameter information and an interactive interface of a background server, and uploading the application thread pool log information to the background server, so that the background server monitors the application thread pool according to the application thread pool log information, the personalized performance capacity index and the index threshold of the application thread pool, can timely master the running state of the thread pool, finds out the abnormal condition of the application thread pool as early as possible, and avoids the production problem caused by the fullness of the application thread pool.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a method for monitoring application thread pools on an application system side according to an embodiment of the present disclosure;
FIG. 2 is a flow diagram illustrating a background server-side application thread pool monitoring method according to an embodiment of the present disclosure;
FIG. 3 is a block diagram illustrating an application thread pool monitoring system according to an embodiment of the present disclosure;
FIG. 4 is a flow diagram illustrating a method for application thread pool monitoring according to an embodiment of the present disclosure;
FIG. 5 is a block diagram of an apparatus for thread pool monitoring in an application system according to an embodiment of the present disclosure;
FIG. 6 is a block diagram illustrating an apparatus for background server thread pool monitoring in accordance with an embodiment of the present disclosure;
FIG. 7 is a block diagram illustrating a computer device according to an embodiment of the present disclosure.
Description of the symbols of the drawings:
510. an acquisition module;
520. a monitoring task generating module;
530. a monitoring task execution module;
610. a storage module;
620. a matching module;
630. a comparison module;
702. a computer device;
704. a processor;
706. a memory;
708. a drive mechanism;
710. an input/output module;
712. an input device;
714. an output device;
716. a presentation device;
718. a graphical user interface;
720. a network interface;
722. a communication link;
724. a communication bus.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments herein without making any creative effort, shall fall within the scope of protection.
The present specification provides method steps as described in the examples or flowcharts, but may include more or fewer steps based on routine or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual system or apparatus product executes, it can execute sequentially or in parallel according to the method shown in the embodiment or the figures.
In the prior art, more and more service code layer self-defined thread pools are applied to an application system, but the use of a large number of service code layer self-defined thread pools causes serious production problems, and no scheme for managing the thread pools is found in the prior art. Therefore, a solution capable of mastering the running state of the thread pool is urgently needed to avoid the production problem caused by the fullness of the self-defined thread pool of the service code layer.
Based on this, in an embodiment herein, a method for monitoring an application thread pool on an application system side is provided, as shown in fig. 1, including:
step 110, obtaining configuration information of an application thread pool, wherein the configuration information of the application thread pool comprises monitoring parameters of the application thread pool;
step 120, registering the configuration information of the application thread pool into a line control management timing task to generate a thread pool monitoring task;
and step 130, executing the thread pool monitoring task to obtain application thread pool monitoring parameter information, constructing application thread pool log information according to the application thread pool monitoring parameter information and an interactive interface of the background server, and uploading the application thread pool log information to the background server.
Further, after receiving the application thread pool log information, the background server monitors the application thread pool according to the application thread pool log information, the personalized performance capacity index of the application thread pool and the index threshold. The specific monitoring process is described in the following examples, which are not detailed herein.
In the embodiment, the application system side generates the thread pool monitoring task according to the configuration information of the application thread pool, the thread pool monitoring task is executed to realize the capture of the monitoring parameter information of the application thread pool, the application thread pool log information is constructed and uploaded according to the data format specified by the background server interactive interface, and the background server monitors the application thread pool according to the application thread pool log information, the personalized performance capacity index and the index threshold of the application thread pool, so that operation and maintenance personnel can timely master the running state of the thread pool, find the abnormal condition of the application thread pool as early as possible, and avoid the production problem caused by the fullness of the application thread pool.
In detail, the thread pool monitoring described herein is substantially the operation of monitoring each parameter of the thread pool.
The application thread pool described herein is a self-defined thread pool for the service code layer, which means that the service code logic layer implements related service logic by means of thread pools, and each thread pool includes a plurality of threads. The business logic is different according to different application fields, taking the bank field as an example, and the business logic is for realizing functions of issuing cards, checking accounts, inquiring and the like, which is not limited in detail herein.
When the step 110 is implemented, in order to ensure real-time monitoring and improve parameter extraction efficiency, the obtaining configuration information of the application thread pool includes: reading configuration information of an application thread pool from a parameter configuration center; if the reading fails, reading the configuration information of the application thread pool from the local database; the local database stores the configuration information of each application thread pool read from the parameter configuration center in advance.
Further, in order to ensure the validity and real-time performance of the thread pool configuration information pre-stored in the local data, the method further includes: monitoring the configuration information of each application thread pool in the parameter configuration center, and re-reading the configuration information of each application thread pool after the configuration information of the application thread pool is modified.
In detail, the application thread pool monitoring parameters in the parameter configuration center can be pre-configured by a developer according to the business code logic of the application thread pool. The application thread pool monitoring parameters are stored in the form of key-values, and each application thread pool monitoring parameter is identified by a key-value key value pair. The key is the unique identifier of the thread pool parameter, and the format of the key is as follows: the application cluster application is unique ID. application name the thread pool is unique. The unique name of the thread pool generally adopts the complete class name of the class where the thread pool is located as the unique name. Value is a JSON format string whose Value format is:
{
initial delay, which is the unit of the initial delay time for monitoring and starting: second of
"topic" is the log topic of up sending, in this implementation, the PCAP _ APP _ MONITOR _ F is sent fixedly
"targetId" is index ID in the Performance Capacity management Module
Cron is log period expression of data of up-sending performance capacity management module
"name" for including the complete class name of the thread pool (i.e., suffix of key)
}
In some embodiments, the JSON string may be entered manually. In specific implementation, in order to avoid manual editing errors, a corresponding JSON character string can be generated through a com.
The application thread pool monitoring parameters are defined by each application according to each service logic, the parameters which need to be concerned are configured manually during specific implementation, and specific values of the application thread pool monitoring parameters are not limited in the text. For the condition that the emergency timeliness requirement is extremely high, the value of the configuration value can be directly modified to meet the emergency requirement, and the parameter information of other conditions can be taken as the version parameter and brought out by the development version.
When the above step 120 is implemented specifically, the configuration information of the Application thread pool is registered in a way of annotation or API (Application Programming Interface) to a managed by wire timing task (Quartz), so as to generate a thread pool monitoring task.
The application thread pool is registered in the drive-by-wire management timing task in an annotation mode, namely, an annotation is added at a position declared by the application thread pool, wherein the annotation is in the form of @ Monitor, the Monitor is used for obtaining configuration information of the application thread pool in a specified mode, and the annotation mode is used for registering the configuration information of the application thread pool in the drive-by-wire management timing task, so that the intrusiveness of the original thread pool code is small, the influence brought by the modification of the original thread pool code can be avoided, and the safe and effective effect of carrying out low-coupling monitoring service code layer self-defining thread pool under an open platform is realized.
And registering the configuration information of the application thread pool into the drive-by-wire management timing task in an API mode, namely calling a relevant API to register after the application thread pool is initialized.
When the step 130 is implemented, the thread pool monitoring task may be executed periodically, and the specific execution frequency may be set according to the requirement, which is not limited herein. And constructing application thread pool log information according to the application thread pool monitoring parameter information and the interactive interface of the background server, namely constructing the application thread pool monitoring parameter information into the application thread pool log information according to the provisions of the interactive interface of the background server. The interactive interface of the background server is used for defining a data structure of the log information. The log information is the data of each parameter information of the monitored thread pool according to the interface format.
When the step 130 is implemented, the uploading the application thread pool log information to the background server includes: and sending the application thread pool log information to a distributed message publishing and subscribing system (kafka), and sending the application thread pool log information to a background server by the distributed message publishing and subscribing system according to a request of the background server.
In an embodiment of this document, a method for monitoring an application thread pool on a background server side is further provided, as shown in fig. 2, including:
step 210, receiving and storing application thread pool log information sent by an application system;
step 220, according to the personalized performance capacity index of the application thread pool, matching the log information of the application thread pool, and determining the personalized performance capacity index value of the application thread pool;
and step 230, comparing the personalized performance capacity index value of the application thread pool with an index threshold value, and generating an alarm if the calculated index value exceeds the index threshold value range.
In detail, different application thread pools correspond to different personalized performance capacity indexes, for example, the number of active threads in the application thread pool, and the application thread pool itself can also be used as the personalized performance capacity index, and the personalized performance capacity indexes of the application thread pools are all application-specific performance capacity indexes and can be configured according to application specific service logic and monitoring requirements.
The personalized performance capacity index can be stored in a thread pool monitoring device of the background server, the thread pool monitoring device of the background server comprises a performance capacity management module, and the performance capacity management module comprises a web front end and a background database. The web front end is an interaction module with an operator, and can provide a front end page for the operator to configure the personalized performance capacity index of the application thread pool and the corresponding index threshold value through the front end page. The web front end can also perform report display, graphical trend display and the like on the personalized performance capacity index value of the application thread pool. The parameter ID name included in the personalized performance capacity index is consistent with the ID name value of the thread pool monitoring parameter, which can also be understood as that the personalized performance capacity index includes a plurality of thread pool monitoring parameters, and the personalized performance capacity index value refers to the thread pool monitoring parameter value included in the personalized performance capacity index.
Specifically, when the step 220 is implemented, for the personalized performance capacity index of each application thread pool, matching a parameter ID name in the personalized performance capacity index of the application thread pool with a parameter ID name in the application thread pool log information, and if matching is successful, determining the personalized performance capacity index value of the application thread pool according to the matched parameter value.
Through the implementation of the step 220, the actual condition of the service development can be grasped, for example, the fast card issuing blaze thread pool under a certain card issuing verification process subsystem can be used as a performance capacity index of the fast card issuing service under the card issuing verification process subsystem, and the performance capacity index is configured, so that the monitoring management of the service thread pool can be realized, and the actual development condition of the fast card issuing service can be grasped.
The index threshold may be set according to a requirement, and a specific value of the index threshold is not limited herein, and the index threshold includes a plurality of index sub-thresholds, where the number of the index sub-thresholds is consistent with the number of thread pool monitoring parameters included in the personalized performance capacity index of the application thread pool, that is, each thread pool monitoring parameter in the personalized performance capacity index of the application thread pool has an index sub-threshold.
In some embodiments, step 230 may generate an alarm when one of the thread pool monitoring parameter values in the personalized performance capacity index of the application thread pool exceeds the index sub-threshold. In other embodiments, an alarm may be generated when some or all of the thread pool monitoring parameter values in the personalized performance capacity index of the application thread pool exceed the index sub-threshold. The condition of the alarm is not particularly limited herein.
In specific implementation, the process of generating the alarm comprises the following steps: and when the individualized performance capacity index value of the application thread pool to be monitored exceeds the index threshold range, constructing a monitoring message according to the comparison result, uploading the monitoring message to a monitoring system, and giving an alarm by the monitoring system according to the monitoring message. In specific implementation, the monitoring message can be displayed on a front-end page by the web front end. The party performing the alarm is not limited herein.
Through the step 230, a worker (e.g., a production support manager) can be reminded to handle the abnormal situation in time, so as to avoid a larger production problem as soon as possible. The alarm modes include, but are not limited to, direct alarm modes such as voice, voice and text, and indirect alarm modes for sending information such as mails and short messages.
To more clearly illustrate the monitoring method of the application thread pool in this embodiment, a detailed implementation is described below, specifically, as shown in fig. 3 and fig. 4, fig. 3 shows a structural diagram of the application thread pool monitoring system in this embodiment, and fig. 4 shows a flowchart of the application thread pool monitoring method in this embodiment. Wherein, the execution subject in steps 401 to 407 is an application system, that is, an application service logic code, and the execution subject in steps 408 to 409 is a background server, and specifically, the application thread pool monitoring method includes:
step 401, an application system obtains configuration information of each application thread pool configured by each application from a parameter configuration center, wherein the configuration information of each application thread pool is monitoring parameters of each thread pool;
step 402, if the reading in step 401 is successful, caching the configuration information into a local database, and executing step 404, and if the reading in step 401 is failed, executing step 403; in the execution process of the step, whether the configuration information in the parameter configuration center is modified or not is monitored in real time, and if the configuration information in the parameter configuration center is modified, the configuration information of an application thread pool in the parameter configuration center is read again so as to synchronously modify the local cache;
step 403, obtaining configuration information of each application thread pool from the local database, and executing step 404 after the step is executed;
step 404, initializing a thread pool to be monitored;
step 405, after the initialization of the thread pool to be monitored is completed, registering the configuration information threadPooleExecutor of the thread pool to be monitored into the wire control management timing task in an annotation or API mode to obtain a thread pool monitoring task;
step 406, periodically executing the thread pool monitoring task to obtain application thread pool monitoring parameter information, and constructing application thread pool log information according to the application thread pool monitoring parameter information and an interactive interface of the background server;
step 407, uploading the constructed application thread pool log information to a background database for storage according to an interface mode provided by a background server thread pool monitoring device, and docking through a distributed publish-subscribe message system (kafka) in the process;
step 408, the web front end of the background thread pool monitoring device matches the log information of the application thread pool according to the personalized performance capacity index of the application thread pool, determines the personalized performance capacity index value of the application thread pool, and graphically displays the personalized performance capacity index value of the application thread pool, wherein the graphical display is convenient for observing the trend, and the graphical trend also provides an operation and maintenance reference for an application maintenance manager;
and step 409, comparing the individualized performance capacity index value and the index threshold value of the application thread pool, if the calculated index value exceeds the index threshold value range, generating an alarm message according to the comparison result, and giving an alarm by the monitoring system according to the alarm message to prompt a relevant production support manager to process.
Based on the same inventive concept, an application system thread pool monitoring device and a background server thread pool monitoring device are also provided, as described in the following embodiments. As the principles of the application system thread pool monitoring device and the background server thread pool monitoring device for solving the problems are respectively similar to the methods shown in fig. 1 and 2, the application system thread pool monitoring device and the background server thread pool monitoring device can be implemented by referring to the methods shown in fig. 1 and 2, and repeated parts are not described again.
The thread pool monitoring device of the application system and the thread pool monitoring device of the background server provided by this embodiment include a plurality of functional modules, which may be implemented by dedicated or general chips, or implemented by software programs, and this document is not limited thereto.
Specifically, as shown in fig. 5, the application system thread pool monitoring apparatus includes:
an obtaining module 510, configured to obtain configuration information of an application thread pool, where the configuration information includes monitoring parameters;
a monitoring task generating module 520, configured to register configuration information of the application thread pool in the line control management timing task, and generate a thread pool monitoring task;
the monitoring task execution module 530 is configured to execute the thread pool monitoring task to obtain application thread pool monitoring parameter information, construct application thread pool log information according to the application thread pool monitoring parameter information and an interaction interface of the background server, and upload the application thread pool log information to the background server, so that the background server monitors the application thread pool according to the application thread pool log information, an individualized performance capacity index of the application thread pool, and an index threshold.
As shown in fig. 6, the background server thread pool monitoring apparatus includes:
the storage module 610 is configured to receive and store application thread pool log information sent by an application system;
the matching module 620 is configured to match the application thread pool log information according to the personalized performance capacity index of the application thread pool, and determine a personalized performance capacity index value of the application thread pool;
the comparing module 630 is configured to compare the index value of the personalized performance capacity of the application thread pool with an index threshold, and generate an alarm if the calculated index value exceeds the index threshold range.
The monitoring method and the monitoring device for the application thread pool solve the problem of a safe and effective method for self-defining the thread pool by a low-coupling monitoring service code layer under an open platform. In the management system of the thread pool monitoring related parameter information storage parameter configuration center, an application side reads parameter information in the management system of the parameter configuration center, and regularly obtains values and the like of related parameters of the thread pool in a certain mode to form log information of the kafka to be sent upwards, the application side sends the related log information to the kafka through an interface mode provided by a background server thread pool monitoring device, the background server thread pool monitoring device obtains the related log information on the kafka and stores the related log information for being read and used by a web front end in the background server thread pool monitoring device, an individualized performance capacity index is configured at the web front end, an alarm is set, the read information is displayed and compared with a threshold value, an alarm message is automatically generated to be sent to the monitoring system to alarm, and the purpose of monitoring the running state of the service thread pool is achieved.
In an embodiment of this document, the background server thread pool monitoring device may further include an approval and post-audit module, and may provide a function of monitoring, managing, and security auditing for the service code layer thread pool.
In an embodiment of the present disclosure, the application system and the monitoring method of the application thread pool on the background server side may be executed in a computer device, as shown in fig. 7, the computer device 702 may include one or more processors 704, such as one or more Central Processing Units (CPUs), each of which may implement one or more hardware threads. The computer device 702 may also include any memory 706 for storing any kind of information, such as code, settings, data, etc. For example, and without limitation, the memory 706 can include any one or more of the following in combination: any type of RAM, any type of ROM, flash memory devices, hard disks, optical disks, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent fixed or removable components of computer device 702. In one case, when the processor 704 executes associated instructions that are stored in any memory or combination of memories, the computer device 702 can perform any of the operations of the associated instructions. The computer device 702 also includes one or more drive mechanisms 708, such as a hard disk drive mechanism, an optical disk drive mechanism, or the like, for interacting with any memory.
Computer device 702 can also include an input/output module 710(I/O) for receiving various inputs (via input device 712) and for providing various outputs (via output device 714)). One particular output mechanism may include a presentation device 716 and an associated graphical user interface 718 (GUI). In other embodiments, input/output module 710(I/O), input device 712, and output device 714 may also not be included, as only one computer device in a network. Computer device 702 can also include one or more network interfaces 720 for exchanging data with other devices via one or more communication links 722. One or more communication buses 724 couple the above-described components together.
Communication link 722 may be implemented in any manner, such as over a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. Communication link 722 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
Corresponding to the methods in fig. 1-2, the embodiments herein also provide a computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, performs the steps of the above-described method.
Embodiments herein also provide computer readable instructions, wherein when executed by a processor, a program thereof causes the processor to perform the method as shown in fig. 1-2.
It should be understood that, in various embodiments herein, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments herein.
It should also be understood that, in the embodiments herein, the term "and/or" is only one kind of association relation describing an associated object, meaning that three kinds of relations may exist. For example, a and/or B, may represent: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided herein, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments herein.
In addition, functional units in the embodiments herein may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present invention may be implemented in a form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The principles and embodiments of this document are explained herein using specific examples, which are presented only to aid in understanding the methods and their core concepts; meanwhile, for the general technical personnel in the field, according to the idea of this document, there may be changes in the concrete implementation and the application scope, in summary, this description should not be understood as the limitation of this document.

Claims (10)

1. A monitoring method for an application thread pool is characterized by comprising the following steps:
acquiring configuration information of an application thread pool, wherein the configuration information comprises monitoring parameters;
registering the configuration information of the application thread pool into a wire control management timing task to generate a thread pool monitoring task;
and executing the thread pool monitoring task to acquire application thread pool monitoring parameter information, constructing application thread pool log information according to the application thread pool monitoring parameter information and an interactive interface of a background server, and uploading the application thread pool log information to the background server so that the background server monitors the application thread pool according to the application thread pool log information, the personalized performance capacity index of the application thread pool and an index threshold.
2. The method for monitoring the application thread pool according to claim 1, wherein the obtaining the configuration information of the application thread pool comprises:
reading configuration information of an application thread pool from a parameter configuration center;
if the reading fails, reading the configuration information of the application thread pool from the local database;
the local database stores the configuration information of each application thread pool read in advance from the parameter configuration center.
3. The method for monitoring a pool of application threads according to claim 2, further comprising:
monitoring the configuration information of each application thread pool in the parameter configuration center, and re-reading the configuration information of each application thread pool after the configuration information of the application thread pool is modified.
4. The method according to claim 1, wherein the configuration information of the application thread pool is registered in the managed-by-wire timed task by an annotation or API method, so as to generate a thread pool monitoring task.
5. The method for monitoring an application thread pool according to claim 1, wherein uploading the application thread pool log information to a backend server comprises:
and sending the application thread pool log information to a distributed message publishing and subscribing system, and sending the application thread pool log information to the background server by the distributed message publishing and subscribing system according to the request of the background server.
6. A monitoring method for an application thread pool is characterized by comprising the following steps:
receiving and storing application thread pool log information sent by an application system;
according to the personalized performance capacity index of the application thread pool, matching the log information of the application thread pool, and determining the personalized performance capacity index value of the application thread pool;
and comparing the individualized performance capacity index value of the application thread pool with an index threshold value, and generating an alarm if the calculated index value exceeds the index threshold value range.
7. An application system thread pool monitoring apparatus, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring configuration information of an application thread pool, and the configuration information comprises monitoring parameters;
the monitoring task generation module is used for registering the configuration information of the application thread pool into a line control management timing task to generate a thread pool monitoring task;
and the monitoring task execution module is used for executing the thread pool monitoring task to acquire application thread pool monitoring parameter information, constructing application thread pool log information according to the application thread pool monitoring parameter information and an interactive interface of the background server, and uploading the application thread pool log information to the background server so that the background server monitors the application thread pool according to the application thread pool log information, the personalized performance capacity index and the index threshold of the application thread pool.
8. A background server thread pool monitoring device, comprising:
the storage module is used for receiving and storing application thread pool log information sent by an application system;
the matching module is used for matching the log information of the application thread pool according to the personalized performance capacity index of the application thread pool and determining the personalized performance capacity index value of the application thread pool;
and the comparison module is used for comparing the individualized performance capacity index value of the application thread pool with the index threshold value, and generating an alarm if the calculated index value exceeds the index threshold value range.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of monitoring a pool of application threads of any of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of monitoring a pool of application threads of any of claims 1 to 6.
CN202110423442.7A 2021-04-20 2021-04-20 Monitoring method of application thread pool and thread pool monitoring device Active CN113051135B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110423442.7A CN113051135B (en) 2021-04-20 2021-04-20 Monitoring method of application thread pool and thread pool monitoring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110423442.7A CN113051135B (en) 2021-04-20 2021-04-20 Monitoring method of application thread pool and thread pool monitoring device

Publications (2)

Publication Number Publication Date
CN113051135A true CN113051135A (en) 2021-06-29
CN113051135B CN113051135B (en) 2024-06-07

Family

ID=76519555

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110423442.7A Active CN113051135B (en) 2021-04-20 2021-04-20 Monitoring method of application thread pool and thread pool monitoring device

Country Status (1)

Country Link
CN (1) CN113051135B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115794391A (en) * 2022-11-24 2023-03-14 灵犀科技有限公司 Method and system for dynamically modifying thread pool parameter configuration on line

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101599027A (en) * 2009-06-30 2009-12-09 中兴通讯股份有限公司 A kind of thread pool management method and system thereof
CN105138685A (en) * 2015-09-17 2015-12-09 福建新大陆软件工程有限公司 HBase-oriented performance testing system
US20160350157A1 (en) * 2015-05-29 2016-12-01 Red Hat, Inc. Dynamic thread pool management
CN107562538A (en) * 2017-08-22 2018-01-09 中国铁道科学研究院电子计算技术研究所 Data pick-up multitask management process and system in railway traffic statistics
CN108733461A (en) * 2017-04-18 2018-11-02 北京京东尚科信息技术有限公司 Distributed task dispatching method and apparatus
CN110971485A (en) * 2019-11-19 2020-04-07 网联清算有限公司 Service index monitoring system and method
CN112612592A (en) * 2020-12-29 2021-04-06 中国平安财产保险股份有限公司 Configurable timed task processing method, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101599027A (en) * 2009-06-30 2009-12-09 中兴通讯股份有限公司 A kind of thread pool management method and system thereof
US20160350157A1 (en) * 2015-05-29 2016-12-01 Red Hat, Inc. Dynamic thread pool management
CN105138685A (en) * 2015-09-17 2015-12-09 福建新大陆软件工程有限公司 HBase-oriented performance testing system
CN108733461A (en) * 2017-04-18 2018-11-02 北京京东尚科信息技术有限公司 Distributed task dispatching method and apparatus
CN107562538A (en) * 2017-08-22 2018-01-09 中国铁道科学研究院电子计算技术研究所 Data pick-up multitask management process and system in railway traffic statistics
CN110971485A (en) * 2019-11-19 2020-04-07 网联清算有限公司 Service index monitoring system and method
CN112612592A (en) * 2020-12-29 2021-04-06 中国平安财产保险股份有限公司 Configurable timed task processing method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115794391A (en) * 2022-11-24 2023-03-14 灵犀科技有限公司 Method and system for dynamically modifying thread pool parameter configuration on line

Also Published As

Publication number Publication date
CN113051135B (en) 2024-06-07

Similar Documents

Publication Publication Date Title
US9740543B1 (en) Multi-endpoint method implementation
US11695842B2 (en) Managing operation of instances
US9049105B1 (en) Systems and methods for tracking and managing event records associated with network incidents
US9355007B1 (en) Identifying abnormal hosts using cluster processing
CN113157545A (en) Method, device and equipment for processing service log and storage medium
US20150067147A1 (en) Group server performance correction via actions to server subset
CN111339073A (en) Real-time data processing method and device, electronic equipment and readable storage medium
US20210097431A1 (en) Debugging and profiling of machine learning model training
US11023284B2 (en) System and method for optimization and load balancing of computer clusters
CN112039701A (en) Interface call monitoring method, device, equipment and storage medium
CN110502400A (en) Database method for inspecting and device
CN112363902A (en) Business process monitoring method and device, computer equipment and storage medium
CN110334147A (en) A kind of method of data synchronization and device
US11468365B2 (en) GPU code injection to summarize machine learning training data
US10318911B1 (en) Persistenceless business process management system and method
RU2688254C1 (en) Self-service device network monitoring system
CN113051135A (en) Application thread pool monitoring method and thread pool monitoring device
CN117708108A (en) Client multidimensional information verification method and device
CN113052707A (en) Application production method and device, computer equipment and storage medium
WO2021067385A1 (en) Debugging and profiling of machine learning model training
JP2018067241A (en) Operation log generation device, operation log generation system, operation log generation method, and operation log generation program
US10346176B2 (en) Mainframe system structuring
CN111586043B (en) Operation and maintenance management system for computer equipment
US10678590B1 (en) Batch process monitoring and alerting based on selection of buffer times
CN114201166A (en) Message information generation method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant