[go: up one dir, main page]

CN112000405A - Method, equipment and storage medium for conveniently acquiring system logs - Google Patents

Method, equipment and storage medium for conveniently acquiring system logs Download PDF

Info

Publication number
CN112000405A
CN112000405A CN202010743073.5A CN202010743073A CN112000405A CN 112000405 A CN112000405 A CN 112000405A CN 202010743073 A CN202010743073 A CN 202010743073A CN 112000405 A CN112000405 A CN 112000405A
Authority
CN
China
Prior art keywords
log
android
service
interface
command
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010743073.5A
Other languages
Chinese (zh)
Inventor
张博昱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Zhiwei Intelligent Software Development Co ltd
Original Assignee
Shenzhen Zhiwei Intelligent Software Development 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 Shenzhen Zhiwei Intelligent Software Development Co ltd filed Critical Shenzhen Zhiwei Intelligent Software Development Co ltd
Priority to CN202010743073.5A priority Critical patent/CN112000405A/en
Publication of CN112000405A publication Critical patent/CN112000405A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data

Landscapes

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

Abstract

The invention relates to a method, equipment and a storage medium for conveniently acquiring system logs, which comprises the following sequential steps: selecting a log type to be acquired on a UI (user interface) of an equipment android system; according to the selected log type, starting a corresponding android service through a program and running a command to acquire a log; and storing the acquired log according to the corresponding storage address which can be directly read through the UI interface, and displaying the stored file name on the UI interface. The method and the system run different commands through the android service to obtain the system logs, and can visually and quickly obtain the stored logs on the UI (user interface) of the system, thereby facilitating fault analysis and effectively reducing the operation cost.

Description

Method, equipment and storage medium for conveniently acquiring system logs
Technical Field
The invention relates to the field of computers, in particular to a method, equipment and a storage medium for intuitively and conveniently acquiring system logs.
Background
In the computer field, in order to improve the reliability of the computer, various systems are usually provided with a system log for recording hardware, software and system problems in the system, the log in the application system records important information of the system, such as events occurring in the system, and when the computer system fails, a user can check the failure reason through the system log. The Android system is a system which is generally applied at present, and when an Android device fails in operation, a system log file is generally required to be acquired, so that the cause of the failure can be analyzed. In the existing method for acquiring the system log, for developers, tools such as adb and serial ports can be used for acquiring the system log file. However, for users, it is difficult to extract system logs through these specialized tools, and when a system fault occurs, the system log needs to be returned to the equipment for repair or debugged by an after-sales person to a client on site, so that the method is complex, time-consuming and labor-consuming, and the operation cost is also increased.
Disclosure of Invention
Aiming at the existing defects, the invention provides a method, equipment and a storage medium for intuitively and conveniently acquiring system logs.
The technical scheme adopted by the invention for solving the technical problems is as follows: a method for conveniently acquiring system logs comprises the following steps:
s1, selecting the type of the log to be acquired on the UI interface of the equipment android system;
s2, according to the selected log type, starting corresponding android service through a program and running a command to acquire the log;
and S3, storing the obtained log according to the corresponding storage address which can be directly read through the UI interface, and displaying the stored file name on the UI interface.
Preferably, the log type is a kernel log of a system bottom layer, the android service is a ckmsg service, and the run command is a busy cat/proc/kmsg > >/mnt/internal _ sd/kmsg command.
Preferably, the memory address is/mnt/internal _ sd/kmsg.
Preferably, the log type is an upper application system log, the android service is a clogcat service, and the operation command is a logcat > >/mnt/internal _ sd/logcat command.
Preferably, the storage address is/mnt/internal _ sd/logcat.
An electronic device comprising a memory for storing a computer program; a processor for implementing the steps of the method for conveniently obtaining system logs according to any one of the preceding claims when executing the computer program.
A computer readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method for facilitating acquisition of system logs of any preceding item.
The invention has the beneficial effects that: according to the method and the system, the android service runs different commands to obtain the system logs, the obtained system logs are stored in the storage addresses which can be read through the UI, and after the system fails, the stored system logs can be visually and rapidly obtained on the UI of the system, so that the failure can be conveniently analyzed, the method and the system are simple and practical, and the operation cost is effectively reduced.
Drawings
FIG. 1 is a functional block diagram of the present invention;
FIG. 2 is a schematic structural diagram of an electronic device in an embodiment of the invention;
Detailed Description
For the purpose of more clearly illustrating the objects, technical solutions and advantages of the embodiments of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments, for clear and complete description, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without inventive step, are within the scope of the present invention.
The embodiment of the invention is shown in fig. 1, and a method for conveniently acquiring a system log comprises the following steps:
s1, selecting the type of the log to be acquired on the UI interface of the android system, wherein the device is a device provided with an android application system, when the system log needs to be checked, firstly starting the device to enter the UI interface of the android system, the bottom layer, namely the kernel, of the structure based on the android provides basic system functions, the upper layer, namely the top layer, is the application program of the android, the corresponding log can be generated in the running of the system, and at the moment, options of different log types can be configured in the UI interface of the system through corresponding instructions or programs;
s2, according to the selected log type, starting corresponding android service through a program and running a command to acquire the log;
and S3, storing the obtained logs according to corresponding storage addresses which can be directly read through a UI interface, wherein the log files can be stored in a memory of the system or an attached storage device, such as an SD card, a U disk or other storage devices, and the stored file names are displayed on the UI interface, so that a user can click the files to view the obtained logs without a professional tool to extract the logs, thereby facilitating the analysis of the fault.
At this time, when the log type is a kernel log at the bottom layer of the system, the android service is a ckmsg service, the operation command is a busy box cat/proc/kmsg > >/mnt/internal _ sd/kmsg command, the kernel log is extracted through the operation of the command, the storage address of the extracted file is/mnt/internal _ sd/kmsg for convenient reference, the log generated by the system operation every day is stored in the file, and the log can be directly read through a UI interface conveniently when needing to be referred. When the log type is an upper application system log, the android service is clogcat service, and the operation command is
And logcat > >/mnt/internal _ sd/logcat command, wherein the storage address corresponds to/mnt/internal _ sd/logcat.
The present invention also provides an electronic device, as shown in fig. 2, comprising a memory 1 for storing a computer program 10; a processor 2, configured to implement the steps of the method for conveniently obtaining system logs according to any one of the preceding claims when executing the computer program. The computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the steps of the method for facilitating system log acquisition of a computer system log according to any one of the preceding claims, comprising a Random Access Memory (RAM), a memory, a Read Only Memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art that is capable of carrying computer program code.
It will be understood that modifications and variations can be made by persons skilled in the art in light of the above teachings and all such modifications and variations are intended to be included within the scope of the invention as defined in the appended claims.

Claims (7)

1. A method for conveniently acquiring system logs is characterized in that: the method comprises the following steps:
s1, selecting the type of the log to be acquired on the UI interface of the equipment android system;
s2, according to the selected log type, starting corresponding android service through a program and running a command to acquire the log;
and S3, storing the obtained log according to the corresponding storage address which can be directly read through the UI interface, and displaying the stored file name on the UI interface.
2. The method for facilitating acquisition of system logs according to claim 1, wherein: the log type is a kernel log of a system bottom layer, the android service is a ckmsg service, and the operation command is a busy cat/proc/kmsg > >/mnt/internal _ sd/kmsg command.
3. The method for facilitating acquisition of system logs according to claim 2, wherein: the storage address is/mnt/internal _ sd/kmsg.
4. The method for facilitating acquisition of system logs according to claim 1, wherein: the log type is an upper application system log, the android service is a clogcat service, and the operation command is a logcat > >/mnt/internal _ sd/logcat command.
5. The method for facilitating acquisition of system logs according to claim 4, wherein: the storage address is/mnt/internal _ sd/logcat.
6. An electronic device, characterized by: comprising a memory for storing a computer program; a processor for implementing the steps of the method for facilitating acquisition of a system log according to any one of claims 1 to 5 when executing the computer program.
7. A computer-readable storage medium characterized by: the computer readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the method for facilitating acquisition of a system log according to any one of claims 1 to 5.
CN202010743073.5A 2020-07-29 2020-07-29 Method, equipment and storage medium for conveniently acquiring system logs Pending CN112000405A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010743073.5A CN112000405A (en) 2020-07-29 2020-07-29 Method, equipment and storage medium for conveniently acquiring system logs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010743073.5A CN112000405A (en) 2020-07-29 2020-07-29 Method, equipment and storage medium for conveniently acquiring system logs

Publications (1)

Publication Number Publication Date
CN112000405A true CN112000405A (en) 2020-11-27

Family

ID=73462572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010743073.5A Pending CN112000405A (en) 2020-07-29 2020-07-29 Method, equipment and storage medium for conveniently acquiring system logs

Country Status (1)

Country Link
CN (1) CN112000405A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11520681B2 (en) * 2018-01-23 2022-12-06 Amlogic (Shanghai) Co., Ltd. System log collection method

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651707A (en) * 2009-09-22 2010-02-17 西安交通大学 Method for automatically acquiring user behavior log of network
CN103544096A (en) * 2013-10-21 2014-01-29 Tcl集团股份有限公司 Method and system for feeding back information in case of operational failure of Android terminal
CN105893221A (en) * 2016-04-01 2016-08-24 广东欧珀移动通信有限公司 Terminal operation time length alarming method and device
CN106371986A (en) * 2016-09-08 2017-02-01 上海新炬网络技术有限公司 Log treatment operation and maintenance monitoring system
CN107071569A (en) * 2016-12-30 2017-08-18 武汉斗鱼网络科技有限公司 The method and system of application are debugged on a kind of Android TV
CN108880877A (en) * 2018-06-07 2018-11-23 深圳市茁壮网络股份有限公司 A kind of acquisition methods and device of log
CN109284251A (en) * 2018-08-14 2019-01-29 平安普惠企业管理有限公司 Blog management method, device, computer equipment and storage medium
CN109902068A (en) * 2019-02-15 2019-06-18 广州视源电子科技股份有限公司 Method and device for capturing household appliance logs and computer readable storage medium
CN110597777A (en) * 2019-09-18 2019-12-20 金瓜子科技发展(北京)有限公司 Log processing method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651707A (en) * 2009-09-22 2010-02-17 西安交通大学 Method for automatically acquiring user behavior log of network
CN103544096A (en) * 2013-10-21 2014-01-29 Tcl集团股份有限公司 Method and system for feeding back information in case of operational failure of Android terminal
CN105893221A (en) * 2016-04-01 2016-08-24 广东欧珀移动通信有限公司 Terminal operation time length alarming method and device
CN106371986A (en) * 2016-09-08 2017-02-01 上海新炬网络技术有限公司 Log treatment operation and maintenance monitoring system
CN107071569A (en) * 2016-12-30 2017-08-18 武汉斗鱼网络科技有限公司 The method and system of application are debugged on a kind of Android TV
CN108880877A (en) * 2018-06-07 2018-11-23 深圳市茁壮网络股份有限公司 A kind of acquisition methods and device of log
CN109284251A (en) * 2018-08-14 2019-01-29 平安普惠企业管理有限公司 Blog management method, device, computer equipment and storage medium
CN109902068A (en) * 2019-02-15 2019-06-18 广州视源电子科技股份有限公司 Method and device for capturing household appliance logs and computer readable storage medium
CN110597777A (en) * 2019-09-18 2019-12-20 金瓜子科技发展(北京)有限公司 Log processing method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11520681B2 (en) * 2018-01-23 2022-12-06 Amlogic (Shanghai) Co., Ltd. System log collection method

Similar Documents

Publication Publication Date Title
US9535946B2 (en) System method, and computer readable media for identifying a user-initiated log file record in a log file
CN107800757B (en) User behavior recording method and device
CN111756575A (en) Performance analysis method and device for storage server, and electronic equipment
CN110795325A (en) Visual point burying method, device, equipment and storage medium
CN115481025B (en) Script recording methods, devices, computer equipment and media for automated testing
CN113688288A (en) Data association analysis method and device, computer equipment and storage medium
CN110737591A (en) Webpage performance evaluation method, device, server and storage medium
CN112115005A (en) Test data acquisition method, device, computer equipment and storage medium
CN108255735B (en) Associated environment testing method, electronic device and computer readable storage medium
US11436133B2 (en) Comparable user interface object identifications
US20240273008A1 (en) Efficient memory leak detection in database systems
CN112835779A (en) Test case determination method and device and computer equipment
CN112416794A (en) Method, device and equipment for processing code coverage rate and storage medium
CN110955598A (en) Breakpoint processing method and device of kernel mode program
CN113836037A (en) Interface interaction test method, device, equipment and storage medium
CN110147314A (en) Test method, device and computer readable storage medium
CN113721920A (en) Diagnosis method and system of application component, electronic device and storage medium
CN112000405A (en) Method, equipment and storage medium for conveniently acquiring system logs
CN110096442B (en) Code debugging method, user equipment, storage medium and device
CN111046382A (en) Database auditing method, device, storage medium and device
CN107656868B (en) Debugging method and system for acquiring thread name by using thread private data
US11016867B2 (en) Test execution comparisons
CN113377719A (en) A method and system for obtaining abnormal shutdown time of a system
CN103186551B (en) Exception analysis method and analogue system based on web application platform
CN112612707B (en) Method and device for running test script, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20201127

RJ01 Rejection of invention patent application after publication