CN108491483B - Method and device for remotely monitoring running state of program - Google Patents

Method and device for remotely monitoring running state of program Download PDF

Info

Publication number
CN108491483B
CN108491483B CN201810201542.3A CN201810201542A CN108491483B CN 108491483 B CN108491483 B CN 108491483B CN 201810201542 A CN201810201542 A CN 201810201542A CN 108491483 B CN108491483 B CN 108491483B
Authority
CN
China
Prior art keywords
script file
terminal
log
user
monitoring
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.)
Expired - Fee Related
Application number
CN201810201542.3A
Other languages
Chinese (zh)
Other versions
CN108491483A (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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201810201542.3A priority Critical patent/CN108491483B/en
Publication of CN108491483A publication Critical patent/CN108491483A/en
Application granted granted Critical
Publication of CN108491483B publication Critical patent/CN108491483B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents

Abstract

The invention provides a method and a device for remotely monitoring the running state of a program, wherein a monitoring script file is obtained and used for obtaining the access authority of user log information in a second terminal; obtaining a log script file which is used for taking out user log information in the second terminal; obtaining a log process deletion script file; obtaining a log automatic uploading script file; and sending the monitoring script file, the taken log script file, the log process deletion script file and the log automatic uploading script file to the second terminal. The technical problems that in the prior art, an operation personnel remote monitoring program is inconvenient to operate, detection on a user mobile phone is inconvenient, and user experience is reduced are solved, the purpose that in the process of remotely contacting Android mobile phone users, logs on the user mobile phone can be automatically collected, user operation is facilitated, and working efficiency is improved is achieved.

Description

Method and device for remotely monitoring running state of program
Technical Field
The present invention relates to the field of communications devices, and in particular, to a method and an apparatus for remotely monitoring a program running state.
Background
During the process of operating the mobile phone, an Android mobile phone user can record some logs so as to assist a programmer in locating system internal errors when the system has problems.
However, in the process of implementing the technical solution of the invention in the embodiments of the present application, the inventors of the present application find that the above-mentioned technology has at least the following technical problems:
the operation state of an operator remote monitoring program in the prior art is inconvenient, the detection of a mobile phone of a user is inconvenient, the user experience is reduced, and the labor time is wasted.
Disclosure of Invention
The embodiment of the invention provides a method and a device for remotely monitoring the running state of a program, and solves the technical problems that in the prior art, an operator is inconvenient in remotely monitoring the running state of the program, the detection of a user mobile phone is inconvenient, the user experience is reduced, and the manpower time is wasted.
In view of the foregoing, embodiments of the present application are provided to provide a method and an apparatus for remotely monitoring an operating state of a program.
In a first aspect, the present invention provides a method for remotely monitoring an operating state of a program, which is applied to a first terminal, wherein the first terminal and a second terminal are remotely controlled, and the second terminal includes user log information therein, the method including:
Acquiring a monitoring script file, wherein the monitoring script file is used for acquiring the access authority of the user log information in the second terminal; obtaining a log script file which is used for taking out user log information in the second terminal; acquiring a log process deletion script file, wherein the log process deletion script file is used for deleting process information in the user log information in the second terminal; obtaining a log automatic uploading script file, wherein the log automatic uploading script file is used for uploading user log information of process information deletion to a third terminal, and the third terminal is different from the second terminal; and sending the monitoring script file, the log taking-out script file, the log process deleting script file and the log automatic uploading script file to the second terminal, wherein the first terminal remotely obtains the user log information of the second terminal through the monitoring script file, the log taking-out script file, the log process deleting script file and the log automatic uploading script file.
Preferably, the method further comprises:
And sending the calling bridge tool to the second terminal.
Preferably, the method further comprises:
and sending the monitoring script file, the taken log script file, the log process deletion script file, the log automatic uploading script file and the calling bridge tool to the second terminal after packaging.
Preferably, the method further comprises:
and obtaining a log generation closing script file, wherein the log generation closing script file is used for monitoring the size of the log file, and when the log file is larger than a preset threshold value, the log generation closing script file stops taking out the user log information from the second terminal.
In a second aspect, the present invention provides another method for remotely monitoring an operating state of a program, which is applied to a second terminal, wherein the second terminal is remotely controlled from a first terminal, and the second terminal includes user log information therein, the method including:
acquiring a monitoring script file, wherein the monitoring script file acquires the access authority of the user log information in the second terminal; obtaining a log script file, wherein the log script file is taken out to take out the user log information in the second terminal; acquiring a log process deletion script file, wherein the log process deletion script file deletes process information in user log information in the second terminal; and obtaining a log automatic uploading script file, wherein the log automatic uploading script file uploads the user log information of the deleted process information to a third terminal, and the third terminal is different from the second terminal.
Preferably, before obtaining the monitoring script file, the method further comprises:
obtaining a calling bridge tool; and calling the monitoring script file according to the calling bridge tool.
Preferably, the method further comprises:
and obtaining a compressed packet, wherein the compressed packet comprises the monitoring script file, the taken log script file, the log process deletion script file, the log automatic uploading script file and the calling bridge tool.
Preferably, the method further comprises:
and obtaining a log generation closing script file, wherein the log generation closing script file is used for monitoring the size of the log file, and when the log file is larger than a preset threshold value, the log generation closing script file stops taking out the user log information from the second terminal.
In a third aspect, the present invention provides an apparatus for remotely monitoring an operating status of a program, the apparatus comprising:
a first obtaining unit, configured to obtain a monitoring script file, where the monitoring script file is used to obtain an access right of user log information in the second terminal;
a second obtaining unit, configured to obtain a log script file, where the log script file is used to extract user log information in the second terminal;
A third obtaining unit, configured to obtain a log process deletion script file, where the log process deletion script file is used to delete process information in the user log information in the second terminal;
a fourth obtaining unit, configured to obtain an automatic log upload script file, where the automatic log upload script file is used to upload user log information of process information deletion to a third terminal, where the third terminal is different from the second terminal;
and the fifth obtaining unit is used for sending the monitoring script file, the log taking-out script file, the log process deleting script file and the log automatic uploading script file to the second terminal, and the first terminal remotely obtains the user log information of the second terminal through the monitoring script file, the log taking-out script file, the log process deleting script file and the log automatic uploading script file.
Preferably, the apparatus further comprises:
a first sending unit, configured to send a calling bridge tool to the second terminal.
Preferably, the apparatus further comprises:
and the second sending unit is used for sending the monitoring script file, the taken-out log script file, the log process deletion script file, the log automatic uploading script file and the calling bridge tool to the second terminal after being packaged.
Preferably, the apparatus further comprises:
and the first execution unit is used for acquiring a log generation closing script file, the log generation closing script file is used for monitoring the size of the log file, and when the log file is larger than a preset threshold value, the log generation closing script file stops taking out the user log information from the second terminal.
In a fourth aspect, the present invention provides an apparatus for remotely monitoring the operating status of a program, including a memory, a processor, and a computer program stored in the memory and operable on the processor, wherein the processor executes the program to implement the following steps: acquiring a monitoring script file, wherein the monitoring script file is used for acquiring the access authority of the user log information in the second terminal; obtaining a log script file which is used for taking out user log information in the second terminal; acquiring a log process deletion script file, wherein the log process deletion script file is used for deleting process information in the user log information in the second terminal; obtaining a log automatic uploading script file, wherein the log automatic uploading script file is used for uploading user log information of process information deletion to a third terminal, and the third terminal is different from the second terminal; and sending the monitoring script file, the log taking-out script file, the log process deleting script file and the log automatic uploading script file to the second terminal, wherein the first terminal remotely obtains the user log information of the second terminal through the monitoring script file, the log taking-out script file, the log process deleting script file and the log automatic uploading script file.
In a fifth aspect, the present invention provides another apparatus for remotely monitoring an operating status of a program, the apparatus comprising:
a sixth obtaining unit, configured to obtain a monitoring script file, where the monitoring script file obtains an access right of user log information in the second terminal;
a seventh obtaining unit, configured to obtain a log script file, where the log script file is used to take out user log information in the second terminal;
an eighth obtaining unit, configured to obtain a log process deletion script file, where the log process deletion script file deletes process information in the user log information in the second terminal;
a ninth obtaining unit, configured to obtain a log automatic upload script file, where the log automatic upload script file uploads user log information of which process information is deleted to a third terminal, where the third terminal is different from the second terminal.
Preferably, before obtaining the monitoring script file, the apparatus further comprises:
a tenth obtaining unit, configured to obtain a calling bridge tool;
And the first calling unit is used for calling the monitoring script file according to the calling bridge tool.
Preferably, the apparatus further comprises:
an eleventh obtaining unit, configured to obtain a compressed packet, where the compressed packet includes the monitoring script file, the log process deletion script file, the log automatic upload script file, and the call bridge tool.
Preferably, the apparatus further comprises:
and the second execution unit is used for acquiring a log generation closing script file, the log generation closing script file is used for monitoring the size of the log file, and when the log file is larger than a preset threshold value, the log generation closing script file stops taking out the user log information from the second terminal.
In a sixth aspect, the present invention provides another apparatus for remotely monitoring the operating status of a program, including a memory, a processor, and a computer program stored in the memory and operable on the processor, wherein the processor executes the program to implement the following steps: acquiring a monitoring script file, wherein the monitoring script file acquires the access authority of the user log information in the second terminal; obtaining a log script file, wherein the log script file is taken out to take out the user log information in the second terminal; acquiring a log process deletion script file, wherein the log process deletion script file deletes process information in user log information in the second terminal; and obtaining a log automatic uploading script file, wherein the log automatic uploading script file uploads the user log information of the deleted process information to a third terminal, and the third terminal is different from the second terminal.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
1. according to the method and the device for remotely monitoring the running state of the program, the monitoring script file is obtained, and the monitoring script file is used for obtaining the access authority of the user log information in the second terminal; obtaining a log script file which is used for taking out user log information in the second terminal; acquiring a log process deletion script file, wherein the log process deletion script file is used for deleting process information in the user log information in the second terminal; obtaining a log automatic uploading script file, wherein the log automatic uploading script file is used for uploading user log information of process information deletion to a third terminal, and the third terminal is different from the second terminal; and sending the monitoring script file, the log taking-out script file, the log process deleting script file and the log automatic uploading script file to the second terminal, wherein the first terminal remotely obtains the user log information of the second terminal through the monitoring script file, the log taking-out script file, the log process deleting script file and the log automatic uploading script file. The technical problems that in the prior art, an operation personnel remote monitoring program is inconvenient to operate, detection on a user mobile phone is inconvenient, user experience is reduced, and manpower time is wasted are solved, the in-process of remotely contacting Android mobile phone users is realized, logs on the user mobile phone can be automatically collected, user operation is facilitated, and working efficiency is improved.
2. The embodiment of the application sends the monitoring script file, the log script file taken out, the log process deletion script file, the log automatic uploading script file and the calling bridge tool to the second terminal after being packaged. The technical problem that an operator cannot conveniently remotely monitor the running state of the program is further solved. When a user is contacted, the monitoring script file, the log script file can be directly taken out, the log process deletes the script file, the log automatically uploads the script file, the bridge tool is called for packaging and then is sent to the user, the user can directly operate, and the working efficiency and the user experience are improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
FIG. 1 is a flowchart illustrating a method for remotely monitoring an operating status of a program according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating another method for remotely monitoring the operating status of a program according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for remotely monitoring the operating status of a program according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another apparatus for remotely monitoring an operating status of a program according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method and a device for remotely monitoring the running state of a program, and the technical scheme provided by the invention has the following general ideas: acquiring a monitoring script file, wherein the monitoring script file is used for acquiring the access authority of the user log information in the second terminal; obtaining a log script file which is used for taking out user log information in the second terminal; acquiring a log process deletion script file, wherein the log process deletion script file is used for deleting process information in the user log information in the second terminal; obtaining a log automatic uploading script file, wherein the log automatic uploading script file is used for uploading user log information of process information deletion to a third terminal, and the third terminal is different from the second terminal; and sending the monitoring script file, the log taking-out script file, the log process deleting script file and the log automatic uploading script file to the second terminal, wherein the first terminal remotely obtains the user log information of the second terminal through the monitoring script file, the log taking-out script file, the log process deleting script file and the log automatic uploading script file. The technical problems that in the prior art, an operation personnel remote monitoring program is inconvenient to operate, detection on a user mobile phone is inconvenient, user experience is reduced, and manpower time is wasted are solved, the in-process of remotely contacting Android mobile phone users is realized, logs on the user mobile phone can be automatically collected, user operation is facilitated, and working efficiency is improved.
The technical solutions of the present invention are described in detail below with reference to the drawings and specific embodiments, and it should be understood that the specific features in the embodiments and examples of the present invention are described in detail in the technical solutions of the present application, and are not limited to the technical solutions of the present application, and the technical features in the embodiments and examples of the present application may be combined with each other without conflict.
Example 1
Fig. 1 is a flowchart illustrating a method for remotely monitoring an operating status of a program according to an embodiment of the present invention. As shown in fig. 1, the method is applied to a first terminal, wherein the first terminal and a second terminal are remotely controlled, and the second terminal includes user log information therein, and the method includes:
step 110: and acquiring a monitoring script file, wherein the monitoring script file is used for acquiring the access authority of the user log information in the second terminal.
Specifically, the first terminal obtains the monitoring script file, and the monitoring script file is used for obtaining the access authority of the user log information in the second terminal. The user log information is information for recording hardware, software and system problems in the operation of the second terminal operated by the user, and can monitor events in the system. And obtaining the access authority of the user log information in the second terminal through the first terminal, so that all running problems in the operation process of the second terminal can be obtained. In this embodiment, the second terminal may be a terminal of an Android operating system, and specifically, may be a mobile phone or a notebook computer equipped with the Android operating system. For example, in the process of remotely contacting an Android mobile phone user, an operator obtains the access authority of the Android mobile phone user log information through a monitoring script file in the first terminal used by the operator, when the operator obtains the access authority of the user log information through the first terminal, the next operation can be performed, and only the first terminal has the function of obtaining the access authority of the Android mobile phone user log information. The program for writing and obtaining the monitoring script file in the embodiment of the invention is as follows:
adb kill-server
adb start-server
adb push logcat.jar/data/local/tmp
adb shell uiautomator runtest logcat.jar–nohup
Step 120: and obtaining a log script file which is used for taking out the user log information in the second terminal.
Specifically, the first terminal obtains a log script file, the log script file is used for taking out user log information in the second terminal, and a desktop path of the second terminal is obtained and used for storing logs. The program for obtaining the extracted log script file is written as follows:
for/f"tokens=2,*"%%i in('reg query"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\
Shell Folders"/v"Desktop"')do Set a=%%j
adb pull/data/local/tmp/logcat.txt%a%/logcat.txt
adb shell ps|findstr"uiautomator"
step 130: and acquiring a log process deletion script file, wherein the log process deletion script file is used for deleting the process information in the user log information in the second terminal.
Specifically, the first terminal obtains a log process deletion script file, and an operator operates the log process deletion script file to delete process information in user log information in the second terminal, so that the process information is prevented from occupying a memory to influence the running speed of the second terminal. Namely, the log process deleting script file is used for deleting the operation process information (namely the intermediate file) in the user log information in the Android mobile phone. The log process written in the embodiment of the invention deletes the script file as follows:
adb shell kill-9%1
Step 140: and obtaining a log automatic uploading script file, wherein the log automatic uploading script file is used for uploading the user log information of the deleted process information to a third terminal, and the third terminal is different from the second terminal.
Specifically, the first terminal obtains a log automatic upload script file, and the log automatic upload script file is used to upload user log information of process information deletion to a third terminal, where the third terminal is different from the second terminal, and the third terminal may also be the second terminal.
Step 150: and sending the monitoring script file, the log taking-out script file, the log process deleting script file and the log automatic uploading script file to the second terminal, wherein the first terminal remotely obtains the user log information of the second terminal through the monitoring script file, the log taking-out script file, the log process deleting script file and the log automatic uploading script file.
Further, the method further comprises: and sending the calling bridge tool to the second terminal.
Further, the method further comprises: and sending the monitoring script file, the taken log script file, the log process deletion script file, the log automatic uploading script file and the calling bridge tool to the second terminal after packaging.
Specifically, the first terminal remotely obtains the user log information of the second terminal (Android mobile phone) through the compiled monitoring script file, the fetched log script file, the log process deletion script file and the log automatic upload script file. And the first terminal sends a calling bridge tool to the second terminal. And the operator sends the monitoring script file, the taken log script file, the log process deletion script file, the log automatic uploading script file and the calling bridge tool to the second terminal after packaging. The called bridge tool (adb) of the Anrdoid mobile phone in the embodiment of the invention is an adb tool set (adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll). When the operator contacts with the user, the packed four script files and the calling bridge tool can be directly sent to the user, the user can directly operate, and inconvenience caused by the operation state of the remote monitoring program of the operator is avoided.
Further, the method further comprises: and obtaining a log generation closing script file, wherein the log generation closing script file is used for monitoring the size of the log file, and when the log file is larger than a preset threshold value, the log generation closing script file stops taking out the user log information from the second terminal.
Specifically, the first terminal obtains a log generation close script file, and the log generation close script file is mainly used for monitoring the size of the log file. When the log generation closing script file is written, a preset threshold value of the log file is set, and when the log file generated when the Anrdoid mobile phone operates is larger than the preset threshold value, the log generation closing script file stops taking out the user log information from the second terminal (the Anrdoid mobile phone), so that the log file is effectively prevented from being too large, and the memory space and the operation speed of the Anrdoid mobile phone are prevented from being influenced.
Example 2
Fig. 2 is a flowchart illustrating another method for remotely monitoring the operating status of a program according to an embodiment of the present invention. As shown in fig. 2, the method is applied to a second terminal, wherein the second terminal is remotely controlled from a first terminal, and the second terminal includes user log information therein, and the method includes:
Step 210: and acquiring a monitoring script file, wherein the monitoring script file acquires the access authority of the user log information in the second terminal.
Specifically, the first terminal obtains the monitoring script file, and obtains the access authority of the user log information in the second terminal through the monitoring script file. The log information is information for recording hardware, software and system problems in the operation of the second terminal, and can monitor events in the system. In this embodiment, the second terminal may be a terminal of an Android operating system, and specifically, may be a mobile phone or a notebook computer equipped with the Android operating system. For example, in the process of remotely contacting an Android mobile phone user, an operator obtains the access authority of the Android mobile phone user log information through a monitoring script file in the first terminal used by the operator, when the operator obtains the access authority of the user log information through the first terminal, the next operation can be performed, and only the first terminal has the function of obtaining the access authority of the Android mobile phone user log information. The program for writing and obtaining the monitoring script file in the embodiment of the invention is as follows:
adb kill-server
adb start-server
adb push logcat.jar/data/local/tmp
adb shell uiautomator runtest logcat.jar–nohup
Step 220: and obtaining a log script file, wherein the log script file is taken out to take out the user log information in the second terminal.
Specifically, the first terminal obtains a log script file, extracts user log information in the second terminal through the log script file, and obtains a desktop path of the second terminal for storing logs. The log script file to be fetched written in the embodiment of the invention is as follows:
for/f"tokens=2,*"%%i in('reg query"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\
Shell Folders"/v"Desktop"')do Set a=%%j
adb pull/data/local/tmp/logcat.txt%a%/logcat.txt
adb shell ps|findstr"uiautomator"
step 230: and acquiring a log process deletion script file, wherein the log process deletion script file deletes process information in the user log information in the second terminal.
Specifically, the first terminal obtains a log process deletion script file, and an operator deletes the process information in the user log information in the second terminal by operating the log process deletion script file, so that the process information is prevented from occupying a memory to influence the running speed of the second terminal. Namely, the log process deleting script file is used for deleting the operation process information (namely the intermediate file) in the user log information in the Android mobile phone. The log process written in the embodiment of the invention deletes the script file as follows:
adb shell kill-9%1
Step 240: and obtaining a log automatic uploading script file, wherein the log automatic uploading script file uploads the user log information of the deleted process information to a third terminal, and the third terminal is different from the second terminal.
Specifically, the first terminal obtains a log automatic upload script file, and uploads the user log information of the deleted process information to a third terminal through the log automatic upload script file, where the third terminal is different from the second terminal, and the third terminal may also be the second terminal.
Further, before obtaining the monitoring script file, the method further includes: obtaining a calling bridge tool; and calling the monitoring script file according to the calling bridge tool.
Further, the method further comprises: and obtaining a compressed packet, wherein the compressed packet comprises the monitoring script file, the taken log script file, the log process deletion script file, the log automatic uploading script file and the calling bridge tool.
Specifically, before the monitoring script file is obtained, the first terminal sends a calling bridge tool to the second terminal, and the second terminal obtains the calling bridge tool and calls the monitoring script file according to the calling bridge tool. The called bridge tool (adb) of the Anrdoid mobile phone in the embodiment of the invention is an adb tool set (adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll). And the first terminal sends the monitoring script file, the taken log script file, the log process deletion script file, the log automatic uploading script file and the calling bridge tool to the second terminal after packaging, and the second terminal obtains a compressed packet. When the operator contacts with the user, the compressed packet can be directly sent to the user, and the user can directly operate, so that the inconvenience caused by the operation state of the remote monitoring program of the operator is avoided.
Further, the method further comprises: and obtaining a log generation closing script file, wherein the log generation closing script file is used for monitoring the size of the log file, and when the log file is larger than a preset threshold value, the log generation closing script file stops taking out the user log information from the second terminal.
Specifically, the first terminal obtains a log generation close script file, and the log generation close script file is mainly used for monitoring the size of the log file. When the log generation closing script file is written, a preset threshold value of the log file is set, and when the log file generated when the Anrdoid mobile phone operates is larger than the preset threshold value, the log generation closing script file stops taking out the user log information from the second terminal (the Anrdoid mobile phone), so that the log file is effectively prevented from being too large, and the memory space and the operation speed of the Anrdoid mobile phone are prevented from being influenced.
Example 3
Based on the same inventive concept as the method for remotely monitoring the running state of the program in the foregoing embodiment, the present invention further provides an apparatus for remotely monitoring the running state of the program, as shown in fig. 3, including:
a first obtaining unit 11, where the first obtaining unit 11 is configured to obtain a monitoring script file, where the monitoring script file is configured to obtain an access right of user log information in the second terminal;
A second obtaining unit 12, where the second obtaining unit 12 is configured to obtain a log script file, where the log script file is used to take out user log information in the second terminal;
a third obtaining unit 13, where the third obtaining unit 13 is configured to obtain a log process deletion script file, where the log process deletion script file is used to delete process information in user log information in the second terminal;
a fourth obtaining unit 14, where the fourth obtaining unit 14 is configured to obtain a log automatic upload script file, where the log automatic upload script file is configured to upload user log information of which process information is deleted to a third terminal, where the third terminal is different from the second terminal;
and a fifth obtaining unit 15, where the fifth obtaining unit 15 is configured to send the monitoring script file, the log taking-out script file, the log process deletion script file, and the log automatic upload script file to the second terminal, and the first terminal remotely obtains user log information of the second terminal through the monitoring script file, the log taking-out script file, the log process deletion script file, and the log automatic upload script file.
Further, the apparatus further comprises:
a first sending unit, configured to send a calling bridge tool to the second terminal.
Further, the apparatus further comprises:
and the second sending unit is used for sending the monitoring script file, the taken-out log script file, the log process deletion script file, the log automatic uploading script file and the calling bridge tool to the second terminal after being packaged.
Further, the apparatus further comprises:
and the first execution unit is used for acquiring a log generation closing script file, the log generation closing script file is used for monitoring the size of the log file, and when the log file is larger than a preset threshold value, the log generation closing script file stops taking out the user log information from the second terminal.
Various changes and specific examples of the method for remotely monitoring the operating state of the program in embodiment 1 of fig. 1 are also applicable to the apparatus for remotely monitoring the operating state of the program in this embodiment, and a person skilled in the art can clearly know the implementation method of the apparatus for remotely monitoring the operating state of the program in this embodiment through the foregoing detailed description of the method for remotely monitoring the operating state of the program, so for the sake of brevity of the description, detailed descriptions are omitted here.
Example 4
Based on the same inventive concept as the method for remotely monitoring the running state of the program in the foregoing embodiment, the present invention further provides another apparatus for remotely monitoring the running state of the program, as shown in fig. 4, including:
a sixth obtaining unit 21, where the sixth obtaining unit 21 is configured to obtain a monitoring script file, and the monitoring script file obtains an access right of user log information in the second terminal;
a seventh obtaining unit 22, where the seventh obtaining unit 22 is configured to obtain a fetch log script file, and the fetch log script file fetches the user log information in the second terminal;
an eighth obtaining unit 23, where the eighth obtaining unit 23 is configured to obtain a log process deletion script file, and the log process deletion script file deletes process information in the user log information in the second terminal;
a ninth obtaining unit 24, where the ninth obtaining unit 24 is configured to obtain a log automatic upload script file, and the log automatic upload script file uploads the user log information of the deleted process information to a third terminal, where the third terminal is different from the second terminal.
Further, before obtaining the monitoring script file, the apparatus further includes:
A tenth obtaining unit, configured to obtain a calling bridge tool;
and the first calling unit is used for calling the monitoring script file according to the calling bridge tool.
Further, the apparatus further comprises:
an eleventh obtaining unit, configured to obtain a compressed packet, where the compressed packet includes the monitoring script file, the log process deletion script file, the log automatic upload script file, and the call bridge tool.
Further, the apparatus further comprises:
and the second execution unit is used for acquiring a log generation closing script file, the log generation closing script file is used for monitoring the size of the log file, and when the log file is larger than a preset threshold value, the log generation closing script file stops taking out the user log information from the second terminal.
Various changes and specific examples of the method for remotely monitoring the operating state of the program in embodiment 2 of fig. 2 are also applicable to the apparatus for remotely monitoring the operating state of the program in this embodiment, and a person skilled in the art can clearly know the implementation method of the apparatus for remotely monitoring the operating state of the program in this embodiment through the foregoing detailed description of the method for remotely monitoring the operating state of the program, so for the sake of brevity of the description, detailed descriptions are omitted here.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
1. according to the method and the device for remotely monitoring the running state of the program, the monitoring script file is obtained, and the monitoring script file is used for obtaining the access authority of the user log information in the second terminal; obtaining a log script file which is used for taking out user log information in the second terminal; acquiring a log process deletion script file, wherein the log process deletion script file is used for deleting process information in the user log information in the second terminal; obtaining a log automatic uploading script file, wherein the log automatic uploading script file is used for uploading user log information of process information deletion to a third terminal, and the third terminal is different from the second terminal; and sending the monitoring script file, the log taking-out script file, the log process deleting script file and the log automatic uploading script file to the second terminal, wherein the first terminal remotely obtains the user log information of the second terminal through the monitoring script file, the log taking-out script file, the log process deleting script file and the log automatic uploading script file. The technical problems that in the prior art, an operation personnel remote monitoring program is inconvenient to operate, detection on a user mobile phone is inconvenient, user experience is reduced, and manpower time is wasted are solved, the in-process of remotely contacting Android mobile phone users is realized, logs on the user mobile phone can be automatically collected, user operation is facilitated, and working efficiency is improved.
2. The embodiment of the application sends the monitoring script file, the log script file taken out, the log process deletion script file, the log automatic uploading script file and the calling bridge tool to the second terminal after being packaged. The technical problem that an operator cannot conveniently remotely monitor the running state of the program is further solved. When a user is contacted, the monitoring script file, the log script file can be directly taken out, the log process deletes the script file, the log automatically uploads the script file, the bridge tool is called for packaging and then is sent to the user, the user can directly operate, and the working efficiency and the user experience are improved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (12)

1. A method for remotely monitoring program running state is applied to a first terminal, wherein the first terminal and a second terminal are remotely controlled, and the second terminal comprises user log information, and is characterized in that the method comprises the following steps:
acquiring a monitoring script file, wherein the monitoring script file is used for acquiring the access authority of the user log information in the second terminal;
Obtaining a log script file which is used for taking out user log information in the second terminal;
acquiring a log process deletion script file, wherein the log process deletion script file is used for deleting process information in the user log information in the second terminal;
obtaining a log automatic uploading script file, wherein the log automatic uploading script file is used for uploading user log information of process information deletion to a third terminal, and the third terminal is different from the second terminal;
sending the monitoring script file, the taken log script file, the log process deletion script file and the log automatic uploading script file to the second terminal, wherein the first terminal remotely obtains user log information of the second terminal through the monitoring script file, the taken log script file, the log process deletion script file and the log automatic uploading script file;
the second terminal is a terminal of an Android operating system;
the user log information is recorded during a process in which the user operates the second terminal.
2. The method of claim 1, wherein the method further comprises:
And sending the calling bridge tool to the second terminal.
3. The method of claim 2, wherein the method further comprises:
and sending the monitoring script file, the taken log script file, the log process deletion script file, the log automatic uploading script file and the calling bridge tool to the second terminal after packaging.
4. The method of claim 1, wherein the method further comprises:
and obtaining a log generation closing script file, wherein the log generation closing script file is used for monitoring the size of the log file, and when the log file is larger than a preset threshold value, the log generation closing script file stops taking out the user log information from the second terminal.
5. A method for remotely monitoring program running state is applied to a second terminal, wherein the second terminal and a first terminal are remotely controlled, and the second terminal comprises user log information, and is characterized in that the method comprises the following steps:
acquiring a monitoring script file, wherein the monitoring script file acquires the access authority of the user log information in the second terminal;
obtaining a log script file, wherein the log script file is taken out to take out the user log information in the second terminal;
Acquiring a log process deletion script file, wherein the log process deletion script file deletes process information in user log information in the second terminal;
obtaining a log automatic uploading script file, wherein the log automatic uploading script file uploads the user log information of which the process information is deleted to a third terminal, and the third terminal is different from the second terminal;
the second terminal is a terminal of an Android operating system;
the user log information is recorded in the process of operating the second terminal by the user;
and the first terminal remotely obtains the user log information of the second terminal through the monitoring script file, the log taking-out script file, the log process deleting script file and the log automatic uploading script file.
6. The method of claim 5, wherein prior to obtaining the monitoring script file, the method further comprises:
obtaining a calling bridge tool;
and calling the monitoring script file according to the calling bridge tool.
7. The method of claim 6, wherein the method further comprises:
and obtaining a compressed packet, wherein the compressed packet comprises the monitoring script file, the taken log script file, the log process deletion script file, the log automatic uploading script file and the calling bridge tool.
8. The method of claim 5, wherein the method further comprises:
and obtaining a log generation closing script file, wherein the log generation closing script file is used for monitoring the size of the log file, and when the log file is larger than a preset threshold value, the log generation closing script file stops taking out the user log information from the second terminal.
9. The utility model provides a device of remote monitoring program running state, is applied to first terminal, wherein, remote control between first terminal and the second terminal, and, including user log information in the second terminal, its characterized in that, the device includes:
a first obtaining unit, configured to obtain a monitoring script file, where the monitoring script file is used to obtain an access right of user log information in the second terminal;
a second obtaining unit, configured to obtain a log script file, where the log script file is used to extract user log information in the second terminal;
a third obtaining unit, configured to obtain a log process deletion script file, where the log process deletion script file is used to delete process information in the user log information in the second terminal;
A fourth obtaining unit, configured to obtain an automatic log upload script file, where the automatic log upload script file is used to upload user log information of process information deletion to a third terminal, where the third terminal is different from the second terminal;
a fifth obtaining unit, configured to send the monitoring script file, the log taking-out script file, the log process deletion script file, and the log automatic upload script file to the second terminal, where the first terminal remotely obtains user log information of the second terminal through the monitoring script file, the log taking-out script file, the log process deletion script file, and the log automatic upload script file;
the second terminal is a terminal of an Android operating system;
the user log information is recorded during a process in which the user operates the second terminal.
10. An apparatus for remotely monitoring the running status of a program, applied to a first terminal, wherein the first terminal and a second terminal are remotely controlled, and the second terminal comprises user log information, the apparatus comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, and is characterized in that the processor implements the following steps when executing the program:
Acquiring a monitoring script file, wherein the monitoring script file is used for acquiring the access authority of the user log information in the second terminal;
obtaining a log script file which is used for taking out user log information in the second terminal;
acquiring a log process deletion script file, wherein the log process deletion script file is used for deleting process information in the user log information in the second terminal;
obtaining a log automatic uploading script file, wherein the log automatic uploading script file is used for uploading user log information of process information deletion to a third terminal, and the third terminal is different from the second terminal;
sending the monitoring script file, the taken log script file, the log process deletion script file and the log automatic uploading script file to the second terminal, wherein the first terminal remotely obtains user log information of the second terminal through the monitoring script file, the taken log script file, the log process deletion script file and the log automatic uploading script file;
the second terminal is a terminal of an Android operating system;
The user log information is recorded during a process in which the user operates the second terminal.
11. The utility model provides a device of remote monitoring program running state, is applied to the second terminal, wherein, remote control between second terminal and the first terminal, and, including user log information in the second terminal, its characterized in that, the device includes:
a sixth obtaining unit, configured to obtain a monitoring script file, where the monitoring script file obtains an access right of user log information in the second terminal;
a seventh obtaining unit, configured to obtain a log script file, where the log script file is used to take out user log information in the second terminal;
an eighth obtaining unit, configured to obtain a log process deletion script file, where the log process deletion script file deletes process information in the user log information in the second terminal;
a ninth obtaining unit, configured to obtain a log automatic upload script file, where the log automatic upload script file uploads user log information of which process information is deleted to a third terminal, where the third terminal is different from the second terminal;
The second terminal is a terminal of an Android operating system;
the user log information is recorded in the process of operating the second terminal by the user;
and the first terminal remotely obtains the user log information of the second terminal through the monitoring script file, the log taking-out script file, the log process deleting script file and the log automatic uploading script file.
12. An apparatus for remotely monitoring the running status of a program, applied to a second terminal, wherein the second terminal and a first terminal are remotely controlled, and the second terminal comprises user log information, the apparatus comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, and is characterized in that the processor implements the following steps when executing the program:
acquiring a monitoring script file, wherein the monitoring script file acquires the access authority of the user log information in the second terminal;
obtaining a log script file, wherein the log script file is taken out to take out the user log information in the second terminal;
acquiring a log process deletion script file, wherein the log process deletion script file deletes process information in user log information in the second terminal;
Obtaining a log automatic uploading script file, wherein the log automatic uploading script file uploads the user log information of which the process information is deleted to a third terminal, and the third terminal is different from the second terminal;
the second terminal is a terminal of an Android operating system;
the user log information is recorded in the process of operating the second terminal by the user;
and the first terminal remotely obtains the user log information of the second terminal through the monitoring script file, the log taking-out script file, the log process deleting script file and the log automatic uploading script file.
CN201810201542.3A 2018-03-12 2018-03-12 Method and device for remotely monitoring running state of program Expired - Fee Related CN108491483B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810201542.3A CN108491483B (en) 2018-03-12 2018-03-12 Method and device for remotely monitoring running state of program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810201542.3A CN108491483B (en) 2018-03-12 2018-03-12 Method and device for remotely monitoring running state of program

Publications (2)

Publication Number Publication Date
CN108491483A CN108491483A (en) 2018-09-04
CN108491483B true CN108491483B (en) 2021-10-08

Family

ID=63338610

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810201542.3A Expired - Fee Related CN108491483B (en) 2018-03-12 2018-03-12 Method and device for remotely monitoring running state of program

Country Status (1)

Country Link
CN (1) CN108491483B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110188056B (en) * 2019-07-24 2019-10-22 翱捷科技(上海)有限公司 The physical layer logs output device and method of a kind of electronic equipment
CN112115102B (en) * 2020-08-25 2021-05-14 广州锦行网络科技有限公司 Method for cleaning remote login log records

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5334739B2 (en) * 2009-08-10 2013-11-06 株式会社日立ソリューションズ Log monitoring program, log monitoring system
CN104754608A (en) * 2013-12-25 2015-07-01 腾讯科技(深圳)有限公司 Method and system for monitoring performances of mobile terminal
CN104935621A (en) * 2014-03-20 2015-09-23 中芯国际集成电路制造(上海)有限公司 Remote monitoring system and remote monitoring method
CN105959802A (en) * 2016-05-27 2016-09-21 深圳Tcl数字技术有限公司 Intelligent television fault information collection method and device
CN107179979A (en) * 2016-03-10 2017-09-19 阿里巴巴集团控股有限公司 A kind of acquisition of remote terminal information, analysis method, apparatus and system
CN107506149A (en) * 2017-08-29 2017-12-22 郑州云海信息技术有限公司 System management memory journal dump method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5334739B2 (en) * 2009-08-10 2013-11-06 株式会社日立ソリューションズ Log monitoring program, log monitoring system
CN104754608A (en) * 2013-12-25 2015-07-01 腾讯科技(深圳)有限公司 Method and system for monitoring performances of mobile terminal
CN104935621A (en) * 2014-03-20 2015-09-23 中芯国际集成电路制造(上海)有限公司 Remote monitoring system and remote monitoring method
CN107179979A (en) * 2016-03-10 2017-09-19 阿里巴巴集团控股有限公司 A kind of acquisition of remote terminal information, analysis method, apparatus and system
CN105959802A (en) * 2016-05-27 2016-09-21 深圳Tcl数字技术有限公司 Intelligent television fault information collection method and device
CN107506149A (en) * 2017-08-29 2017-12-22 郑州云海信息技术有限公司 System management memory journal dump method and device

Also Published As

Publication number Publication date
CN108491483A (en) 2018-09-04

Similar Documents

Publication Publication Date Title
CN104268055B (en) The monitoring method and device of a kind of program exception
CN107193750B (en) Script recording method and device
CN104063305B (en) The method for testing pressure of intelligent terminal software, device and system
CN104281520B (en) Tracking and method, the apparatus and system of debugging
CN107102944B (en) Analysis method and device for calling function
CN106528372B (en) Program operation monitoring system and method
CN104156275A (en) Method and device for exception handling of Android platform
CN104866416B (en) The method and apparatus for realizing application program capacity analysis
CN108491483B (en) Method and device for remotely monitoring running state of program
CN103544095A (en) Server program monitoring method and system of server program
CN103268183A (en) Processing method and device for information report
CN112099800A (en) Code data processing method and device and server
CN111930703A (en) Automatic log file capturing method and device and computer equipment
CN113448690B (en) Monitoring method and device
CN103176901A (en) Method and system for embedded software test monitoring
WO2017148271A1 (en) Linux system reset processing method and device, and computer storage medium
CN103684917A (en) Multi-target-machine system monitoring system and method
CN105893221B (en) The alarm method and device of terminal operating duration
US20170109258A1 (en) Smart logging of trace data for storage systems
CN111708576A (en) Cross-operating-system equipment network card adapting and managing method, device and system
CN105630554B (en) A kind of reloading method and user terminal of third-party application
CN105005519A (en) Method and device for clearing client cache
CN110286940B (en) Smart television log generation method
CN104239201A (en) Memory read-write monitoring method in flexible single-step system
CN110908876B (en) Method and device for acquiring hardware performance data

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20211008

CF01 Termination of patent right due to non-payment of annual fee