CN110928663A - Cross-platform multithreading monitoring method and device - Google Patents

Cross-platform multithreading monitoring method and device Download PDF

Info

Publication number
CN110928663A
CN110928663A CN201911215372.5A CN201911215372A CN110928663A CN 110928663 A CN110928663 A CN 110928663A CN 201911215372 A CN201911215372 A CN 201911215372A CN 110928663 A CN110928663 A CN 110928663A
Authority
CN
China
Prior art keywords
log files
starting thread
threads
monitoring
platform
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.)
Pending
Application number
CN201911215372.5A
Other languages
Chinese (zh)
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.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN201911215372.5A priority Critical patent/CN110928663A/en
Publication of CN110928663A publication Critical patent/CN110928663A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5011Pool

Abstract

The invention provides a cross-platform multithreading monitoring method and a device, comprising the following steps: determining the actual starting thread number according to the number of the log files acquired from each platform, the minimum starting thread number and the maximum starting thread number; analyzing the log files in sequence according to the size of each acquired log file and the actual starting thread number; and extracting key fields of the analyzed log file and monitoring the key fields. The cross-platform monitoring method can find the abnormal operation of the application and inform related personnel at the first time, and can improve the flexibility and the universality of the system to the maximum extent through configuration management.

Description

Cross-platform multithreading monitoring method and device
Technical Field
The present application belongs to the technical field of system monitoring, and in particular, relates to a cross-platform multithreading monitoring method and apparatus.
Background
At present, a plurality of monitoring methods are available based on mature systems such as operating systems and networks, but a uniform and complete monitoring solution is not available for monitoring specific application programs running on the monitoring methods due to the limitations of product design and functions of the monitoring methods, and therefore, a monitoring mode capable of realizing cross-platform and multi-application alignment is lacking. In addition, because no standard mature commercial software is available in the current application monitoring, most of the current application monitoring adopts a manual inspection mode that maintenance scripts are compiled by maintenance personnel, if an abnormality occurs, the abnormality needs to be handled in a manual repairing mode after an alarm is received, timely and effective response and handling can not be achieved for the occurred abnormality, and meanwhile, the manual operation risk is brought, and time and labor are wasted, and the high risk is high.
Disclosure of Invention
The application provides a cross-platform multithreading monitoring method and device, which at least solve the problem that a uniform monitoring mode is lacked for the condition of cross-platform and multi-application alignment in the prior art.
According to one aspect of the application, a cross-platform multithreading monitoring method is provided, which comprises the following steps:
determining the actual starting thread number according to the number of the log files acquired from each platform, the minimum starting thread number and the maximum starting thread number;
analyzing the log files in sequence according to the size of each acquired log file and the actual starting thread number;
and extracting key fields of the analyzed log file and monitoring the key fields.
In an embodiment, determining the actual number of the boot threads according to the number of the log files acquired from each platform, the minimum number of the boot threads, and the maximum number of the boot threads includes:
comparing the number of the log files with the minimum starting thread number and the maximum starting thread number;
and determining the actual starting thread number according to the comparison result.
In an embodiment, if the number of log files is greater than the minimum starting thread number and less than the maximum starting thread number, the actual starting thread number is the number of log files.
In an embodiment, if the number of log files is greater than the maximum number of start threads, the actual number of start threads is the maximum number of start threads.
In an embodiment, analyzing the log files in sequence according to the size of each obtained log file and the actual number of threads, includes:
and analyzing the acquired log files according to the actual starting thread number from big to small.
In an embodiment, extracting key fields from the parsed log file and monitoring the key fields includes:
extracting key fields according to a platform corresponding to the log file;
and monitoring and prompting the key fields.
According to another aspect of the present application, there is also provided a cross-platform multithreading monitoring apparatus, including:
the starting thread number determining unit is used for determining the actual starting thread number according to the number of the log files acquired from each platform, the minimum starting thread number and the maximum starting thread number;
the sequential analysis unit is used for sequentially analyzing the log files according to the size of each acquired log file and the actual starting thread number;
and the monitoring unit is used for extracting the key fields of the analyzed log files and monitoring the key fields.
In one embodiment, the start thread number determination unit includes:
the comparison module is used for comparing the number of the log files with the minimum starting thread number and the maximum starting thread number;
and the quantity determining module is used for determining the actual starting thread quantity according to the comparison result.
In an embodiment, if the number of log files is greater than the minimum starting thread number and less than the maximum starting thread number, the actual starting thread number is the number of log files.
In an embodiment, if the number of log files is greater than the maximum number of start threads, the actual number of start threads is the maximum number of start threads.
In one embodiment, the sequential parsing unit includes:
and the sequencing unit is used for analyzing the acquired log files according to the actual starting thread number from large to small.
In one embodiment, the monitoring unit comprises:
the configurable keyword extraction module is used for extracting the key fields according to the platform corresponding to the log file;
and the prompt module is used for monitoring and prompting the key fields.
The application provides a cross-platform multithreading monitoring method, which is characterized in that the number of starting threads is determined according to the number of log files acquired from different platforms through a thread pool, then the thread pool is used for synchronously executing analysis processing, large files are preferentially analyzed to ensure the effect of quasi-real-time level warehousing of the analyzed files, keywords are extracted from the analyzed log files to be monitored and reported in real time, and the effect of monitoring the running conditions of the multiple platforms in real time is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a cross-platform multithread monitoring method provided by the present application.
Fig. 2 is a flowchart of a method for determining an actual number of threads to start in the embodiment of the present application.
Fig. 3 is a flowchart of a method for sequentially parsing log files according to an embodiment of the present disclosure.
Fig. 4 is a flowchart of a method for extracting key fields in the embodiment of the present application.
Fig. 5 is a block diagram of a cross-platform multithread monitoring apparatus according to the present application.
Fig. 6 is a block diagram of a starting thread number determining unit in the embodiment of the present application.
Fig. 7 is a block diagram of a monitoring unit in the embodiment of the present application.
Fig. 8 is a specific implementation of an electronic device in an embodiment of the present application.
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 given herein without making any creative effort, shall fall within the protection scope of the present invention.
Various systems such as the current X86 platform (WIN \ LINUX), AIX platform, etc. need to be monitored in real time, although the monitoring of mature systems based on operating systems, networks, etc. is more at present, a uniform and complete monitoring scheme is not formed for monitoring specific applications running on the systems due to the conditions of the design of the products and the realization of functions, etc., for example, the monitoring of availability, on-line state, transaction amount, transaction peak and batch running state, batch operation and data backup, etc., and a method capable of monitoring these data simultaneously is lacked. The processing mode in the prior art is high in maintenance cost, manual repair is needed to ensure timely processing of the abnormity, real-time performance is low, and if the abnormity is found, working time is usually the working time, the terminal of external service is caused at the moment.
Based on the above problem, the present application provides a cross-platform multithreading monitoring method, as shown in fig. 1, including the following steps:
s101: and determining the actual starting thread number according to the number of the log files acquired from each platform, the minimum starting thread number and the maximum starting thread number.
The monitoring server loading process is loaded in a thread pool mode. A thread pool is a form of multi-threaded processing in which tasks are added to a queue and then threads are created and then started to process the tasks.
The method comprises the steps of presetting the minimum starting thread number and the maximum starting thread number of a thread pool, then carrying out data acquisition, and determining the number of starting threads according to the number of acquired data.
In one embodiment, the data acquisition can be broadly divided into two types: 1. for text log files, streaming techniques common in the art are employed for the collection. 2. And for the database log file, performing data acquisition by adopting a periodic polling mode according to the configuration information. After acquiring the log file, for example, acquiring 100 log files, 100 threads are started to operate.
S102: and analyzing the log files in sequence according to the size of each acquired log file and the actual starting thread number.
If the number of the acquired log files is larger than the maximum starting thread number, the log files are sequenced to determine which log files are analyzed preferentially.
In a specific embodiment, if the number of the obtained log files is 100, and the maximum starting thread number of the thread pool is 50, it needs to determine which 50 log files are analyzed first, and at this time, it determines which files are analyzed preferentially according to the size of the log files, so that the effect of storing the analyzed data in a warehouse on time can be achieved, time is saved, and efficiency is improved.
S103: and extracting key fields of the analyzed log file and monitoring the key fields.
For the analyzed log file, key fields are extracted, and the number of the extracted key fields can be set manually. And the platform and the system are monitored in real time through key fields.
In a specific embodiment, when monitoring a platform a and a platform B at the same time, a technician selects 3 key fields as monitoring for the platform a and 5 key fields for the platform B to monitor by setting, and when platforms to be monitored are increased, for example, A, B, C three platforms need to be monitored, then 2 key fields for the platform a can be extracted to monitor, 3 key fields for the platform B can be selected to monitor, and 3 key fields for the platform C can be selected to monitor.
The execution main body of the method shown in fig. 1 can be a server, a PC, and a mobile terminal, and the method realizes the functions of monitoring the operating conditions of different platforms at the same time and reminding an alarm in real time by setting a thread pool, scheduling the processing sequence of log files, and monitoring the key fields extracted from the logs.
In an embodiment, as shown in fig. 2, determining the actual number of the boot threads according to the number of the log files acquired from each platform, the minimum number of the boot threads, and the maximum number of the boot threads includes:
s201: and comparing the number of the log files with the minimum starting thread number and the maximum starting thread number.
Comparing the number of log files with the minimum starting thread number and the maximum starting thread number generally includes three cases: the number of the log files is smaller than the minimum starting thread number, the number of the log files is between the minimum starting thread number and the maximum starting thread number (including equal to the minimum starting thread number), and the number of the log files is larger than the maximum starting thread number.
S202: and determining the actual starting thread number according to the comparison result.
When the number of log files is less than the minimum starting thread number, because the minimum starting thread number is not reached, the actual starting number is the minimum starting thread number, for example, when the number of log files is 10 and the minimum starting thread number is 30, 30 threads are still started; when the number of log files is between the minimum starting thread number and the maximum starting thread number, for example, the number of log files is 100, the minimum starting thread number is 30, and the maximum starting thread number is 150, then the actual starting thread number is 100, 100 threads are started, and the 100 log files are processed simultaneously; when the number of log files is greater than the maximum number of start threads, for example, the number of log files is 200, since the thread pool can only run 150 threads at most, the actual number of start threads at this time is 150.
In an embodiment, if the number of log files is greater than the minimum starting thread number and less than the maximum starting thread number, the actual starting thread number is the number of log files.
When the number of log files is between the minimum starting thread number and the maximum starting thread number, the number of threads actually started is equal to the number of log files, that is, all logs are processed simultaneously.
In an embodiment, if the number of log files is greater than the maximum number of start threads, the actual number of start threads is the maximum number of start threads.
When the number of log files is greater than the maximum starting thread number, the thread that can be actually started by the thread pool is the maximum starting thread number, for example, when the maximum thread number is 100 and the number of log files is 110, 100 threads are started.
In an embodiment, as shown in fig. 3, the analyzing the log files in sequence according to the size of each obtained log file and the actual number of threads includes:
s301: and analyzing the acquired log files according to the actual starting thread number from big to small.
The log files are sorted according to the occupied space, the log files with large occupied space are preferentially analyzed, the overall analysis speed is accelerated, the overall analysis speed is higher, and the effect that the analyzed log files can be timely stored is achieved.
In an embodiment, as shown in fig. 4, extracting key fields from the parsed log file and monitoring the key fields includes:
s401: and extracting key fields according to the platform corresponding to the log file.
In a specific embodiment, if platform a and platform B are to be monitored simultaneously, the technician presets 4 key fields to be extracted from platform a and 5 key fields to be extracted from platform B.
S402: and monitoring and prompting the key fields.
In a specific embodiment, the key fields extracted from S401 are monitored, and meanwhile, for the warehoused monitored data, if further aggregation processing is needed, such as classification analysis, classification processing, and the like, all can be implemented by configuring the sql. Meanwhile, in the display link of monitoring, the following modes can be adopted but not limited:
1. and displaying the overall monitoring information (such as alarm information and error information) in a scrolling manner in a monitoring main screen display mode.
2. And displaying the specific application complete information in a paging mode.
3. And displaying data information such as specific transaction amount and access amount in a graphical mode (such as a pie chart, a bar chart and a graph).
The warning information can be sent to the relevant maintenance personnel in time through sound report, short message, mail and other modes.
The method and the system adopt JAVA-based collectable plug-in development, and cross-platform and cross-system monitoring can be achieved.
Meanwhile, for the consideration of monitoring quasi-real-time performance, during data acquisition, a stream computing technology is adopted, and logs are generated and collected at the same time; when data is loaded, a multithreading mode is adopted to be carried out simultaneously, and the sensitivity of alarming is improved to the maximum extent; aggregation operation is carried out based on the configuration type display and the configuration type monitoring index, so that the flexibility and the universality of the monitoring platform can be improved to the greatest extent.
Based on the same inventive concept, the embodiment of the present application further provides a cross-platform multithread monitoring apparatus, which can be used to implement the method described in the above embodiment, as described in the following embodiments. Because the problem solving principle of the cross-platform multithreading monitoring device is similar to that of the cross-platform multithreading monitoring method, the implementation of the cross-platform multithreading monitoring device can refer to the implementation of the cross-platform multithreading monitoring method, and repeated details are not repeated. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. While the system described in the embodiments below is preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
As shown in fig. 5, a cross-platform multithreading monitoring apparatus includes:
a starting thread number determining unit 501, configured to determine an actual starting thread number according to the number of log files acquired from each platform, the minimum starting thread number, and the maximum starting thread number;
a sequential analysis unit 502, configured to analyze the log files sequentially according to the size of each obtained log file and the actual number of start threads;
and a monitoring unit 503, configured to extract a key field of the analyzed log file and monitor the key field.
In one embodiment, the start thread number determination unit 501 shown in fig. 6 includes:
the comparison module 601 is configured to compare the number of log files with the minimum starting thread number and the maximum starting thread number;
and a quantity determining module 602, configured to determine an actual number of starting threads according to the comparison result.
In an embodiment, if the number of log files is greater than the minimum starting thread number and less than the maximum starting thread number, the actual starting thread number is the number of log files.
In an embodiment, if the number of log files is greater than the maximum number of start threads, the actual number of start threads is the maximum number of start threads.
In one embodiment, the sequential parsing unit 502 comprises:
and the sequencing unit is used for analyzing the acquired log files according to the actual starting thread number from large to small.
In one embodiment, as shown in fig. 7, the monitoring unit 503 includes:
the configurable keyword extraction module 701 is used for extracting a key field according to a platform corresponding to the log file;
and a prompt module 702, configured to monitor and prompt the key field.
In a specific embodiment, 300 log files of different sizes are obtained from each platform through the apparatus provided by the present application, for example, the number of threads allowed by a thread pool is minimum 20 and maximum 100, and simultaneously, corresponding loading threads (e.g., 30%, 10%, 40%, 20%) are started from each loading queue according to a preset percentage, and on the premise that 300 log files of different sizes and different times need to be loaded:
1. within a specified time (e.g., 10 seconds) and less than a specified byte (e.g., 1 Mbyte), enter NoralTimeLoadStack in chronological order; if 150 files are entered.
2. Within a specified time (e.g., 10 seconds) and greater than a specified byte (e.g., 1 Mbyte), sorting by size into a normalSizeLoadStack; suppose 80 files are entered.
3. Out of a specified time (e.g., 10 seconds) and less than a specified byte (e.g., 1 Mbyte), chronologically ordered into EmergenyTimeLoadStack; suppose 50 files are entered.
4. Out of a specified time (e.g., 10 seconds) and greater than a specified byte (e.g., 1 Mbyte), sorting into EmergenySizeLoadStack by size; suppose 20 files are entered.
Under the premise, the thread pool can automatically start 100 threads to load, that is, the first queue starts 30 loading threads to process 150 files, the second queue starts 10 threads to process 80 files, the third queue starts 40 threads to process 50 files, and the fourth queue starts 20 threads to process 20 files.
In practical use, the method can basically realize real-time data storage, thereby providing support for realizing centralized monitoring of huge nodes.
In addition, in order to balance the loads of the Normal queue and the employee queue and avoid the problem that a certain queue is continuously tense, the thread pool monitoring program adopts a mode of automatically adjusting the designated time, namely: when the Normal queue is blocked and the empty queue is idle, the appointed time is automatically shortened to enable the new file to preferentially enter the empty queue, and when the empty queue is blocked and the Normal queue is idle, the appointed time is automatically expanded to enable the new file to preferentially enter the Normal queue.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
An embodiment of the present application further provides a specific implementation manner of an electronic device capable of implementing all steps in the method in the foregoing embodiment, and referring to fig. 8, the electronic device specifically includes the following contents:
a processor (processor)801, a memory 802, a communication Interface 803, a bus 804, and a non-volatile memory 805;
the processor 801, the memory 802 and the communication interface 803 complete mutual communication through the bus 804;
the processor 801 is configured to call the computer programs in the memory 802 and the non-volatile memory 805, and when the processor executes the computer programs, the processor implements all the steps in the method in the foregoing embodiments, for example, when the processor executes the computer programs, the processor implements the following steps:
s101: and determining the actual starting thread number according to the number of the log files acquired from each platform, the minimum starting thread number and the maximum starting thread number.
S102: and analyzing the log files in sequence according to the size of each acquired log file and the actual starting thread number.
S103: and extracting key fields of the analyzed log file and monitoring the key fields.
Embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps of the method in the above embodiments, where the computer-readable storage medium stores thereon a computer program, and the computer program when executed by a processor implements all the steps of the method in the above embodiments, for example, the processor implements the following steps when executing the computer program:
s101: and determining the actual starting thread number according to the number of the log files acquired from each platform, the minimum starting thread number and the maximum starting thread number.
S102: and analyzing the log files in sequence according to the size of each acquired log file and the actual starting thread number.
S103: and extracting key fields of the analyzed log file and monitoring the key fields.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the hardware + program class embodiment, since it is substantially similar to the method embodiment, the description is simple, and the relevant points can be referred to the partial description of the method embodiment. Although embodiments of the present description provide method steps as described in embodiments or flowcharts, more or fewer steps may be included based on conventional or non-inventive means. 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 apparatus or end product executes, it may execute sequentially or in parallel (e.g., parallel processors or multi-threaded environments, or even distributed data processing environments) according to the method shown in the embodiment or the figures. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in a process, method, article, or apparatus that comprises the recited elements is not excluded. For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, in implementing the embodiments of the present description, the functions of each module may be implemented in one or more software and/or hardware, or a module implementing the same function may be implemented by a combination of multiple sub-modules or sub-units, and the like. The above-described embodiments of the apparatus 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 be in an electrical, mechanical or other form. The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein. The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of an embodiment of the specification.
In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction. The above description is only an example of the embodiments of the present disclosure, and is not intended to limit the embodiments of the present disclosure. Various modifications and variations to the embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present specification should be included in the scope of the claims of the embodiments of the present specification.

Claims (14)

1. A cross-platform multithreading monitoring method, comprising:
determining the actual starting thread number according to the number of the log files acquired from each platform, the minimum starting thread number and the maximum starting thread number;
analyzing the log files in sequence according to the size of each acquired log file and the actual starting thread number;
and extracting key fields of the analyzed log file and monitoring the key fields.
2. The multithreading monitoring method of claim 1, wherein determining the actual number of threads to start based on the number of log files obtained from each platform, the minimum number of threads to start, and the maximum number of threads to start comprises:
comparing the number of the log files with the minimum starting thread number and the maximum starting thread number;
and determining the actual starting thread number according to the comparison result.
3. The method of claim 2, wherein if the number of log files is greater than the minimum number of threads started and less than the maximum number of threads started, the actual number of threads started is the number of log files.
4. The method of claim 2, wherein if the number of log files is greater than the maximum number of threads to be started, the actual number of threads to be started is the maximum number of threads to be started.
5. The multithreading monitoring method of claim 1, wherein analyzing the log files in sequence according to the size of each log file obtained and the actual number of threads started comprises:
and analyzing the acquired log files according to the actual starting thread number from large to small.
6. The multithread monitoring method of claim 1, wherein the extracting key fields from the parsed log file and monitoring the key fields comprises:
extracting key fields according to the platform corresponding to the log file;
and monitoring and prompting the key fields.
7. A cross-platform multithreading monitor, comprising:
the starting thread number determining unit is used for determining the actual starting thread number according to the number of the log files acquired from each platform, the minimum starting thread number and the maximum starting thread number;
the sequential analysis unit is used for sequentially analyzing the log files according to the size of each acquired log file and the actual starting thread number;
and the monitoring unit is used for extracting key fields of the analyzed log file and monitoring the key fields.
8. The multithread monitoring apparatus of claim 7, wherein the start thread number determination unit comprises:
the comparison module is used for comparing the number of the log files with the minimum starting thread number and the maximum starting thread number;
and the quantity determining module is used for determining the actual starting thread quantity according to the comparison result.
9. The multithread monitoring apparatus of claim 8, wherein the actual number of threads started is the number of log files if the number of log files is greater than the minimum number of threads started and less than the maximum number of threads started.
10. The apparatus of claim 8, wherein if the number of log files is greater than the maximum number of threads to be started, the actual number of threads to be started is the maximum number of threads to be started.
11. The multithread monitoring apparatus of claim 7, wherein the sequential parsing unit comprises:
and the sequencing unit is used for analyzing the acquired log files according to the actual starting thread number from large to small.
12. The multithread monitoring apparatus of claim 7, wherein the monitoring unit comprises:
the configurable keyword extraction module is used for extracting a key field according to a platform corresponding to the log file;
and the prompt module is used for monitoring and prompting the key fields.
13. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the cross-platform multithreading monitoring method of any one of claims 1 to 6 when executing the program.
14. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a cross-platform multithreading monitoring method according to any one of claims 1 to 6.
CN201911215372.5A 2019-12-02 2019-12-02 Cross-platform multithreading monitoring method and device Pending CN110928663A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911215372.5A CN110928663A (en) 2019-12-02 2019-12-02 Cross-platform multithreading monitoring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911215372.5A CN110928663A (en) 2019-12-02 2019-12-02 Cross-platform multithreading monitoring method and device

Publications (1)

Publication Number Publication Date
CN110928663A true CN110928663A (en) 2020-03-27

Family

ID=69848483

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911215372.5A Pending CN110928663A (en) 2019-12-02 2019-12-02 Cross-platform multithreading monitoring method and device

Country Status (1)

Country Link
CN (1) CN110928663A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111967874A (en) * 2020-08-17 2020-11-20 中国银行股份有限公司 Transaction log recording method and device
CN116991679A (en) * 2023-09-26 2023-11-03 四川华鲲振宇智能科技有限责任公司 Method for automatically distributing optimal thread number during memory pressure test

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103617287A (en) * 2013-12-12 2014-03-05 用友软件股份有限公司 Log management method and device in distributed environment
CN104486107A (en) * 2014-12-05 2015-04-01 曙光信息产业(北京)有限公司 Log collection device and method
CN106055703A (en) * 2016-06-22 2016-10-26 北京科摩仕捷科技有限公司 Real-time log analysis method and system
US20190018742A1 (en) * 2017-07-11 2019-01-17 Sap Se Automatic Adoption of Parallelized Database Garbage Collection
CN109324996A (en) * 2018-10-12 2019-02-12 平安科技(深圳)有限公司 Journal file processing method, device, computer equipment and storage medium
CN109446173A (en) * 2018-09-18 2019-03-08 平安科技(深圳)有限公司 Daily record data processing method, device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103617287A (en) * 2013-12-12 2014-03-05 用友软件股份有限公司 Log management method and device in distributed environment
CN104486107A (en) * 2014-12-05 2015-04-01 曙光信息产业(北京)有限公司 Log collection device and method
CN106055703A (en) * 2016-06-22 2016-10-26 北京科摩仕捷科技有限公司 Real-time log analysis method and system
US20190018742A1 (en) * 2017-07-11 2019-01-17 Sap Se Automatic Adoption of Parallelized Database Garbage Collection
CN109446173A (en) * 2018-09-18 2019-03-08 平安科技(深圳)有限公司 Daily record data processing method, device, computer equipment and storage medium
CN109324996A (en) * 2018-10-12 2019-02-12 平安科技(深圳)有限公司 Journal file processing method, device, computer equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111967874A (en) * 2020-08-17 2020-11-20 中国银行股份有限公司 Transaction log recording method and device
CN111967874B (en) * 2020-08-17 2023-09-19 中国银行股份有限公司 Transaction log recording method and device
CN116991679A (en) * 2023-09-26 2023-11-03 四川华鲲振宇智能科技有限责任公司 Method for automatically distributing optimal thread number during memory pressure test
CN116991679B (en) * 2023-09-26 2023-12-08 四川华鲲振宇智能科技有限责任公司 Method for automatically distributing optimal thread number during memory pressure test

Similar Documents

Publication Publication Date Title
WO2011155621A1 (en) Malfunction detection device, obstacle detection method, and program recording medium
US20110314138A1 (en) Method and apparatus for cause analysis configuration change
CN109388537B (en) Operation information tracking method and device and computer readable storage medium
CN108508874B (en) Method and device for monitoring equipment fault
CN106126403A (en) Oracle database failure analysis methods and device
CN111881014B (en) System test method, device, storage medium and electronic equipment
CN111400011B (en) Real-time task scheduling method, system, equipment and readable storage medium
CN110928663A (en) Cross-platform multithreading monitoring method and device
CN110750426A (en) Service state monitoring method and device, electronic equipment and readable storage medium
CN112559376A (en) Automatic positioning method and device for database fault and electronic equipment
JP2006260056A (en) Integrated operation management server, extraction method of message for integrative operation management, and program
CN113806191A (en) Data processing method, device, equipment and storage medium
CN110895506A (en) Construction method and construction system of test data
CN109271290B (en) Method and device for monitoring thread utilization rate and storage device
JP2013206368A (en) Virtual environment operation support system
CN112433908B (en) Method, system, device and medium for determining interval time of detection server
CN112434308A (en) Application vulnerability detection method and device, electronic equipment and computer storage medium
CN113760634A (en) Data processing method and device
CN111258870A (en) Performance analysis method, device, equipment and storage medium of distributed storage system
CN112416719B (en) Monitoring processing method, system, equipment and storage medium for database container
CN114020580A (en) Method, system, device and storage medium for monitoring performance index of application system
CN115525392A (en) Container monitoring method and device, electronic equipment and storage medium
CN109033196A (en) A kind of distributed data scheduling system and method
CN110011845B (en) Log collection method and system
CN113259878B (en) Call bill settlement method, system, electronic device and computer readable 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200327

RJ01 Rejection of invention patent application after publication