CN113064783A - Application program monitoring method, device and system, electronic equipment and readable medium - Google Patents

Application program monitoring method, device and system, electronic equipment and readable medium Download PDF

Info

Publication number
CN113064783A
CN113064783A CN202010002014.2A CN202010002014A CN113064783A CN 113064783 A CN113064783 A CN 113064783A CN 202010002014 A CN202010002014 A CN 202010002014A CN 113064783 A CN113064783 A CN 113064783A
Authority
CN
China
Prior art keywords
program
data
monitoring
merging
server
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
CN202010002014.2A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010002014.2A priority Critical patent/CN113064783A/en
Publication of CN113064783A publication Critical patent/CN113064783A/en
Pending legal-status Critical Current

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/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs

Landscapes

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

Abstract

The disclosure relates to an application program monitoring method, device and system, an electronic device and a readable medium. The method comprises the following steps: capturing execution data of the application program according to a preset rule through the extension program; sending the execution data to a merging program through the extension program; performing data merging on the execution data through the merging program to generate monitoring data; and sending the monitoring data to a monitoring server through the merging program. According to the application program monitoring method, device and system, the electronic equipment and the readable medium, the whole amount of information related to the application program can be conveniently and quickly captured, and the problems in the application program can be quickly solved.

Description

Application program monitoring method, device and system, electronic equipment and readable medium
Technical Field
The present disclosure relates to the field of computer information processing, and in particular, to a method, an apparatus, a system, an electronic device, and a readable medium for monitoring an application program.
Background
Due to the characteristics of rapid development and continuous innovation of the internet, the website can always keep the leadership and attract more users only by winning with the fastest development speed and the lowest cost. In order to meet the current internet development trend, a hypertext preprocessor PHP (hypertext preprocessor) is used as a very excellent and simple Web development language, and is tightly combined with Linux, Nginx and Mysql to form an open source golden combination of LNMP (a website server architecture), so that the use cost is reduced, the development speed is increased, and the latest interactive network development application is met. More than 60% of 50000 ten thousand internet websites in the world use the PHP technology, and increasing internet users also put higher requirements on the performance and stability of the PHP websites, so a set of system for monitoring the PHP application performance and errors in real time is needed, the errors are quickly positioned and eliminated, the website performance is improved, real-time alarm is carried out, and loss is avoided.
In the prior art, the problem of errors in the application is often located by embedding points in the PHP application, but the embedding manner requires developers to embed a large number of points, and the embedding manner can only obtain a small amount of information of the application, so that a new application monitoring method, device, system, electronic device and readable medium are needed.
The above information disclosed in this background section is only for enhancement of understanding of the background of the disclosure and therefore it may contain information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In view of this, the present disclosure provides an application monitoring method, an application monitoring device, an application monitoring system, an electronic device, and a readable medium, which can conveniently and quickly capture the full amount of information related to an application, and quickly solve the problem existing in the application.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to a first aspect of the present disclosure, an application monitoring method is provided, which includes: capturing execution data of the application program according to a preset rule through the extension program; sending the execution data to a merging program through the extension program; performing data merging on the execution data through the merging program to generate monitoring data; and sending the monitoring data to a monitoring server through the merging program.
In an exemplary embodiment of the present disclosure, crawling execution data of an application program according to a predetermined rule by an extension program includes: and receiving an access instruction of the application program through the extension program, and triggering the extension program to capture the execution data of the application program according to a preset rule.
In an exemplary embodiment of the present disclosure, further comprising: arranging the extension program in a kernel of the application program.
In an exemplary embodiment of the present disclosure, crawling execution data of an application program according to a predetermined rule by an extension program includes: determining the name of a function to be monitored according to a preset rule; and capturing the execution data corresponding to the function name in the application program through an extension program.
In an exemplary embodiment of the present disclosure, capturing, by an extension program, execution data corresponding to the function name in the application program includes: and the extension program acquires the execution data corresponding to the function name in a function pointer replacement mode.
In an exemplary embodiment of the present disclosure, the data merging the execution data by the merging program to generate the monitoring data includes: and monitoring the bidirectional communication connection through the first subprocess of the merging program to acquire the execution data, and performing data merging on the execution data to generate monitoring data.
In an exemplary embodiment of the present disclosure, sending the monitoring data to a monitoring server through the merging program includes: and sending the monitoring data to a monitoring server through a second subprocess of the merging program.
In an exemplary embodiment of the present disclosure, the method further comprises: and updating the configuration information of the merging program at regular time through a third subprocess of the merging program.
According to a second aspect of the present disclosure, an application monitoring apparatus is provided, the apparatus comprising: the grabbing module is configured to grab the execution data of the application program according to a preset rule through the extension program; a first sending module configured to send the execution data to a merging program through the extension program; the generating module is configured to perform data merging on the execution data through the merging program to generate monitoring data; and the second sending module is configured to send the monitoring data to the monitoring server through the merging program.
In an exemplary embodiment of the disclosure, the crawling module is configured to receive an access instruction of the application program through the extension program, and trigger the extension program to crawl execution data of the application program according to a predetermined rule.
In an exemplary embodiment of the present disclosure, the apparatus further includes: a placement module configured to place the extension program in a kernel of the application program.
In an exemplary embodiment of the disclosure, the grasping module is configured to: determining the name of a function to be monitored according to a preset rule; and capturing the execution data corresponding to the function name in the application program through an extension program.
In an exemplary embodiment of the disclosure, the fetching module is configured to obtain, by the extension program, the execution data corresponding to the function name in a function pointer replacement manner.
In an exemplary embodiment of the disclosure, the generating module is configured to monitor a bidirectional communication connection through a first sub-process of the merging program to obtain the execution data, and perform data merging on the execution data to generate monitoring data.
In an exemplary embodiment of the disclosure, the second sending module is configured to send the monitoring data to a monitoring server through a second sub-process of the merging program.
In an exemplary embodiment of the present disclosure, the apparatus further comprises: and the updating module is configured to update the configuration information of the merging program at regular time through a third subprocess of the merging program.
According to a third aspect of the present disclosure, there is provided an application monitoring system, the system comprising: the proxy server is configured to acquire an access instruction of the application program; and forwarding the access instruction to an extension program server; the system comprises an extension program server, a data server and a data processing system, wherein the extension program server is configured to capture execution data of an application program according to a preset rule through an extension program and send the execution data to the data server; the data server is configured to perform data combination on the execution data to generate monitoring data; sending the monitoring data to a monitoring server; and the monitoring server is configured to receive and display the monitoring data.
According to a fourth aspect of the present disclosure, an electronic device is presented, the electronic device comprising: one or more processors; storage means for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement a method as above.
According to a fifth aspect of the present disclosure, a computer-readable medium is proposed, on which a computer program is stored, which program, when being executed by a processor, carries out the method as above.
According to the application program monitoring method, device and system, the electronic equipment and the readable medium, the whole amount of information related to the application program can be conveniently and quickly captured, and the problems in the application program can be quickly solved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. The drawings described below are merely some embodiments of the present disclosure, and other drawings may be derived from those drawings by those of ordinary skill in the art without inventive effort.
Fig. 1 is a system block diagram illustrating an application monitoring method and apparatus according to an exemplary embodiment.
FIG. 2 is a flow diagram illustrating a method of application monitoring in accordance with an exemplary embodiment.
Fig. 3 is a schematic diagram illustrating an application monitoring method according to another exemplary embodiment.
Fig. 4 is a schematic diagram illustrating an application monitoring method according to another exemplary embodiment.
FIG. 5 is a block diagram illustrating an application monitoring apparatus in accordance with an exemplary embodiment.
FIG. 6 is a block diagram illustrating an application monitoring system in accordance with another exemplary embodiment.
FIG. 7 is a block diagram illustrating an electronic device in accordance with an example embodiment.
FIG. 8 is a schematic diagram illustrating a computer-readable storage medium according to an example embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another. Thus, a first component discussed below may be termed a second component without departing from the teachings of the disclosed concept. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It is to be understood by those skilled in the art that the drawings are merely schematic representations of exemplary embodiments, and that the blocks or processes shown in the drawings are not necessarily required to practice the present disclosure and are, therefore, not intended to limit the scope of the present disclosure.
The inventor of the application finds that in the prior art, simple information such as execution time, calling times and the like of a key method is reported in a point burying mode in PHP application, a certain threshold value is set in a system background to give an alarm, and errors and performance tuning are solved according to the simple information after the alarm is received.
This prior art approach to locating application information has the following disadvantages:
1. the code of the PHP application needs to be modified manually, and developers need to comb key methods themselves to add the buried point code, but usually not all methods are added because of the enormous amount of work. Secondly, the performance of the website may be affected by adding too many buried points by non-critical methods.
2. The methods of un-burying the points affect the performance of the web site or cause errors to be unknown, and there are a large number of methods of un-burying the points in the web site, which cannot be sensed by technicians or users if errors or performance degradation occurs in the production environment.
3. Positioning errors and performance tuning are difficult, when methods in an application program generate errors or performance is reduced, information which can be obtained by a point burying mode only has simple information such as calling method failure or prolonged execution time, and key information such as calling relation, file name, line number, error reasons and the like when the methods are called does not exist, so that the problem is not solved favorably.
In view of this, the present application provides a method, an apparatus, and a system for monitoring an application program, which can be used after opening a box without modifying a PHP application code.
According to the application program monitoring method, because the acquired application data is full data, errors of the application program and methods with slower performance (such as a method with the capture execution time exceeding 500 milliseconds) can be captured dynamically, and no missing fish exists.
According to the application program monitoring method, the detailed information such as the function call relation, the file name, the line number, the error reason, the parameter value transmitted during running and the like when the performance is reduced or the error is generated can be obtained to rapidly solve the error.
Fig. 1 is a system block diagram illustrating an application monitoring method and apparatus according to an exemplary embodiment.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a shopping application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server that provides various services, such as a background server that supports shopping websites browsed by users using the terminal devices 101, 102, 103. The backend server 105 may analyze and perform other processing on the received request data through an application installed in the backend server, and feed back a processing result to the terminal device.
The server 105 can grab execution data of the application program according to a predetermined rule, for example, by an extension program; the server 105 may send the execution data to the merge program, for example, through the extension program; the server 105 may perform data merging on the execution data, for example, by the merging program, to generate monitoring data; the server 105 may send the monitoring data to the monitoring server, for example, through the merge program.
The server 105 may also receive access instructions for the application, for example, by the extension, triggering the extension to grab execution data for the application according to predetermined rules.
The server 105 may be a server of one entity, and may also be composed of a plurality of servers, for example, a part of the server 105 may be configured to obtain an access instruction of an application, for example, as a proxy server system in the present disclosure; and forwarding the access instruction to an extension program server; a part of the servers 105 may be, for example, as an extension program server system in the present disclosure, configured to grab execution data of an application program according to a predetermined rule by an extension program and send the execution data to a data server; a portion of the servers 105 may be configured to perform data merging on the execution data, for example, as a data server system in the present disclosure, to generate monitoring data; sending the monitoring data to a monitoring server; and a portion of the server 105 may also be used, for example, as a monitoring server system in the present disclosure, for receiving and presenting the monitoring data.
It should be noted that the application monitoring method provided by the embodiment of the present disclosure may be executed by the server 105, and accordingly, the application monitoring apparatus may be disposed in the server 105. The web page end for browsing the goods and the request end for inquiring the merchant provided for the user are generally located in the terminal devices 101, 102, 103.
FIG. 2 is a flow diagram illustrating a method of application monitoring in accordance with an exemplary embodiment. The application monitoring method 20 includes at least steps S202 to S208.
As shown in fig. 2, in S202, the execution data of the application program is fetched by the extension program according to a predetermined rule. The application program may be a PHP application program, and it should be noted that the method of the present application may also be applied to other application programs.
In one embodiment, the proxy server obtains an access instruction of the application program, and forwards the access instruction to the extension program to trigger the extension program to grab execution data of the application program according to a preset rule. The proxy server may be, for example, a nginn server, which is a high-performance hypertext transfer protocol HTTP and reverse proxy service, and is also an IMAP (interactive mail access protocol)/POP 3 (post office protocol version 3)/SMTP (simple mail transfer protocol) service, and the nginn server is used as a load balancing service: the Nginx can directly support Rails (a Web development framework) and PHP programs to carry out external services inside, and can also support HTTP proxy services to carry out external services. Nginx is written in the C language.
In one embodiment, the proxy server forwarding the access instruction to the extension program comprises: monitoring, by a resident process, the access instruction to forward the access instruction to the extension program.
In one embodiment, further comprising: arranging the extension program in a kernel of the application program. So, the PHP extension program (which may be, for example, jd _ agent.so) may be developed through the C language. In one embodiment, the extension program is located in the extension program server, and the execution data corresponding to the plurality of functions in the application program can be captured by the extension program in the extension program server.
In one embodiment, the extension program may determine a name of a function to be monitored according to a predetermined rule, and capture execution data corresponding to the name of the function in the application program through the extension program.
In one embodiment, the application program may be a script language program, in which a plurality of functions for executing data are set, and when the extension program receives the access instruction, the plurality of functions in the script language program are fetched to obtain the execution data.
In one embodiment, the predetermined rule may include a specified function name of the execution data or a threshold value of the execution data. The extension program can monitor a plurality of execution data functions of the application program in real time, and after receiving the access instruction, if the predetermined rule is the specified execution data function name, the extension program matches the function names of the execution data of all the monitored application programs according to the specified execution data function name in the predetermined rule so as to determine the function name to be monitored. If the preset rule is the threshold value of each execution data, counting is carried out based on the execution data of all functions of the monitored application program, and the execution data reaching the corresponding execution data threshold value is obtained, wherein the function names of the execution data are the determined function names of the function names to be monitored. After determining the function names, capturing the execution data corresponding to the function names.
In one embodiment, the principle of the PHP extender to fetch the function-related data is to replace the function pointer in C language, and the specific form may be as follows:
assuming that the execution time of the PHP kernel function zend _ execute needs to be grabbed, a similar extension pseudocode may be as follows:
void (@ old _ zend _ execute) (); for holding the original zend _ execute function pointer
void jd _ execute (); execution time for grabbing the zend _ execute function
old _ zend _ execute ═ zend _ execute; // save primitive function pointers
zend _ execute ═ jd _ execute; // replace with its own function pointer
void jd_execute(){
// record Start time
old_zend_execute();
// end of recording time
}
In one embodiment, the execution data may include, but is not limited to: request time execution time, task execution time, function call relation, server command execution parameter, error information, and external service information. More specifically, the executing data may further include: according to the configuration in the extension program or the threshold set in the extension program, capturing request execution time, function or method call relation, parameter value, file name where the function or method is located, line number, SQL statement of allergy sensitive information, operation SQL type function or method execution time, NOSQL operation execution time, error information, execution time of external service (PHP requests third party service through HTTP/TCP), and GET and POST data of the current request. So, using PHP extension program (jd _ agent.so) to capture data is not only rich in detail but also does not modify a line of PHP project code.
In S204, the execution data is sent to the merging program by the extension program.
In one embodiment, a cache merge (jd _ daemon) may be constructed to which the extension program sends the acquired execution data.
In S206, the data merging is performed on the execution data by the merging program, and monitoring data is generated.
In one embodiment, the merge program (jd _ daemon) is used to cache the execution data sent by the merge PHP extension program (jd _ agent.
In one embodiment, a child process of jd _ dameon is created when jd _ dameon is started, and a parent process is responsible for monitoring whether the child process abnormally exits or not, and if so, restarting the child process. The sub-process may specifically be created, for example, by means of a recursive fork function, which is a bifurcated function in UNIX and UNIX-like (UNIX-like) systems. Return value of fork function: if the calling is successful once, returning two values, returning 0 by the child process, and returning a child process mark by the parent process; otherwise, the error returns to-1.
The fork function divides the running program into 2 (almost) identical processes, each of which starts a thread that starts from the same location in the code. The threads in the two processes continue to execute as if two users started two copies of the application at the same time.
In one embodiment, the jd _ daemon sub-process first loads configuration files, which may include but are not limited to: path information and port information, and the jd _ daemon is automatically restarted after the configuration file is updated.
In one embodiment, after the jd _ daemon sub-process first loads the configuration file, three threads may be started: a first process, a second process, and a third process. The first process may be a listening thread, the second process may be a heartbeat thread, and the third process may be an update configuration thread.
In one embodiment, the first sub-process of the merging program monitors a bidirectional communication connection to obtain the execution data, and performs data merging on the execution data to generate monitoring data. According to an embodiment of the present invention, the first sub-process may perform calculation on the execution data, for example, a statistical number of times or the like.
In one embodiment, the monitoring data is sent to a monitoring server by a second sub-process of the consolidation program. And after receiving the monitoring data sent by the first subprocess, the second subprocess periodically sends the monitoring data to the monitoring server.
In one embodiment, the configuration information of the merging program is updated regularly by a third sub-process of the merging program. A third sub-process, such as an update configuration thread, is responsible for sending the context information to the server when the jd _ daemon is started, and obtaining the configuration information from the server, where the configuration related to jd _ agent.so is written into the shared memory to be read by jd _ agent.so, and then periodically (for example, 10 seconds) obtain the updated configuration information from the server. The configuration information may include: and merging the configuration files loaded by the process and capturing the preset rules of the execution data in the extension program.
In S208, the monitoring data is sent to the monitoring server through the merging program. After the merging program generates monitoring data through the first subprogram, the monitoring data is periodically reported to the monitoring server through the second subprogram, and the monitoring data is displayed.
According to the application program monitoring method, the application expansion program is used for monitoring the running state of the application, and compared with a point burying mode in the prior art, on one hand, more execution data can be conveniently acquired, the number of the buried points is limited, and if more execution data needs to be acquired, more points need to be buried. On the other hand, the multiplexing of the extension program is realized by adding the bottom layer code of the extension program in the kernel without rewriting the upper layer code of the application program, and the execution data of the application program is quickly acquired.
It should be clearly understood that this disclosure describes how to make and use particular examples, but the principles of this disclosure are not limited to any details of these examples. Rather, these principles can be applied to many other embodiments based on the teachings of the present disclosure.
Fig. 3 is a schematic diagram illustrating an application monitoring method according to another exemplary embodiment. Fig. 3 illustrates an overall process of application monitoring.
The method comprises the steps that a PHP extension program is arranged in an extension program server in advance, can be arranged in the PHP program and is started along with the starting of the PHP program;
the proxy server obtains an access instruction of the application program and forwards the access instruction to the extension program server.
The extension program server monitors a plurality of functions in the application program in real time through the extension program, captures execution data of the application program according to a preset rule after receiving an access request, and sends the execution data to the data server.
The merging program can be located in the data server, and the merging program can perform data merging on the execution data to generate monitoring data; and sending the monitoring data to a monitoring server.
And the monitoring server receives and displays the monitoring data.
An application monitoring method according to the present disclosure. The PHP extension program is used for capturing detailed data in the execution process of the PHP application, and is not used for capturing simple data in a mode of adding a buried point code in the PHP application. The full information of the PHP application program can be automatically captured without modifying the PHP application code.
Fig. 4 is a schematic diagram illustrating an application monitoring method according to another exemplary embodiment. As shown in fig. 4, when the jd _ daemon of the merge program is started, a child process of the jd _ daemon is created, and the parent process is responsible for monitoring whether the child process abnormally exits, and if so, restarting the child process. A sub-process may specifically be created, for example, by way of a fork function, which is a bifurcated function in UNIX and UNIX-like (UNIX-like) systems. Return value of fork function: if the calling is successful once, returning two values, returning 0 by the child process, and returning a child process mark by the parent process; otherwise, the error returns to-1.
The fork function divides the running program into 2 (almost) identical processes, each of which starts a thread that starts from the same location in the code. The threads in the two processes continue to execute as if two users started two copies of the application at the same time.
In one embodiment, after the jd _ daemon sub-process first loads the configuration file, three threads may be started: a listening thread, a heartbeat thread and an updating configuration thread. And monitoring the bidirectional communication connection through a monitoring thread to acquire the execution data, and performing data combination on the execution data to generate monitoring data. And sending the monitoring data to a monitoring server through a heartbeat thread. And updating the configuration information of the merging program at regular time by updating the configuration thread.
Those skilled in the art will appreciate that all or part of the steps implementing the above embodiments are implemented as computer programs executed by a CPU. When executed by the CPU, performs the functions defined by the above-described methods provided by the present disclosure. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
FIG. 5 is a block diagram illustrating an application monitoring apparatus in accordance with an exemplary embodiment. The application monitoring device 50 includes: a grabbing module 502, a first sending module 504, a generating module 506, and a second sending module 508.
A crawling module 502 configured to crawl the execution data of the application program according to a predetermined rule by the extension program.
A first sending module 504 configured to send the execution data to a merging program through the extension program.
A generating module 506, configured to perform data merging on the execution data through the merging program, so as to generate monitoring data. And
a second sending module 508, configured to send the monitoring data to the monitoring server through the merging program.
An application monitoring method according to the present disclosure. The PHP extension program is used for capturing detailed data in the execution process of the PHP application, and is not used for capturing simple data in a mode of adding a buried point code in the PHP application. The full information of the PHP application program can be automatically captured without modifying the PHP application code
FIG. 6 is a block diagram illustrating an application monitoring system in accordance with another exemplary embodiment. The application monitoring system 60 includes: a proxy server 602, an extender server 604, a data server 606, and a monitoring server 608.
Proxy server 602 is configured to obtain access instructions for the application; and forwarding the access instruction to an extension program server.
The extension program server 604 is configured to grab the execution data of the application program according to a predetermined rule by the extension program and send the execution data to the data server.
The data server 606 is configured to perform data merging on the execution data to generate monitoring data; and sending the monitoring data to a monitoring server.
Monitoring server 608 is configured to receive the monitoring data and present it.
FIG. 7 is a block diagram illustrating an electronic device in accordance with an example embodiment.
An electronic device 200 according to this embodiment of the present disclosure is described below with reference to fig. 7. The electronic device 200 shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, the electronic device 200 is embodied in the form of a general purpose computing device. The components of the electronic device 200 may include, but are not limited to: at least one processing unit 210, at least one memory unit 220, a bus 230 connecting different system components (including the memory unit 220 and the processing unit 210), a display unit 240, and the like.
Wherein the storage unit stores program code executable by the processing unit 210 to cause the processing unit 210 to perform the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned electronic prescription flow processing method section of the present specification. For example, the processing unit 210 may perform the steps as shown in fig. 2.
The memory unit 220 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)2201 and/or a cache memory unit 2202, and may further include a read only memory unit (ROM) 2203.
The storage unit 220 may also include a program/utility 2204 having a set (at least one) of program modules 2205, such program modules 2205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 230 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 200 may also communicate with one or more external devices 300 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 200, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 200 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 250. Also, the electronic device 200 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 260. The network adapter 260 may communicate with other modules of the electronic device 200 via the bus 230. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiments of the present disclosure.
Fig. 8 schematically illustrates a computer-readable storage medium in an exemplary embodiment of the disclosure.
Referring to fig. 8, a program product 400 for implementing the above method according to an embodiment of the present disclosure is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The computer readable medium carries one or more programs which, when executed by a device, cause the computer readable medium to perform the functions of: monitoring a plurality of functions in the application program in real time through the extension program; acquiring execution parameters of the functions through the extension program according to a preset rule, and generating a plurality of pieces of sub-monitoring data; carrying out data combination on the plurality of sub-monitoring data to generate monitoring data; and sending the monitoring data to a monitoring server through a timing task.
Those skilled in the art will appreciate that the modules described above may be distributed in the apparatus according to the description of the embodiments, or may be modified accordingly in one or more apparatuses unique from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Exemplary embodiments of the present disclosure are specifically illustrated and described above. It is to be understood that the present disclosure is not limited to the precise arrangements, instrumentalities, or instrumentalities described herein; on the contrary, the disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (12)

1. An application monitoring method, comprising:
capturing execution data of the application program according to a preset rule through the extension program;
sending the execution data to a merging program through the extension program;
performing data merging on the execution data through the merging program to generate monitoring data; and
and sending the monitoring data to a monitoring server through the merging program.
2. The method of claim 1, wherein capturing execution data of the application according to a predetermined rule by the extension program comprises:
and receiving an access instruction of the application program through the extension program, and triggering the extension program to capture the execution data of the application program according to a preset rule.
3. The method of claim 1, further comprising:
arranging the extension program in a kernel of the application program.
4. The method of claim 1, wherein capturing execution data of the application according to a predetermined rule by the extension program comprises:
determining the name of a function to be monitored according to a preset rule;
and capturing the execution data corresponding to the function name in the application program through an extension program.
5. The method of claim 4, wherein capturing the execution data corresponding to the function name in the application program by an extender comprises:
and the extension program acquires the execution data corresponding to the function name in a function pointer replacement mode.
6. The method of claim 1, wherein data merging the execution data by the merging program to generate monitoring data comprises:
and monitoring the bidirectional communication connection through the first subprocess of the merging program to acquire the execution data, and performing data merging on the execution data to generate monitoring data.
7. The method of claim 6, wherein sending the monitoring data to a monitoring server via the consolidation program comprises:
and sending the monitoring data to a monitoring server through a second subprocess of the merging program.
8. The method of claim 7, wherein the method further comprises:
and updating the configuration information of the merging program at regular time through a third subprocess of the merging program.
9. An application monitoring apparatus, comprising:
the grabbing module is configured to grab the execution data of the application program according to a preset rule through the extension program;
a first sending module configured to send the execution data to a merging program through the extension program;
the generating module is configured to perform data merging on the execution data through the merging program to generate monitoring data; and
and the second sending module is configured to send the monitoring data to a monitoring server through the merging program.
10. An application monitoring system, comprising:
the proxy server is configured to acquire an access instruction of the application program; and forwarding the access instruction to an extension program server;
the system comprises an extension program server, a data server and a data processing system, wherein the extension program server is configured to capture execution data of an application program according to a preset rule through an extension program and send the execution data to the data server;
the data server is configured to perform data combination on the execution data to generate monitoring data; sending the monitoring data to a monitoring server;
and the monitoring server is configured to receive and display the monitoring data.
11. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-8.
12. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-8.
CN202010002014.2A 2020-01-02 2020-01-02 Application program monitoring method, device and system, electronic equipment and readable medium Pending CN113064783A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010002014.2A CN113064783A (en) 2020-01-02 2020-01-02 Application program monitoring method, device and system, electronic equipment and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010002014.2A CN113064783A (en) 2020-01-02 2020-01-02 Application program monitoring method, device and system, electronic equipment and readable medium

Publications (1)

Publication Number Publication Date
CN113064783A true CN113064783A (en) 2021-07-02

Family

ID=76558194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010002014.2A Pending CN113064783A (en) 2020-01-02 2020-01-02 Application program monitoring method, device and system, electronic equipment and readable medium

Country Status (1)

Country Link
CN (1) CN113064783A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120036516A1 (en) * 2008-10-09 2012-02-09 International Business Machines Corporation Integrated extension framework
CN103049385A (en) * 2012-12-29 2013-04-17 百度在线网络技术(北京)有限公司 PHP (professional hypertext preprocessor) code debugging method and PHP code debugging system in cloud environment
CN105183629A (en) * 2014-05-29 2015-12-23 北京基调网络系统有限公司 Diagnosis system and diagnosis method for analyzing performance of PHP application software, and performance management platform thereof
US20160246592A1 (en) * 2015-02-20 2016-08-25 International Business Machines Corporation Dynamic extensibility of application programming interfaces
CN108108286A (en) * 2018-01-03 2018-06-01 上海众人网络安全技术有限公司 Method of data capture and device, server, storage medium
CN108664793A (en) * 2017-03-30 2018-10-16 腾讯科技(深圳)有限公司 A kind of method and apparatus of detection loophole

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120036516A1 (en) * 2008-10-09 2012-02-09 International Business Machines Corporation Integrated extension framework
CN103049385A (en) * 2012-12-29 2013-04-17 百度在线网络技术(北京)有限公司 PHP (professional hypertext preprocessor) code debugging method and PHP code debugging system in cloud environment
CN105183629A (en) * 2014-05-29 2015-12-23 北京基调网络系统有限公司 Diagnosis system and diagnosis method for analyzing performance of PHP application software, and performance management platform thereof
US20160246592A1 (en) * 2015-02-20 2016-08-25 International Business Machines Corporation Dynamic extensibility of application programming interfaces
CN108664793A (en) * 2017-03-30 2018-10-16 腾讯科技(深圳)有限公司 A kind of method and apparatus of detection loophole
CN108108286A (en) * 2018-01-03 2018-06-01 上海众人网络安全技术有限公司 Method of data capture and device, server, storage medium

Similar Documents

Publication Publication Date Title
CN107491488B (en) Page data acquisition method and device
CN108984714B (en) Page rendering method and device, electronic equipment and computer readable medium
CN110704771B (en) Page abnormality monitoring method, system, device, electronic equipment and readable medium
CN109829121B (en) Method and device for reporting click behavior data
CN110795649A (en) Target page display method, device and system and electronic equipment
CN113760324A (en) Method and device for constructing micro front-end application
CN110795315A (en) Method and device for monitoring service
CN112347169A (en) PHP (hypertext preprocessor) framework based user request processing method and device and electronic equipment
CN113254320A (en) Method and device for recording user webpage operation behaviors
US20150142786A1 (en) Modification of cloud application service levels based upon document consumption
CN112506854A (en) Method, device, equipment and medium for storing page template file and generating page
CN110928571A (en) Business program development method and device
WO2023092580A1 (en) Page display method and apparatus, storage medium, and electronic device
US20130325851A1 (en) Free-Text Search for Integrating Management of Applications
CN113742551A (en) Dynamic data capture method based on script and puppeteer
CN106383869B (en) Method and device for acquiring user behavior information
CN113791943A (en) Website real-time monitoring method, system, equipment and storage medium
CN113064783A (en) Application program monitoring method, device and system, electronic equipment and readable medium
CN108845864B (en) Spring frame-based JVM garbage recycling method and device
US20180373512A1 (en) Method and device for simulating synchronous blocking in asynchronous environment, storage medium, server and terminal
CA2788100C (en) Crawling of generated server-side content
US11803438B2 (en) Message call request data having error frequency metrics
US10769388B2 (en) Changing a language for a user session replay
CN114741158A (en) Page switching method, device, equipment and storage medium
CN111988405B (en) Message rewriting method of load balancing device and load balancing device

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