CN108345524A - Method for monitoring application program and Application Monitoring device - Google Patents

Method for monitoring application program and Application Monitoring device Download PDF

Info

Publication number
CN108345524A
CN108345524A CN201710054388.7A CN201710054388A CN108345524A CN 108345524 A CN108345524 A CN 108345524A CN 201710054388 A CN201710054388 A CN 201710054388A CN 108345524 A CN108345524 A CN 108345524A
Authority
CN
China
Prior art keywords
application program
monitoring
caton phenomenon
thread
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710054388.7A
Other languages
Chinese (zh)
Other versions
CN108345524B (en
Inventor
吴海涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710054388.7A priority Critical patent/CN108345524B/en
Publication of CN108345524A publication Critical patent/CN108345524A/en
Application granted granted Critical
Publication of CN108345524B publication Critical patent/CN108345524B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A kind of method for monitoring application program and device, the method for one embodiment include:Monitor the operating parameter of application program;Judge whether the application program occurs Caton phenomenon according to the operating parameter listened to;When judging that Caton phenomenon occurs for the application program, the stack information of the operating status and each thread of the current process of the application program is recorded.The scheme of the present embodiment can be monitored the Caton phenomenon of application program in the case where retaining interim card scene, improve the accuracy to utility card phenomenon monitoring and analysis accordingly.

Description

Method for monitoring application program and Application Monitoring device
Technical field
The present invention relates to technical field of information processing, more particularly to a kind of method for monitoring application program and a kind of application Program monitoring device.
Background technology
With becoming increasingly popular for the intelligent terminals such as smart mobile phone, tablet computer, the processing capacity of intelligent terminal Increasingly stronger, the number for capableing of the application program of installation and operation is more.In the operational process of application program, it is possible that Caton phenomenon is collected the Caton phenomenon of application program, is analyzed in order to the interim card problem of application program, with correspondence It is analyzed with the performance of program, and then is improved convenient for application program, be an important content in application program application. It is directed to the monitoring of application program interim card problem at present, typically when Caton phenomenon occurs in application program, in the day of application program It is recorded in will, and attempts to reappear based on log recording, analyzed accordingly.However, since log recording can not be complete Reflect interim card scene, and user environment is not only identical, based on log recording, can completely does not reappear interim card, to It is easy to cause the inaccuracy analyzed Caton phenomenon.
Invention content
Based on this, the purpose of the present embodiment is that providing a kind of method for monitoring application program and a kind of Application Monitoring Device can be monitored the Caton phenomenon of application program in the case where retaining interim card scene, be improved accordingly to application Program Caton phenomenon monitors and the accuracy of analysis.
In order to achieve the above objectives, the present embodiment uses following technical scheme:
A kind of method for monitoring application program, including step:
Monitor the operating parameter of application program;
Judge whether the application program occurs Caton phenomenon according to the operating parameter listened to;
When judging that Caton phenomenon occurs for the application program, the operating status of the current process of the application program is recorded With the stack information of each thread.
A kind of method for monitoring application program device, including:
Monitor module, the operating parameter for monitoring application program;
Judgment module, the operating parameter for being listened to according to the monitoring module judge whether the application program occurs Caton phenomenon;
Logging modle, for when the judgment module judges that Caton phenomenon occurs for the application program, being answered described in record With the stack information of the operating status and each thread of the current process of program.
Based on the scheme of embodiment as described above, monitored by the operating parameter to application program, and in root When Caton phenomenon occurs according to the operating parameter judgement application program listened to, the operation shape of the current process of the application program is recorded The stack information of state and each thread, and the stack information of the operating status of the current process of application program and each thread is fine Reflect interim card scene, so as to be monitored to the Caton phenomenon of application program in the case where retaining interim card scene, The accuracy to utility card phenomenon monitoring and analysis is improved accordingly.
Description of the drawings
Fig. 1 is the schematic diagram of the application environment of the scheme in one embodiment;
Fig. 2 is the schematic diagram of the composed structure of the terminal in one embodiment;
Fig. 3 is the flow diagram of the method for monitoring application program in one embodiment;
Fig. 4 is the monitoring principle schematic of this embodiment scheme in a specific example;
Fig. 5 is the schematic diagram of the upload interface in a specific example;
Fig. 6 is the principle schematic of the background server in a specific example;
Fig. 7 is the schematic diagram at the interface analyzed Caton phenomenon in a specific example;
Fig. 8 is the structural schematic diagram of the Application Monitoring device of one embodiment;
Fig. 9 is the structural schematic diagram of the monitoring module in a specific example;
Figure 10 is the structural schematic diagram of the logging modle in a specific example.
Specific implementation mode
To make the objectives, technical solutions, and advantages of the present invention more comprehensible, with reference to the accompanying drawings and embodiments, to this Invention is described in further detail.It should be appreciated that the specific embodiments described herein are only used to explain the present invention, Do not limit protection scope of the present invention.
Fig. 1 shows the working environment schematic diagram in one embodiment of the invention, as shown in Figure 1, its working environment is related to Terminal 101 and background server 102, terminal 101 can be communicated with background server 102 by network.In terminal 101 Operation has various application programs, terminal 101 to be monitored the application program that it runs, and interim card occurs listening to application program When phenomenon, the relevant parameter at interim card scene occurs for the record of terminal 101, and these relevant parameters are sent to background server 102, The Caton phenomenon of application program is analyzed according to these relevant parameters received by background server 102.The present invention is real It applies example and refers to the scheme that terminal 101 is monitored the Caton phenomenon of application program.
The structural schematic diagram of terminal 101 in one embodiment is as shown in Figure 2.The terminal 101 includes passing through system bus Processor, storage medium, communication interface, power interface and the memory of connection.Wherein, the storage medium of terminal 101 is stored with one Kind Application Monitoring device, the device is for realizing a kind of method for monitoring application program.The communication interface of terminal 101 be used for Background server 102 connects and communication, and for the power interface of terminal 101 for being connect with external power supply, external power supply passes through the electricity Source interface is powered to terminal 101.Terminal 101 can be the equipment that any type can realize intelligent input output, such as move Terminal, such as mobile phone, tablet computer etc.;Personal computer etc. can also be other equipment with above structure.
Fig. 3 shows the flow diagram of the method for monitoring application program in one embodiment, as shown in figure 3, the implementation Example method for monitoring application program include:
Step S301:Monitor the operating parameter of application program;
Step S302:Judge whether the application program occurs Caton phenomenon according to the operating parameter listened to, is judging When stating application program generation Caton phenomenon, S303 is entered step;
Step S303:Record the stack information of the operating status and each thread of the current process of the application program.
Based on the scheme of embodiment as described above, monitored by the operating parameter to application program, and in root When Caton phenomenon occurs according to the operating parameter judgement application program listened to, the operation shape of the current process of the application program is recorded The stack information of state and each thread, and the stack information of the operating status of the current process of application program and each thread is fine Reflect interim card scene, so as to be monitored to the Caton phenomenon of application program in the case where retaining interim card scene, The accuracy to utility card phenomenon monitoring and analysis is improved accordingly.
Wherein, when monitoring the operating parameter of application program in above-mentioned steps S301, any possible mode may be used It carries out, is illustrated below in conjunction with wherein several ways.
In a specific example, the mode for monitoring the operating parameter of application program may include:It monitors described using journey The operation starting time of the main thread of sequence, at this point, above-mentioned operating parameter includes the operation starting time.In particular technique application In, the operation starting time of the main thread of application program can be monitored by creating a new monitoring sub-line journey.
At this point, judging whether the application program occurs interim card and show according to the operating parameter listened in above-mentioned steps S302 As when, can the operating status of the current process of the application program be operation in and current time bring into operation with described When the difference of time is more than or equal to scheduled time threshold value, judge that Caton phenomenon occurs for the application program.
In particular technique application, the operation starting time of main thread each time and the main thread each time can be recorded End run time, so as to using the operation starting time of time nearest main thread as the main thread of application program Operation starting time.The operation starting time of each secondary main thread recorded terminates run time, can be carrying out others Relevant correlation analysis.On the other hand, can also be the operation starting time of the only main thread of records application program, in main thread After terminating operation, the operation starting time of record is disposed, to when above-mentioned steps S302 is judged, directly read note The operation starting time of record.
Monitor application program main thread operation starting time when, at one application example in, can be by Embedded observer functions in the main thread of application program, and described in the monitoring of the observer functions by being embedded in main thread The operation starting time of the main thread of application program.It, can be by being associated with the application program in another is using example Screen-refresh timer monitor rendering frame time started of the application program, and using the rendering frame time started as institute State operation starting time.Here screen-refresh timer can be such as CADisplayLinkUI, so as to incite somebody to action After CADisplayLinkUI is embedded into main thread, monitored by the CADisplayLinkUI objects that are embedded in main thread described in The rendering frame time started of application program.
In another specific example, the mode for monitoring the operating parameter of application program may include:Monitor the application The operating status of the main thread of program.At this point, above-mentioned operating parameter includes the operating status of the main thread of the application program.
In the case, judge whether the application program is sent out according to the operating parameter listened in above-mentioned steps S302 Can be when the operating status of the main thread of the application program is the waiting event stage, described in judgement when raw Caton phenomenon Caton phenomenon occurs for application program.
In another specific example, the mode for monitoring the operating parameter of application program may include:Monitor the application The CPU usage of program.At this point, above-mentioned operating parameter includes the CPU usage of the application program.
In the case, judge whether the application program is sent out according to the operating parameter listened in above-mentioned steps S302 Can be when the CPU usage of the application program is more than or equal to utilization rate threshold value, described in judgement when raw Caton phenomenon Caton phenomenon occurs for application program.
In another specific example, the mode for monitoring the operating parameter of application program may include:Monitor the application The frame spatial cue of program.At this point, above-mentioned operating parameter includes the frame spatial cue of the application program.
In the case, judge whether the application program is sent out according to the operating parameter listened in above-mentioned steps S302 Can be when the frame spatial cue of the application program judges that the application program falls frame, described in judgement when raw Caton phenomenon Caton phenomenon occurs for application program.
In concrete application example, when above-mentioned steps S301 monitors the operating parameter of application program, Ke Yishi It is monitored once at interval of certain period of time, to continuously realize the monitoring to operating parameter.The period can tie Actual techniques application is closed to be set.Accordingly, it is existing to judge that interim card does not occur for the application program in above-mentioned steps S302 As when, can also return after being spaced preset time period and judge whether the application program is sent out according to the operating parameter that listens to The step of raw Caton phenomenon, again to whether Caton phenomenon occurring judging.The preset time period can be in conjunction with actual needs Set, can be identical as the above-mentioned period of monitoring operating parameter, can also be more than above-mentioned monitoring operating parameter when Between section.
The heap of the operating status and each thread of the current process for recording the application program in above-mentioned steps S303 When stack information, the mode in a specific example may include:By the operating status of the current process of the application program and respectively Dump files are recorded in the stack information of a thread.So as to by the operating status of the current process of application program and each line The stack information of journey is recorded in a manner of file, and subsequent point is carried out convenient for storing and convenient for uploading to background server Analysis.
Wherein, it is above-mentioned dump files are recorded when, the mode in a specific example can be:
Judge whether there is dump files corresponding with the Caton phenomenon;Can judge application program when specifically judging The call stack of the call stack of current main thread and the current main thread recorded in the dump files of last time Caton phenomenon whether phase Together;If identical, dump files corresponding with the Caton phenomenon have been can be determined that;If differing, can be determined that not with this The corresponding dump files of Caton phenomenon.
If so, being determined with dump files corresponding with the Caton phenomenon, then ignore the Caton phenomenon, without repeatedly generating Corresponding dump files.
If it is not, judging dump files not corresponding with the Caton phenomenon, then the dump files of the Caton phenomenon are generated, And the stack information of the operating status of the current process of the application program and each thread is recorded to the dump texts of generation Part.
In a specific example, the operating status of the current process of the application program is recorded in above-mentioned steps S303 After the stack information of each thread, these information of record can also be sent to background server, so as to background server It is analyzed.Therefore, the method for the present embodiment can also include step:
Interim card is sent to background server and records information, and the interim card record information includes the application program of record The stack information of the operating status of current process and each thread records information into line number by background server according to the interim card According to analysis.
Wherein, in above-mentioned steps S303 the operating status currently carried out and each thread of records application program storehouse It is when being recorded as dump files when information, then can is that dump files are uploaded into background server.It is uploaded by dump files It can be that timing uploads to be to background server, can also be that the instruction based on terminal user uploads.
In the case of being uploaded with the instruction based on terminal user, at this point, the method for monitoring application program in the present embodiment is also It may include step:
Uploading instructions are received, the uploading instructions include time range;
Obtain the dump files in the time range;
Dump files in the time range are sent to background server, by background server according to dump texts Part carries out data analysis.
In the case where timing uploads, at this point, the method for monitoring application program in the present embodiment can also include step:
Reach it is predetermined report time point when, obtain it is last it is predetermined report time point with it is current it is predetermined report time point it Between dump files;
The dump files of acquisition are sent to background server, data are carried out according to the dump files by background server Analysis.
Based on the method for monitoring application program in embodiment as described above, in the process of terminal user's using terminal In, when interim card occurs in the process of running in the application program (such as APP (Application, third party application)) of terminal When, this embodiment scheme can record interim card scene, the i.e. operating status of the current process of above application program and each line Then the stack information of journey uploads to background server and is analyzed.It is of course also possible, as described before, if generating dump files, also Dump files actively can be uploaded to background server by terminal user to analyze for developer.
Accordingly, Fig. 4 shows the schematic diagram of the monitoring principle of this embodiment scheme in a specific example, the present embodiment In scheme, independent monitoring sub-line journey can be created, a series of operating index of the application program of terminal are monitored, these Using application program during application program, whether interim card is closely bound up with terminal for operating index.Further, it is also possible to each fortune Corresponding threshold value is arranged in row index, when the operating index monitored is more than corresponding threshold value, you can be considered as application program hair Interim card has been given birth to, the acute record of relevant parameter of application program is carried out at the same time, to capture interim card scene.
When interim card occurs for application program, it is mainly reflected in that interface operation does not react, and in the code layer of application program Face is then mainly reflected in main thread is busy, main thread enters the waiting event stage or CPU usage is excessively high etc., to lead Main thread is caused not respond to the events such as click or the sliding of user.
Accordingly, at one application example in, as shown in figure 4, can be the main thread of application program is monitored it is each The run time of secondary main thread.For example, it may be being monitored to main thread runloop, main thread runloop each time is monitored Run time, be considered interim card if run time is long.Can be by main thread in particular technique application Increase observer functions in runloop, to could be aware that each main thread runloop starts by observer functions The time point of operation, i.e. operation starting time, after being used as monitoring thread by one sub-line journey of unlatching, which can determine When the operation starting time of each main thread runloop is checked by observer, if it exceeds certain time should Secondary main thread runloop, which is also not carried out, to be finished, i.e. the difference of current time and the operation starting time of the secondary main thread runloop When more than or equal to scheduled time threshold value, then judge that main thread generates interim card.
After monitoring application program and Caton phenomenon occurs, need to retain interim card scene, it is more useful in order to have Information, can be when monitoring application program Caton phenomenon occurring, by all threads in the process of application program in the present embodiment Call stack all record, include the stack information of the operating status of the current process of application program and each thread, as Analyze information when interim card reason.
Monitor application program occur Caton phenomenon after, can according to the call stack of the current main thread of application program, Judge whether the current Caton phenomenon has been recently noted as dump files, such as judges the current main thread of application program Call stack it is whether identical as the call stack of the current main thread recorded in the dump files of last Caton phenomenon, if phase Together, then dump files have been registered as, if it is not the same, not being registered as dump files then.
It is empty in order to avoid repeating record dump files consumption terminal local storage if being registered as dump files Between, then ignore the Caton phenomenon, then temporarily without record, if not being registered as dump files, is recorded as dump texts Part is simultaneously preserved.Wherein, when being recorded as dump files, the write-in of the partial log information of application program can also be somebody's turn to do simultaneously Dump files.Wherein, each Caton phenomenon can generate a corresponding dump file.
Terminal can upload to background server, background server after generating dump files based on the strategy of setting The dump files received can be preserved, and do analyzing processing and obtain final analysis result, used for developer.
Terminal can be terminal at interval of after a certain period of time automatically will be upper when dump files are uploaded to background server It passes and the dump files generated later either a certain number of dump files is once reported to upload to background server, can also be It is reported manually.Fig. 5 shows the schematic diagram of the upload interface in a specific example, as shown in figure 5, can select to report The dump files of whole dump files either which period (such as certain day).Dump files are uploaded to backstage and taken by terminal When business device, any possible network communication protocol can be based on and carried out.
Background server can also be a server cluster with an independent server.It is with background server For server cluster, Fig. 6 shows that the principle schematic of the background server in a specific example, background server are connecing After the dump files for receiving terminal upload, the dump files received are stored in storage server, then by Analysis server Timing is analyzed from storage server pulling data, and result after data analysis can be to show in terminal that developer uses Show, checked for developer, convenient for being improved to application program.When carrying out data analysis, any possibility may be used Mode carry out.Due to the storehouse letter of the operating status and each thread of the current process for having recorded application program in dump files Therefore breath when being analyzed, can be analyzed, specific clustering mode the present embodiment is not by modes such as clusters It limits, it is as shown in Figure 7 to carry out analysis post analysis interface to Caton phenomenon in a specific example.
Method in embodiment as described above, can integrate and apply in the application, can also be integrated apply On one component, for other application calls.
Based on thought identical with the method in above-described embodiment, a kind of Application Monitoring device is also provided.
Fig. 8 shows the structural schematic diagram of the Application Monitoring device in one embodiment, the application in the embodiment Program monitoring device includes:
Monitor module 801, the operating parameter for monitoring application program;
Whether judgment module 802, the operating parameter for being listened to according to the monitoring module judge the application program Caton phenomenon occurs;
Logging modle 803 is used for when the judgment module judges that Caton phenomenon occurs for the application program, described in record The stack information of the operating status of the current process of application program and each thread.
Based on the scheme of embodiment as described above, monitored by the operating parameter to application program, and in root When Caton phenomenon occurs according to the operating parameter judgement application program listened to, the operation shape of the current process of the application program is recorded The stack information of state and each thread, and the stack information of the operating status of the current process of application program and each thread is fine Reflect interim card scene, so as to be monitored to the Caton phenomenon of application program in the case where retaining interim card scene, The accuracy to utility card phenomenon monitoring and analysis is improved accordingly.
Module 801 is monitored when monitoring the operating parameter of application program, any possible mode may be used and carry out.Fig. 9 In show the structural schematic diagram of monitoring module in a specific example.
As shown in figure 9, in a specific example, monitoring module 801 may include:
Run time monitoring module 8011, the operation starting time of the main thread for monitoring the application program, at this point, Above-mentioned operating parameter includes the operation starting time.It, can be by creating new monitoring in particular technique application Thread is monitored the operation starting time of the main thread of application program.
At this point, above-mentioned judgment module 802 can the operating status of the current process of the application program be operation in and When current time and the difference of the operation starting time are more than or equal to scheduled time threshold value, the application program hair is judged Raw Caton phenomenon.
In particular technique application, the operation starting time of main thread each time and the main thread each time can be recorded End run time, so as to using the operation starting time of time nearest main thread as the main thread of application program Operation starting time.The operation starting time of each secondary main thread recorded terminates run time, can be carrying out others Relevant correlation analysis.On the other hand, can also be the operation starting time of the only main thread of records application program, in main thread After terminating operation, the operation starting time of record is disposed, to which judgment module 802 is when being judged, directly reads note The operation starting time of record.
In a specific example, run time monitors module 8011 can be by the observer that is embedded in main thread Function monitors the operation starting time of the main thread of the application program.In another is using example, run time monitors mould Block 8011 can be started by monitoring the rendering frame of the application program with the associated screen-refresh timer of the application program Time, and using the rendering frame time started as the operation starting time.Here screen-refresh timer can be example Such as CADisplayLinkUI (one content can be signed in the timer on screen with frequency identical with screen refresh rate), from And after can CADisplayLinkUI being embedded into main thread, pass through the CADisplayLinkUI objects being embedded in main thread Monitor the rendering frame time started of the application program.
In another specific example, as shown in figure 9, the monitoring module 801 may include:
Operating status monitors module 8012, the operating status of the main thread for monitoring the application program.At this point, above-mentioned Operating parameter includes the operating status of the main thread of the application program.
In the case, judgment module 802 can be waiting event in the operating status of the main thread of the application program When the stage, judge that Caton phenomenon occurs for the application program.
In another specific example, as shown in figure 9, the monitoring module 801 may include:
Utilization rate monitors module 8013, the CPU usage for monitoring the application program.At this point, above-mentioned operating parameter Include the CPU usage of the application program.
In the case, judgment module 802 can be more than or equal to utilization rate in the CPU usage of the application program When threshold value, judge that Caton phenomenon occurs for the application program.
In another specific example, as shown in figure 9, the monitoring module 801 may include:
Spatial cue monitors module 8014, the frame spatial cue for monitoring the application program.At this point, above-mentioned operation ginseng Number includes the frame spatial cue of the application program.
In the case, judgment module 802 can judge the application program in the frame spatial cue of the application program When falling frame, judge that Caton phenomenon occurs for the application program.
In concrete application example, judgment module 802 can be every when the operating parameter to application program is monitored It is spaced certain period of time to monitor once, to continuously realize the monitoring to operating parameter.The period can combine Actual techniques application is set.
Accordingly, in a specific example, above-mentioned judgment module 802 is additionally operable to block in the judgement application program When phenomenon after be spaced preset time period, the operating parameter that is listened to again according to the monitoring module judges described using journey Whether sequence occurs Caton phenomenon.The preset time period can be set in conjunction with actual needs, can be run and be joined with above-mentioned monitoring Several periods is identical, can also be more than the period of above-mentioned monitoring operating parameter.
The stack information of the operating status and each thread of the current process of the application program is recorded in logging modle 803 When, the mode in a specific example may include:By the operating status of the current process of the application program and each thread Stack information dump files are recorded.So as to by the heap of the operating status of the current process of application program and each thread Stack information is recorded in a manner of file, and subsequent analysis is carried out convenient for storing and convenient for uploading to background server.
The structural schematic diagram of the logging modle 803 in a specific example is shown in Figure 10, the logging modle 803 packet It includes:
Searching module 8031, for judging whether there is dump files corresponding with the Caton phenomenon;It is specific when judging, it can be with The current main line for being the call stack for the current main thread for judging application program and being recorded in the dump files of last Caton phenomenon Whether the call stack of journey is identical;If identical, dump files corresponding with the Caton phenomenon have been can be determined that;If differing, It can be determined that dump files not corresponding with the Caton phenomenon;
File generating module 8032, for when the judgement result of searching module 8031 is no, generating the Caton phenomenon Dump files, and generation is recorded in the stack information of the operating status of the current process of the application program and each thread The dump files.
If the judgement result of searching module 8031 is yes, that is, be determined with dump files corresponding with the Caton phenomenon, then it is literary Part generation module 8032 ignores the Caton phenomenon, without repeatedly generating corresponding dump files.
In a specific example, recorded in logging modle 803 current process of the application program operating status and After the stack information of each thread, can also by these information of record to background server send, so as to background server into Row analysis.Therefore, as shown in figure 8, the device of the present embodiment can also include uploading module 804.
Wherein, in a specific example, which records information for sending interim card to background server, The interim card record information includes the operating status of the current process of the application program of record and the storehouse letter of each thread Breath records information according to the interim card by background server and carries out data analysis.
Dump texts are being recorded in the stack information of the operating status of the current process of above application program and each thread Then can be that dump files are uploaded into background server after part.
When dump files are uploaded to background server, it can be that timing uploads, can also be based on terminal user's Instruction uploads.
In the case of being uploaded with the instruction based on terminal user, at this point, the uploading module 804, for receiving uploading instructions, The uploading instructions include time range, obtain the dump files in the time range, and will be in the time range Dump files are sent to background server, and data analysis is carried out according to the dump files by background server.At this point, above-mentioned card Record information of pausing can be embodied by the dump files, and dump files include above-mentioned interim card record information in other words.
In the case where timing uploads, at this point, the uploading module 804, for when arrival makes a reservation for report time point, obtaining Last time makes a reservation for report time point and the current predetermined dump files reported between time point, and the dump files of acquisition are sent To background server, data analysis is carried out according to the dump files by background server.At this point, above-mentioned interim card record information can Being embodied by the dump files, dump files include above-mentioned interim card record information in other words.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, it is non-volatile computer-readable that the program can be stored in one It takes in storage medium, in the embodiment of the present invention, which can be stored in the storage medium of computer system, and by the calculating At least one of machine system processor executes, and includes the flow such as the embodiment of above-mentioned each method with realization.Wherein, described Storage medium can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, to keep description succinct, not to above-mentioned reality It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited In contradiction, it is all considered to be the range of this specification record.
Several embodiments of the invention above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection of the present invention Range.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.

Claims (16)

1. a kind of method for monitoring application program, which is characterized in that including step:
Monitor the operating parameter of application program;
Judge whether the application program occurs Caton phenomenon according to the operating parameter listened to;
When judging that Caton phenomenon occurs for the application program, the operating status of the current process of the application program and each is recorded The stack information of a thread.
2. method for monitoring application program according to claim 1, it is characterised in that:
The mode of operating parameter for monitoring application program includes:The operation starting time of the main thread of the application program is monitored, The operating parameter includes the operation starting time;
Judge that the mode whether application program occurs Caton phenomenon includes according to the operating parameter listened to:In the application The operating status of the current process of program is in operation and current time and the difference of the operation starting time are more than or wait When scheduled time threshold value, judge that Caton phenomenon occurs for the application program.
3. method for monitoring application program according to claim 2, it is characterised in that:
The operation starting time of the main thread of the application program is monitored by the observer functions being embedded in main thread;
Or
By being monitored with the associated screen-refresh timer of the application program rendering frame time started of the application program, and Using the rendering frame time started as the operation starting time.
4. method for monitoring application program according to claim 1, which is characterized in that at least one in including following items :
The mode of operating parameter for monitoring application program includes:The operating status of the main thread of the application program is monitored, it is described Operating parameter includes the operating status of the main thread of the application program;Judged according to the operating parameter listened to described using journey The mode whether sequence occurs Caton phenomenon includes:It it is the waiting event stage in the operating status of the main thread of the application program When, judge that Caton phenomenon occurs for the application program;
The mode of operating parameter for monitoring application program includes:Monitor the CPU usage of the application program, the operating parameter Include the CPU usage of the application program;Judge whether the application program occurs interim card according to the operating parameter listened to The mode of phenomenon includes:When the CPU usage of the application program is more than or equal to utilization rate threshold value, the application is judged Caton phenomenon occurs for program;
The mode of operating parameter for monitoring application program includes:Monitor the frame spatial cue of the application program, the operation ginseng Number includes the frame spatial cue of the application program;Judge whether the application program blocks according to the operating parameter listened to The mode of phenomenon includes:When the frame spatial cue of the application program judges that the application program falls frame, answered described in judgement Caton phenomenon occurs with program.
5. method for monitoring application program according to any one of claims 1 to 4, which is characterized in that answered described in judgement When Caton phenomenon occurs with program, the stack information of the operating status and each thread of the current process of the application program is recorded Mode include:
Dump files are recorded in the stack information of the operating status of the current process of the application program and each thread.
6. method for monitoring application program according to any one of claims 1 to 4, which is characterized in that answered described in judgement When Caton phenomenon occurs with program, the stack information of the operating status and each thread of the current process of the application program is recorded Mode include:
Judge whether there is dump files corresponding with the Caton phenomenon;
If so, ignoring the Caton phenomenon;
If it is not, generate the dump files of the Caton phenomenon, and by the operating status of the current process of the application program and each The dump files of generation are recorded in the stack information of thread.
7. method for monitoring application program according to claim 6, which is characterized in that judge whether there is and the Caton phenomenon pair The mode for the dump files answered includes:
Judge that is recorded in the call stack of the current main thread of the application program and the dump files of last Caton phenomenon works as Whether the call stack of preceding main thread is identical;
If identical, it is determined with dump files corresponding with the Caton phenomenon.
8. method for monitoring application program according to any one of claims 1 to 4, which is characterized in that further include step:
Interim card is sent to background server and records information, and the interim card record information includes the current of the application program of record The stack information of running state of a process and each thread records information according to the interim card by background server and carries out data point Analysis.
9. a kind of Application Monitoring device, which is characterized in that including:
Monitor module, the operating parameter for monitoring application program;
Judgment module, the operating parameter for being listened to according to the monitoring module judge whether the application program occurs interim card Phenomenon;
Logging modle, it is described using journey for when the judgment module judges that Caton phenomenon occurs for the application program, recording The stack information of the operating status of the current process of sequence and each thread.
10. Application Monitoring device according to claim 9, it is characterised in that:
The monitoring module includes:Run time monitors module, and the main thread for monitoring the application program brings into operation Time, the operating parameter include the operation starting time;
The judgment module is in the operating status of the current process of the application program is operation and current time is opened with described When the difference of beginning run time is more than or equal to scheduled time threshold value, judge that Caton phenomenon occurs for the application program.
11. Application Monitoring device according to claim 10, it is characterised in that:
The run time monitors the master that module monitors the application program by the observer functions being embedded in main thread The operation starting time of thread;
Or
It is described using journey by being monitored with the associated screen-refresh timer of the application program that the run time monitors module The rendering frame time started of sequence, and using the rendering frame time started as the operation starting time.
12. Application Monitoring device according to claim 9, which is characterized in that at least one in including following items :
The monitoring module include operating status monitor module, the operating status of the main thread for monitoring the application program, The operating parameter includes the operating status of the main thread of the application program;Master of the judgment module in the application program When the operating status of thread is the waiting event stage, judge that Caton phenomenon occurs for the application program;
The monitoring module includes that utilization rate monitors module, the CPU usage for monitoring the application program, the operation ginseng Number includes the CPU usage of the application program;The judgment module is more than or waits in the CPU usage of the application program When utilization rate threshold value, judge that Caton phenomenon occurs for the application program;
The monitoring module includes that spatial cue monitors module, the frame spatial cue for monitoring the application program, the fortune Row parameter includes the frame spatial cue of the application program;The judgment module judges in the frame spatial cue of the application program When the application program falls frame, judge that Caton phenomenon occurs for the application program.
13. the Application Monitoring device according to claim 9 to 12 any one, which is characterized in that the record mould Dump files are recorded in the stack information of the operating status of the current process of the application program and each thread by block.
14. the Application Monitoring device according to claim 9 to 12 any one, which is characterized in that the record mould Block includes:
Searching module, for judging whether there is dump files corresponding with the Caton phenomenon;
File generating module, for when the judgement result of the searching module is no, generating the dump files of the Caton phenomenon, And the stack information of the operating status of the current process of the application program and each thread is recorded to the dump texts of generation Part.
15. Application Monitoring device according to claim 14, it is characterised in that:
The searching module judges the call stack of the current main thread of the application program and the dump texts of last Caton phenomenon Whether the call stack of the current main thread recorded in part is identical, if identical, is determined with dump files corresponding with the Caton phenomenon.
16. the Application Monitoring device according to claim 9 to 12 any one, which is characterized in that further include:
Uploading module records information for sending interim card to background server, and the interim card record information includes the described of record The stack information of the operating status of the current process of application program and each thread is recorded by background server according to the interim card Information carries out data analysis.
CN201710054388.7A 2017-01-22 2017-01-22 Application program monitoring method and application program monitoring device Active CN108345524B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710054388.7A CN108345524B (en) 2017-01-22 2017-01-22 Application program monitoring method and application program monitoring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710054388.7A CN108345524B (en) 2017-01-22 2017-01-22 Application program monitoring method and application program monitoring device

Publications (2)

Publication Number Publication Date
CN108345524A true CN108345524A (en) 2018-07-31
CN108345524B CN108345524B (en) 2021-12-14

Family

ID=62962878

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710054388.7A Active CN108345524B (en) 2017-01-22 2017-01-22 Application program monitoring method and application program monitoring device

Country Status (1)

Country Link
CN (1) CN108345524B (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218435A (en) * 2018-09-30 2019-01-15 湖北华联博远科技有限公司 A kind of data uploading method and system
CN109446039A (en) * 2018-09-21 2019-03-08 苏州蜗牛数字科技股份有限公司 A kind of method and system of detection device Caton
CN109491907A (en) * 2018-11-05 2019-03-19 网易(杭州)网络有限公司 A kind of Caton detection method, device, electronic equipment and storage medium
CN109542719A (en) * 2018-10-26 2019-03-29 金蝶软件(中国)有限公司 Thread state monitoring method and device, computer equipment and storage medium
CN109918222A (en) * 2019-03-14 2019-06-21 携程计算机技术(上海)有限公司 The dump analysis method and system of application program
CN110177300A (en) * 2019-05-23 2019-08-27 北京字节跳动网络技术有限公司 Monitoring method, device, electronic equipment and the storage medium of running state of programs
CN110188016A (en) * 2019-05-24 2019-08-30 努比亚技术有限公司 Detection method, terminal and storage medium of the application program without response obstruction
CN110618933A (en) * 2019-08-15 2019-12-27 华为技术有限公司 Performance analysis method and system, electronic device and storage medium
CN110874301A (en) * 2018-08-30 2020-03-10 腾讯科技(深圳)有限公司 Method and device for acquiring program pause information
CN110908864A (en) * 2019-11-11 2020-03-24 腾讯科技(深圳)有限公司 Equipment blocking processing method, device, equipment and medium
CN110990243A (en) * 2019-11-29 2020-04-10 天津网之易创新科技有限公司 Caton analysis method and device, storage medium and computing equipment
CN111274086A (en) * 2020-01-15 2020-06-12 湖北工程学院 Computer software fault monitoring system
CN111382026A (en) * 2018-12-28 2020-07-07 广州市百果园信息技术有限公司 Caton monitoring method, device, system, storage medium and computer equipment
CN111625456A (en) * 2020-05-26 2020-09-04 北京达佳互联信息技术有限公司 Stuck positioning method and device
CN111752719A (en) * 2020-06-28 2020-10-09 腾讯音乐娱乐科技(深圳)有限公司 Method and device for detecting stuck
CN112650647A (en) * 2020-12-29 2021-04-13 北京字节跳动网络技术有限公司 Information acquisition method, device, equipment and medium
CN112860469A (en) * 2021-02-04 2021-05-28 百果园技术(新加坡)有限公司 Method, device, equipment and storage medium for collecting information of katon log
CN113297052A (en) * 2020-02-21 2021-08-24 腾讯科技(深圳)有限公司 Application program stuck event positioning method and device, storage medium and equipment
CN113568801A (en) * 2020-04-29 2021-10-29 华为技术有限公司 Frozen screen detection method and device, terminal equipment and computer storage medium
CN113900910A (en) * 2021-12-08 2022-01-07 北京新唐思创教育科技有限公司 Application program monitoring method and device, storage medium and electronic equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043712A (en) * 2009-10-19 2011-05-04 杭州华三通信技术有限公司 Error message output method and device
CN102117240A (en) * 2009-12-31 2011-07-06 腾讯科技(深圳)有限公司 Method and device for acquiring progress blocking information
CN104317649A (en) * 2014-09-30 2015-01-28 北京金山安全软件有限公司 Processing method and device of terminal application program APP and terminal
CN105389258A (en) * 2015-12-10 2016-03-09 腾讯科技(深圳)有限公司 Program detection method and apparatus
CN105589783A (en) * 2014-11-18 2016-05-18 广州市动景计算机科技有限公司 Application program lag problem data obtaining method and device
CN105677573A (en) * 2016-02-26 2016-06-15 厦门美图移动科技有限公司 Halt detection method and device and computing device
CN105740326A (en) * 2016-01-21 2016-07-06 腾讯科技(深圳)有限公司 Thread state monitoring method and device for browser
CN105786571A (en) * 2016-02-29 2016-07-20 珠海市魅族科技有限公司 Mobile terminal and control method thereof
CN105893130A (en) * 2016-03-31 2016-08-24 维沃移动通信有限公司 Mobile terminal application program processing method and mobile terminal
CN106155741A (en) * 2016-06-30 2016-11-23 努比亚技术有限公司 A kind of avoid application program without response processing means and method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043712A (en) * 2009-10-19 2011-05-04 杭州华三通信技术有限公司 Error message output method and device
CN102117240A (en) * 2009-12-31 2011-07-06 腾讯科技(深圳)有限公司 Method and device for acquiring progress blocking information
CN104317649A (en) * 2014-09-30 2015-01-28 北京金山安全软件有限公司 Processing method and device of terminal application program APP and terminal
CN105589783A (en) * 2014-11-18 2016-05-18 广州市动景计算机科技有限公司 Application program lag problem data obtaining method and device
CN105389258A (en) * 2015-12-10 2016-03-09 腾讯科技(深圳)有限公司 Program detection method and apparatus
CN105740326A (en) * 2016-01-21 2016-07-06 腾讯科技(深圳)有限公司 Thread state monitoring method and device for browser
CN105677573A (en) * 2016-02-26 2016-06-15 厦门美图移动科技有限公司 Halt detection method and device and computing device
CN105786571A (en) * 2016-02-29 2016-07-20 珠海市魅族科技有限公司 Mobile terminal and control method thereof
CN105893130A (en) * 2016-03-31 2016-08-24 维沃移动通信有限公司 Mobile terminal application program processing method and mobile terminal
CN106155741A (en) * 2016-06-30 2016-11-23 努比亚技术有限公司 A kind of avoid application program without response processing means and method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
潘娅等: "《软件测试技术与实践》", 30 June 2016, 西安电子科技大学出版社 *
罗惠琼等: "《计算机网络编程与数据通信》", 31 August 2015, 国防工业出版社 *
老谭笔记: "《http://www.cocoachina.com/ios/20161101/17903.html》", 1 November 2016 *

Cited By (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110874301A (en) * 2018-08-30 2020-03-10 腾讯科技(深圳)有限公司 Method and device for acquiring program pause information
CN109446039A (en) * 2018-09-21 2019-03-08 苏州蜗牛数字科技股份有限公司 A kind of method and system of detection device Caton
CN109218435A (en) * 2018-09-30 2019-01-15 湖北华联博远科技有限公司 A kind of data uploading method and system
CN109218435B (en) * 2018-09-30 2021-07-23 湖北华联博远科技有限公司 Data uploading method and system
CN109542719A (en) * 2018-10-26 2019-03-29 金蝶软件(中国)有限公司 Thread state monitoring method and device, computer equipment and storage medium
CN109542719B (en) * 2018-10-26 2022-05-13 金蝶软件(中国)有限公司 Thread state monitoring method and device, computer equipment and storage medium
CN109491907A (en) * 2018-11-05 2019-03-19 网易(杭州)网络有限公司 A kind of Caton detection method, device, electronic equipment and storage medium
CN111382026A (en) * 2018-12-28 2020-07-07 广州市百果园信息技术有限公司 Caton monitoring method, device, system, storage medium and computer equipment
CN111382026B (en) * 2018-12-28 2024-02-06 广州市百果园信息技术有限公司 Method, device, system, storage medium and computer equipment for monitoring card
CN109918222B (en) * 2019-03-14 2022-09-06 携程计算机技术(上海)有限公司 Dump analysis method and system for application program
CN109918222A (en) * 2019-03-14 2019-06-21 携程计算机技术(上海)有限公司 The dump analysis method and system of application program
CN110177300A (en) * 2019-05-23 2019-08-27 北京字节跳动网络技术有限公司 Monitoring method, device, electronic equipment and the storage medium of running state of programs
CN110188016B (en) * 2019-05-24 2022-11-01 山东多科科技有限公司 Method, terminal and storage medium for detecting application program no-response blocking
CN110188016A (en) * 2019-05-24 2019-08-30 努比亚技术有限公司 Detection method, terminal and storage medium of the application program without response obstruction
CN110618933B (en) * 2019-08-15 2021-05-11 华为技术有限公司 Performance analysis method and system, electronic device and storage medium
CN110618933A (en) * 2019-08-15 2019-12-27 华为技术有限公司 Performance analysis method and system, electronic device and storage medium
CN110908864B (en) * 2019-11-11 2024-05-10 腾讯科技(深圳)有限公司 Equipment jamming processing method, device, equipment and medium
CN110908864A (en) * 2019-11-11 2020-03-24 腾讯科技(深圳)有限公司 Equipment blocking processing method, device, equipment and medium
CN110990243A (en) * 2019-11-29 2020-04-10 天津网之易创新科技有限公司 Caton analysis method and device, storage medium and computing equipment
CN110990243B (en) * 2019-11-29 2023-08-11 天津网之易创新科技有限公司 Method, device, storage medium and computing equipment for katon analysis
CN111274086B (en) * 2020-01-15 2023-06-13 湖北工程学院 Computer software fault monitoring system
CN111274086A (en) * 2020-01-15 2020-06-12 湖北工程学院 Computer software fault monitoring system
CN113297052A (en) * 2020-02-21 2021-08-24 腾讯科技(深圳)有限公司 Application program stuck event positioning method and device, storage medium and equipment
CN113297052B (en) * 2020-02-21 2024-04-26 腾讯科技(深圳)有限公司 Method, device, storage medium and equipment for positioning stuck event of application program
CN113568801A (en) * 2020-04-29 2021-10-29 华为技术有限公司 Frozen screen detection method and device, terminal equipment and computer storage medium
WO2021218548A1 (en) * 2020-04-29 2021-11-04 华为技术有限公司 Screen freezing detection method and apparatus, terminal device, and computer storage medium
CN113568801B (en) * 2020-04-29 2023-11-03 华为技术有限公司 Frozen screen detection method and device, terminal equipment and computer storage medium
CN111625456A (en) * 2020-05-26 2020-09-04 北京达佳互联信息技术有限公司 Stuck positioning method and device
CN111625456B (en) * 2020-05-26 2024-04-30 北京达佳互联信息技术有限公司 Clamping positioning method and device
CN111752719A (en) * 2020-06-28 2020-10-09 腾讯音乐娱乐科技(深圳)有限公司 Method and device for detecting stuck
CN112650647B (en) * 2020-12-29 2023-10-31 北京字节跳动网络技术有限公司 Information acquisition method, device, equipment and medium
CN112650647A (en) * 2020-12-29 2021-04-13 北京字节跳动网络技术有限公司 Information acquisition method, device, equipment and medium
CN112860469A (en) * 2021-02-04 2021-05-28 百果园技术(新加坡)有限公司 Method, device, equipment and storage medium for collecting information of katon log
CN113900910A (en) * 2021-12-08 2022-01-07 北京新唐思创教育科技有限公司 Application program monitoring method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN108345524B (en) 2021-12-14

Similar Documents

Publication Publication Date Title
CN108345524A (en) Method for monitoring application program and Application Monitoring device
WO2016041468A1 (en) Wakeup method, device and terminal
CN110413488A (en) Server utilization rate method for early warning and device
CN105718028B (en) A kind of electricity saving method and device based on identification power consumption application
CN105072292A (en) Application control method and terminal
CN115495231B (en) Dynamic resource scheduling method and system under high concurrency task complex scene
CN104965999B (en) The analysis joining method of a kind of short-and-medium genetic fragment order-checking and equipment
CN112744115B (en) Information processing method, device and system of electric automobile and processor
CN107273182A (en) A kind of resources of virtual machine dynamic expanding method and system
CN111680016A (en) Distributed server cluster log data processing method, device and system
CN111459758B (en) Application information display method and device, electronic equipment and storage medium
CN106528098B (en) A kind of processing method, device and terminal for opening data between application more
CN111970151A (en) Flow fault positioning method and system for virtual and container network
CN114095032B (en) Data stream compression method based on Flink and RVR, edge computing system and storage medium
CN110796591A (en) GPU card using method and related equipment
CN116913350B (en) Test method and test platform based on modern standby of solid state disk
CN112566228A (en) Method and system for reducing equipment power consumption in network video conference
CN103647824A (en) Storage resource optimized scheduling and discovering algorithm
CN115794446B (en) Message processing method and device, electronic equipment and storage medium
CN114449628B (en) Log data processing method, electronic device and medium thereof
CN113918636B (en) ETL-based data throughput analysis method
WO2021218626A1 (en) Data storage method and apparatus, device, and storage medium
CN114661555A (en) Equipment monitoring method, device, server and storage medium
CN113691390A (en) Cloud-end-coordinated edge node alarm system and method
CN106775480A (en) A kind of real-time monitoring system data recording method based on LabVIEW

Legal Events

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