CN112732568B - System log acquisition method and device, storage medium and terminal - Google Patents

System log acquisition method and device, storage medium and terminal Download PDF

Info

Publication number
CN112732568B
CN112732568B CN202011641298.6A CN202011641298A CN112732568B CN 112732568 B CN112732568 B CN 112732568B CN 202011641298 A CN202011641298 A CN 202011641298A CN 112732568 B CN112732568 B CN 112732568B
Authority
CN
China
Prior art keywords
debugging
configuration
mini
full
area
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.)
Active
Application number
CN202011641298.6A
Other languages
Chinese (zh)
Other versions
CN112732568A (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.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific 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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN202011641298.6A priority Critical patent/CN112732568B/en
Publication of CN112732568A publication Critical patent/CN112732568A/en
Application granted granted Critical
Publication of CN112732568B publication Critical patent/CN112732568B/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/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application discloses a system log acquisition method, a device, a storage medium and a terminal, wherein the method is applied to the terminal, the terminal comprises a full debugging area, a mini debugging area and an active debugging area, and the method comprises the following steps: judging the shipment state of the terminal; if the shipment state is not shipment state, the full debugging configuration in the full debugging area is called, the full debugging configuration is written into the active debugging area, and the system log of the terminal is obtained through the full debugging configuration; and if the shipment state is the shipment state, calling the mini debugging configuration in the mini debugging region, writing the mini debugging configuration into the active debugging region, and acquiring the system log through the mini debugging configuration. By adopting the embodiment of the application, the system log can be flexibly acquired.

Description

System log acquisition method and device, storage medium and terminal
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a system log obtaining method, a device, a storage medium, and a terminal.
Background
For reliable performance of the terminal, various terminal systems are usually provided with a debug configuration. When the terminal system fails, the system log can be grabbed through debugging configuration, and then the failure cause is checked through the system log.
At present, a terminal acquires a system log through a debugging configuration in a debugging area, wherein the debugging configuration can only capture a key system log or can only capture a large number of system logs, and can not meet the scene of the key system log and the scene of the large number of system logs, so that the method for acquiring the system log is inflexible.
Disclosure of Invention
The embodiment of the application provides a system log acquisition method, a device, a storage medium and a terminal, which can flexibly acquire the system log. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a system log obtaining method, where the method includes:
judging the shipment state of the terminal;
if the shipment state is not shipment state, the full debugging configuration in the full debugging area is called, the full debugging configuration is written into the active debugging area, and the system log of the terminal is obtained through the full debugging configuration;
and if the shipment state is the shipment state, calling the mini debugging configuration in the mini debugging region, writing the mini debugging configuration into the active debugging region, and acquiring the system log through the mini debugging configuration.
In a second aspect, an embodiment of the present application provides a system log obtaining apparatus, where the apparatus includes:
the state judging module is used for judging the shipment state of the terminal;
the full debugging configuration calling module is used for calling full debugging configuration in the full debugging area if the shipment state is not in the shipment state, writing the full debugging configuration into the active debugging area and obtaining a system log of the terminal through the full debugging configuration;
the mini debugging configuration calling module is used for calling the mini debugging configuration in the mini debugging region if the shipment state is the shipment state, writing the mini debugging configuration into the active debugging region and obtaining the system log through the mini debugging configuration.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-described method steps.
In a fourth aspect, embodiments of the present application provide a terminal, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The technical scheme provided by some embodiments of the present application has the beneficial effects that at least includes:
in this embodiment of the present application, firstly, a shipment status of a terminal is determined, if the shipment status is a non-shipment status, a full debug configuration in the full debug area is called, and the full debug configuration is written into the active debug area, a system log of the terminal is obtained through the full debug configuration, and if the shipment status is a shipment status, a mini debug configuration in the mini debug area is called, and the mini debug configuration is written into the active debug area, and the system log is obtained through the mini debug configuration. When the terminal is in a non-shipment state, a large number of system logs can be captured, and when the terminal is in a shipment state, a mini debugging configuration can be captured, so that the terminal can select different debugging configurations according to different shipment states, thereby meeting the scene of the key system logs and the scene of a large number of system logs, and further flexibly acquiring the system logs.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a system architecture diagram of a system log obtaining method provided in an embodiment of the present application;
fig. 2 is a flow chart of a system log obtaining method provided in an embodiment of the present application;
FIG. 3 is an exemplary diagram of a calling debug configuration provided by embodiments of the present application;
FIG. 4 is a flowchart of another system log obtaining method according to an embodiment of the present disclosure;
FIG. 5 is a flowchart of another system log obtaining method according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a system log obtaining device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a status determining module according to an embodiment of the present application;
FIG. 8 is a schematic structural diagram of a full debug configuration call module according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a mini debug configuration retrieving module according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a system log obtaining apparatus according to another embodiment of the present disclosure;
fig. 11 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
In the description of the present application, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present application, it is to be understood that the terms "comprise" and "have," and any variations thereof, are intended to cover non-exclusive inclusions, unless otherwise specifically defined and defined. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art in a specific context. Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The system log acquisition method provided by the embodiment of the application can be realized by a computer program and can be run on terminal equipment based on a von neumann system. The computer program may be integrated in the application or may run as a stand-alone tool class application. The system log obtaining device may be a terminal device, including but not limited to: personal computers, tablet computers, handheld devices, vehicle mounted devices, wearable devices, computing devices, or other processing devices connected to a wireless modem, and the like. Terminal devices in different networks may be called different names, for example: a user equipment, an access terminal, a subscriber unit, a subscriber station, a mobile station, a remote terminal, a mobile device, a user terminal, a wireless communication device, a user agent or user equipment, a cellular telephone, a cordless telephone, a terminal device in a 5G network or a future evolution network, etc. Referring to fig. 1, a system architecture diagram of a system log obtaining method according to an embodiment of the present application is provided. As shown in FIG. 1, the terminal comprises a full debugging area, a mini debugging area and an active debugging area, wherein full debugging configuration is stored in the full debugging area, and mini debugging configuration is triggered in the mini debugging area. When the terminal is in a non-shipment state, a large number of System logs need to be grabbed, full debugging configuration in a full debugging area can be called through an Operation System (OS) in the terminal, and a large number of System logs can be grabbed through the full debugging configuration. When the terminal is in a shipment state, the key system log needs to be grabbed, mini debugging configuration in a mini debugging area can be called through an operating system in the terminal, and the key system log is grabbed through the mini debugging configuration. The operating system may be Android system, microsoft Windows operating system (Windows system), apple computer operating system (mac system), linux system, apple mobile device operating system (iPhone Operation System, iOS), etc.
The system log obtaining method provided by the application is described in detail below with reference to specific embodiments.
Referring to fig. 2, fig. 2 is a flowchart of an embodiment of a system log obtaining method according to the present application. Specific:
s101: and judging the shipment state of the terminal.
The shipment state refers to a state from production to use, and can be classified into a state before use (non-shipment state) and a state after use (shipment state).
Specifically, the determining the shipment status of the terminal may be: and acquiring the identification information of the terminal, and judging whether the terminal is activated or not based on the identification information. And if the terminal is activated, determining that the shipment state of the terminal is a shipment state, and if the terminal is not activated, determining that the shipment state of the terminal is a non-shipment state.
The identification information may be activation information including the terminal, and whether the terminal is activated is determined through the activation information.
Optionally, the identification information may be an identifier of the terminal, and after the identification information is obtained, the activation information of the terminal corresponding to the identification information is queried in the cloud, so as to determine whether the terminal is activated.
S102: and if the shipment state is not the shipment state, calling full debugging configuration in the full debugging area, writing the full debugging configuration into the active debugging area, and acquiring a system log of the terminal through the full debugging configuration.
The full debug area is a physical partition in the terminal that stores full debug configuration, where full debug configuration is a debug configuration that can grab a large number of system logs, including but not limited to full Source. The debug configuration is a configuration for debugging and debugging the terminal, and can also be a debug program. The physical partition refers to a disk partition obtained by dividing a storage device (hard disk) in the terminal, and is used for storing data.
The active debug area is a physical partition that stores the currently used debug configuration.
The system log of the terminal refers to information of hardware, software and system problems in the system of the terminal, and can monitor events occurring in the system of the terminal. System logs include, but are not limited to, system crash logs, application logs, and security logs.
Specifically, when the terminal is in a non-shipment state, a large number of system logs are required to be acquired, so that full debugging configuration in the full debugging area is called, the full debugging configuration is written into the active debugging area, and when the terminal system grabs the system logs, the full debugging configuration is called from the active debugging area, so that a large number of system logs can be acquired through the full debugging configuration.
S103: and if the shipment state is the shipment state, calling the mini debugging configuration in the mini debugging region, writing the mini debugging configuration into the active debugging region, and acquiring the system log through the mini debugging configuration.
The mini debugging area is a physical partition for storing mini debugging configuration in the terminal, wherein the mini debugging configuration is the debugging configuration capable of grabbing key system logs, and the mini debugging configuration comprises, but is not limited to, a small memory dump file (mini) and a mini profiler program.
Specifically, when the terminal is in a non-shipment state, a large number of system logs are required to be acquired, so that mini debugging configuration in the mini debugging region is called, and the mini debugging configuration is written into the active debugging region, so that when the terminal system grabs the system logs, the mini debugging configuration is called from the active debugging region, and a large number of system logs can be acquired through the mini debugging configuration.
For example, as shown in FIG. 3, an exemplary schematic diagram of a call-up debug configuration includes a full debug area, a mini debug area, an active debug area, a full debug configuration, and a mini debug configuration. And when the terminal is in a non-shipment state, calling full debugging configuration. And when the terminal is in a shipment state, the mini debugging configuration is called.
When the mini debugging configuration is called to the active debugging region, the current debugging configuration is replaced by the mini debugging configuration, and at this time, only the mini debugging configuration is stored in the active debugging region, so that a system log is obtained through the mini debugging configuration. When the full debugging configuration is fetched to the active debugging region, the current debugging configuration is replaced by the full debugging configuration, and at the moment, only the full debugging configuration is stored in the active debugging region, so that a system log is acquired through the full debugging configuration.
Optionally, when the mini debug configuration is called to the active debug area, the current debug configuration is not replaced by the mini debug configuration, the mini debug configuration and the current debug configuration are stored in the active debug area at the same time, and when the system log is obtained, the mini debug configuration in the active debug area is called to obtain the system log, and the current debug configuration is not called. When the full debugging configuration is called to the active debugging region, the current debugging configuration is not replaced by the full debugging configuration, the full debugging configuration and the current debugging configuration are simultaneously stored in the active debugging region, and when the system log is obtained, the full debugging configuration in the active debugging region is called to obtain the system log, and the current debugging configuration is not called. The method comprises the steps that a current debugging configuration is reserved in an active debugging area, so that when the current debugging configuration is needed to acquire a system log, the current debugging configuration is directly called in the active debugging area by the terminal.
In the embodiment of the application, when the terminal is in a non-shipment state, the full debugging configuration is called, a large number of system logs can be captured, when the terminal is in a shipment state, the mini debugging configuration is called, the key system logs can be captured, so that the terminal can select different debugging configurations according to different shipment states, the scene of the key system logs is met, the scene of the large number of system logs is met, and the system logs can be flexibly obtained.
Referring to fig. 4, fig. 4 is a flowchart of another embodiment of a system log obtaining method according to the present application. Specific:
s201: and judging the shipment state of the terminal.
See S101 for details, and are not described here again.
S202: if the shipment status is not shipment status, detecting whether the current debug configuration of the active debug area is the mini debug configuration.
When the terminal is in a non-shipment state, the current debug configuration of the active debug area may be configured for the mini debug or may be configured for the full debug. In order to determine that the current debug configuration of the active debug area is full debug configuration, a terminal can grasp a large number of system logs, and whether the current debug configuration is mini debug configuration is detected first.
The method for detecting whether the current debug configuration of the active debug area is the mini debug configuration may be as follows: reading data of current debugging configuration in the active debugging area, reading data of the mini debugging configuration in the mini debugging area, comparing whether the data of the current debugging configuration is identical to the data of the mini debugging configuration, if so, the current debugging configuration is the mini debugging configuration, and if not, the current debugging configuration is not the mini debugging configuration.
The method for detecting whether the current debug configuration of the active debug area is the mini debug configuration may further be: and reading a type identifier of the current debugging configuration in the active debugging region, and judging the type of the current debugging configuration through the type identifier, so as to judge whether the current debugging configuration is the mini debugging configuration.
Optionally, if the shipment status is not shipment status, it may be detected whether the current debug configuration of the active debug area is the full debug configuration, and if not, the step of retrieving the full debug configuration and writing the full debug configuration into the active debug area is performed.
S203: if yes, the full debugging configuration is called, the full debugging configuration is written into the active debugging area, and the system log of the terminal is obtained through the full debugging configuration.
See S102 for details, which are not described here again.
Taking a smart phone as an example, before the smart phone leaves the factory, in order to ensure that no problem exists in the smart phone system, the full debugging configuration is called, the full debugging configuration is written into the active debugging area, and a large number of system logs are grabbed through the full debugging configuration.
S204: if the shipment status is the shipment status, detecting whether the current debug configuration of the active debug area is the full debug configuration.
When the terminal is in the shipment state, the current debug configuration of the active debug area may be the mini debug configuration or the full debug configuration. In order to determine that the current debug configuration of the active debug area is mini debug configuration, a terminal can grasp a key system log, and whether the current debug configuration is full debug configuration is detected first.
The method for detecting whether the current debug configuration of the active debug area is the full debug configuration may be: reading data of current debugging configuration in the active debugging area, reading data of the full debugging configuration in the full debugging area, comparing whether the data of the current debugging configuration is identical to the data of the full debugging configuration, if so, setting the current debugging configuration as the full debugging configuration, and if not, setting the current debugging configuration as the full debugging configuration.
The method for detecting whether the current debug configuration of the active debug area is the full debug configuration may further be: and reading a type identifier of the current debugging configuration in the active debugging region, and judging the type of the current debugging configuration through the type identifier, so as to judge whether the current debugging configuration is the full debugging configuration.
Optionally, if the shipment status is the shipment status, it may be detected whether the current debug configuration of the active debug area is the mini debug configuration, and if not, the step of retrieving the mini debug configuration and writing the mini debug configuration into the active debug area is performed.
S205: if yes, the mini debugging configuration is called, the mini debugging configuration is written into the active debugging area, and the system log is obtained through the mini debugging configuration.
See S102 for details, which are not described here again.
Taking a smart phone as an example, when an application program of the smart phone flashes back, a key system log for the application program is grabbed for searching a problem. The method for acquiring the key system log comprises the following steps: and calling the full debugging configuration, writing the full debugging configuration into the active debugging area, and grabbing a large number of system logs through the full debugging configuration.
In the embodiment of the present application, when the terminal is in a non-shipment state, it is detected whether the current debug configuration of the active debug area is the mini debug configuration, if yes, the full debug configuration is invoked, a large number of system logs can be captured, when the terminal is in a shipment state, it is detected whether the current debug configuration of the active debug area is the full debug configuration, if yes, the mini debug configuration is invoked, the critical system logs can be captured, so that the terminal can select whether the debug configuration is invoked according to different shipment states and types of the current debug configuration, thereby meeting the scene of the critical system logs and meeting the scene of the large number of system logs, and further flexibly obtaining the system logs. Further, whether to call the corresponding debug configuration is determined by judging the type of the current debug configuration, so that repeated execution of operations for calling the debug configuration is avoided.
Referring to fig. 5, fig. 5 is a flowchart of another embodiment of a system log obtaining method according to the present application. Specific:
s301: and establishing a full debugging area and a mini debugging area.
Specifically, the full debug area is a physical partition for storing full debug configuration in the terminal, and the mini debug area is a physical partition for storing mini debug configuration in the terminal. Thus, a full debug area is established, as well as a mini debug area, i.e. a physical partition is established. The method for establishing the physical partition comprises the following steps: partitioning the terminal disk, setting the partition as a physical volume, adding the set physical volume under an existing volume group or creating a new volume group, and distributing redundant space in the volume group into an original logical volume or creating the new logical volume, thereby creating a physical partition. According to the method, a full debugging area and a mini debugging area can be established.
The memory size of the active debugging area is the same as the memory size of the full debugging area and the memory size of the mini debugging area respectively.
Optionally, the memory size of the active debug area is the sum of the memory size of the full debug area and the memory size of the mini debug area, so that the full debug configuration in the full debug area and the mini debug configuration in the mini debug area can be simultaneously invoked.
S302: and judging the shipment state of the terminal.
See S101 for details, and are not described here again.
S303: and if the shipment state is not the shipment state, calling full debugging configuration in the full debugging area, writing the full debugging configuration into the active debugging area, and acquiring a system log of the terminal through the full debugging configuration.
See S102 for details, which are not described here again.
Optionally, the method for calling the full debug configuration in the full debug area and writing the full debug configuration into the active debug area may be as follows: and reading first data of the full debugging configuration in the full debugging area, and writing the first data into the active debugging area.
S304: if the shipment state is not shipment state, call full debugging configuration in the full debugging area, write the full debugging configuration into the active debugging area, and acquire a system log of the terminal through the full debugging configuration
See S102 for details, which are not described here again.
Optionally, the method for calling the full debug configuration in the full debug area and writing the full debug configuration into the active debug area may be as follows: and reading second data of the mini debugging configuration in the mini debugging region, and writing the second data into the active debugging region.
In the embodiment of the application, the full debugging area and the mini debugging area are established first, when the terminal is in a non-shipment state, full debugging configuration in the full debugging area is called, a large number of system logs can be grabbed, when the terminal is in a shipment state, mini debugging configuration in the mini debugging area is called, key system logs can be grabbed, so that the terminal can select different debugging configurations according to different shipment states, a scene requiring the key system logs can be met, a scene requiring a large number of system logs can be met, and the system logs can be flexibly acquired.
The system log obtaining apparatus provided in the embodiment of the present application will be described in detail below with reference to fig. 6. Note that, the system log obtaining apparatus shown in fig. 6 is configured to perform the method of the embodiments shown in fig. 1 to 5 of the present application, and for convenience of explanation, only a portion relevant to the embodiments of the present application is shown, and specific technical details are not disclosed, and please refer to the embodiments shown in fig. 1 to 5 of the present application.
Referring to fig. 6, a schematic structural diagram of a system log obtaining apparatus according to an embodiment of the present application is shown. The system log obtaining apparatus 1 may be implemented as all or a part of the terminal by software, hardware, or a combination of both. According to some embodiments, the system log obtaining apparatus 1 includes a status judging module 11, a full debug configuration retrieving module 12, and a mini debug configuration retrieving module 13, specifically configured to:
a state judging module 11, configured to judge a shipment state of the terminal;
a full debug configuration retrieving module 12, configured to retrieve a full debug configuration in the full debug area if the shipment status is a non-shipment status, write the full debug configuration into the active debug area, and obtain a system log of the terminal through the full debug configuration;
and the mini debugging configuration calling module 13 is used for calling the mini debugging configuration in the mini debugging region if the shipment state is the shipment state, writing the mini debugging configuration into the active debugging region, and obtaining the system log through the mini debugging configuration.
Alternatively, as shown in fig. 7, the status judging module 11 includes:
an identification information acquisition unit 111 for acquiring identification information of the terminal;
a set judging unit 112 for judging whether the terminal is activated or not based on the identification information;
the full debug configuration calling module 12 is specifically configured to:
if not, determining the shipment state as the non-shipment state, and calling full debugging configuration in the full debugging area;
the mini debug configuration retrieving module 13 is specifically configured to:
if yes, determining the shipment status as the shipment status, and calling the mini debugging configuration in the mini debugging area.
Alternatively, as shown in fig. 8, the full debug configuration call module 12 includes:
a debug configuration detecting unit 121, configured to detect whether a current debug configuration of the active debug area is the mini debug configuration;
and a full debug configuration writing unit 122, configured to, if so, invoke the full debug configuration, and write the full debug configuration into the active debug area.
Optionally, as shown in fig. 9, the mini debug configuration retrieving module 13 includes:
a debug configuration detecting unit 131, configured to detect whether a current debug configuration of the active debug area is the full debug configuration;
and a mini debug configuration writing unit 132, configured to, if yes, invoke the mini debug configuration, and write the mini debug configuration into the active debug area.
Optionally, as shown in fig. 10, the apparatus 1 further includes:
a debug area creation module 14 for creating the full debug area and the mini debug area;
the full debug configuration calling module 12 is specifically configured to:
reading first data of the full debugging configuration in the full debugging area, and writing the first data into the active debugging area;
the mini debug configuration retrieving module 13 is specifically configured to:
and reading second data of the mini debugging configuration in the mini debugging region, and writing the second data into the active debugging region.
Optionally, the memory size of the active debug area is the same as the memory size of the full debug area and the memory size of the mini debug area respectively; or alternatively, the first and second heat exchangers may be,
the memory size of the active debugging area is the sum of the memory size of the full debugging area and the memory size of the mini debugging area.
It should be noted that, when the system log obtaining apparatus provided in the foregoing embodiment performs the system log obtaining method, only the division of the foregoing functional modules is used as an example, and in practical application, the foregoing functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the system log obtaining device and the system log obtaining method provided in the foregoing embodiments belong to the same concept, which embody the detailed implementation process in the method embodiment, and are not repeated here.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
In the embodiment of the application, when the terminal is in a non-shipment state, the full debugging configuration is called, a large number of system logs can be captured, when the terminal is in a shipment state, the mini debugging configuration is called, the key system logs can be captured, so that the terminal can select different debugging configurations according to different shipment states, the scene of the key system logs is met, the scene of the large number of system logs is met, and the system logs can be flexibly obtained.
The embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and executed by the processor to the system log obtaining method in the embodiment shown in fig. 1 to 5, and the specific execution process may refer to the specific description of the embodiment shown in fig. 1 to 5, which is not repeated herein.
The embodiment of the present application further provides a computer program product, where at least one instruction is stored in the computer program product, where the at least one instruction is loaded by the processor and executed by the processor to perform the system log obtaining method in the embodiment shown in fig. 1 to fig. 5, and the specific execution process may refer to the specific description of the embodiment shown in fig. 1 to fig. 5, which is not repeated herein.
Referring to fig. 11, a schematic structural diagram of a terminal is provided in an embodiment of the present application. As shown in fig. 11, the terminal 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, a memory 1005, at least one communication bus 1002.
Wherein the communication bus 1002 is used to enable connected communication between these components.
The user interface 1003 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 1003 may further include a standard wired interface and a wireless interface.
The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the processor 1001 may include one or more processing cores. The processor 1001 connects various parts within the entire server 1000 using various interfaces and lines, and performs various functions of the server 1000 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Alternatively, the processor 1001 may be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 1001 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 1001 and may be implemented by a single chip.
The Memory 1005 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). The memory 1005 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 1005 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described respective method embodiments, etc.; the storage data area may store data or the like referred to in the above respective method embodiments. The memory 1005 may also optionally be at least one storage device located remotely from the processor 1001. As shown in fig. 11, an operating system, a network communication module, a user interface module, and a system log acquisition application program may be included in the memory 1005 as one type of computer storage medium.
In the terminal 1000 shown in fig. 11, a user interface 1003 is mainly used for providing an input interface for a user, and acquiring data input by the user; and the processor 1001 may be configured to call a system log acquisition application program stored in the memory 1005, and specifically perform the following operations:
judging the shipment state of the terminal;
if the shipment state is not shipment state, the full debugging configuration in the full debugging area is called, the full debugging configuration is written into the active debugging area, and the system log of the terminal is obtained through the full debugging configuration;
and if the shipment state is the shipment state, calling the mini debugging configuration in the mini debugging region, writing the mini debugging configuration into the active debugging region, and acquiring the system log through the mini debugging configuration.
In one embodiment, the processor 1001, when performing the determining the shipment status of the terminal, specifically performs the following operations:
acquiring the identification information of the terminal;
judging whether the terminal is activated or not based on the identification information;
when executing the call configuration in the full debug area if the shipment status is not in shipment status, the processor 1001 specifically executes the following operations:
if not, determining the shipment state as the non-shipment state, and calling full debugging configuration in the full debugging area;
when executing the shipment status, the processor 1001 invokes the mini debug configuration in the mini debug area, and specifically executes the following operations:
if yes, determining the shipment status as the shipment status, and calling the mini debugging configuration in the mini debugging area.
In one embodiment, the processor 1001, when executing the call to the full debug configuration in the full debug area, and writing the full debug configuration to the active debug area, specifically performs the following operations:
detecting whether the current debugging configuration of the active debugging region is the mini debugging configuration or not;
if yes, the full debugging configuration is called, and the full debugging configuration is written into the active debugging area.
In one embodiment, the processor 1001 executes the mini debug configuration in the mini debug region, and writes the mini debug configuration into the active debug region, specifically executing the following operations:
detecting whether the current debugging configuration of the active debugging area is the full debugging configuration or not;
if yes, the mini debugging configuration is called, and the mini debugging configuration is written into the active debugging area.
In one embodiment, the processor 1001 further performs the following:
establishing the full debugging area and the mini debugging area;
the processor 1001, when executing the call to the full debug configuration in the full debug area, writes the full debug configuration to the active debug area, specifically performs the following operations:
reading first data of the full debugging configuration in the full debugging area, and writing the first data into the active debugging area;
the processor 1001 executes the mini debug configuration in the mini debug area, and writes the mini debug configuration into the active debug area, and specifically executes the following operations:
and reading second data of the mini debugging configuration in the mini debugging region, and writing the second data into the active debugging region.
In one embodiment, the memory size of the active debug area is the same as the memory size of the full debug area and the memory size of the mini debug area, respectively; or alternatively, the first and second heat exchangers may be,
the memory size of the active debugging area is the sum of the memory size of the full debugging area and the memory size of the mini debugging area.
In the embodiment of the application, when the terminal is in a non-shipment state, the full debugging configuration is called, a large number of system logs can be captured, when the terminal is in a shipment state, the mini debugging configuration is called, the key system logs can be captured, so that the terminal can select different debugging configurations according to different shipment states, the scene of the key system logs is met, the scene of the large number of system logs is met, and the system logs can be flexibly obtained.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, or the like.
The foregoing disclosure is only illustrative of the preferred embodiments of the present application and is not intended to limit the scope of the claims herein, as the equivalent of the claims herein shall be construed to fall within the scope of the claims herein.

Claims (10)

1. The system log obtaining method is characterized by being applied to a terminal, wherein the terminal comprises a full debugging area, a mini debugging area and an active debugging area, and the method comprises the following steps:
judging the shipment state of the terminal;
if the shipment state is not shipment state, the full debugging configuration in the full debugging area is called, the full debugging configuration is written into the active debugging area, and the system log of the terminal is obtained through the full debugging configuration;
if the shipment status is the shipment status, the mini debugging configuration in the mini debugging area is called, the mini debugging configuration is written into the active debugging area, and the system log is obtained through the mini debugging configuration;
the judging the shipment status of the terminal includes: judging whether the terminal is activated or not, if not, determining that the shipment state is the non-shipment state, and if so, determining that the shipment state is the shipment state.
2. The method of claim 1, wherein the determining whether the terminal is activated comprises:
acquiring the identification information of the terminal;
and judging whether the terminal is activated or not based on the identification information.
3. The method of claim 1, wherein the retrieving a full debug configuration in the full debug area and writing the full debug configuration to the active debug area comprises:
detecting whether the current debugging configuration of the active debugging region is the mini debugging configuration or not;
if yes, the full debugging configuration is called, and the full debugging configuration is written into the active debugging area.
4. The method of claim 1, wherein the retrieving mini debug configuration in the mini debug region and writing the mini debug configuration to the active debug region comprises:
detecting whether the current debugging configuration of the active debugging area is the full debugging configuration or not;
if yes, the mini debugging configuration is called, and the mini debugging configuration is written into the active debugging area.
5. The method according to claim 1, wherein the method further comprises:
establishing the full debugging area and the mini debugging area;
the calling the full debugging configuration in the full debugging area and writing the full debugging configuration into the active debugging area comprises the following steps:
reading first data of the full debugging configuration in the full debugging area, and writing the first data into the active debugging area;
the step of calling the mini debugging configuration in the mini debugging region and writing the mini debugging configuration into the active debugging region comprises the following steps:
and reading second data of the mini debugging configuration in the mini debugging region, and writing the second data into the active debugging region.
6. The method of claim 5, wherein the active debug area has a memory size that is the same as the full debug area and the mini debug area, respectively; or alternatively, the first and second heat exchangers may be,
the memory size of the active debugging area is the sum of the memory size of the full debugging area and the memory size of the mini debugging area.
7. A system log obtaining device, which is characterized in that the device is applied to a terminal, the terminal comprises a full debugging area, a mini debugging area and an active debugging area, and the device comprises:
the state judging module is used for judging the shipment state of the terminal;
the full debugging configuration calling module is used for calling full debugging configuration in the full debugging area if the shipment state is not in the shipment state, writing the full debugging configuration into the active debugging area and obtaining a system log of the terminal through the full debugging configuration;
the mini debugging configuration calling module is used for calling the mini debugging configuration in the mini debugging region if the shipment state is the shipment state, writing the mini debugging configuration into the active debugging region and obtaining the system log through the mini debugging configuration;
the state judging module is further configured to judge whether the terminal is activated, if not, determine that the shipment state is the not-shipment state, and if yes, determine that the shipment state is the already-shipment state.
8. The apparatus of claim 7, wherein the status determination module comprises:
an identification information obtaining unit, configured to obtain identification information of the terminal;
and the set judging unit is used for judging whether the terminal is activated or not based on the identification information.
9. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method steps of any one of claims 1 to 6.
10. A terminal, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1-6.
CN202011641298.6A 2020-12-31 2020-12-31 System log acquisition method and device, storage medium and terminal Active CN112732568B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011641298.6A CN112732568B (en) 2020-12-31 2020-12-31 System log acquisition method and device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011641298.6A CN112732568B (en) 2020-12-31 2020-12-31 System log acquisition method and device, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN112732568A CN112732568A (en) 2021-04-30
CN112732568B true CN112732568B (en) 2024-01-05

Family

ID=75609081

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011641298.6A Active CN112732568B (en) 2020-12-31 2020-12-31 System log acquisition method and device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN112732568B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546460A (en) * 2010-11-12 2012-07-04 微软公司 Debugging in a cluster processing network
CN109388623A (en) * 2018-11-02 2019-02-26 郑州云海信息技术有限公司 A kind of method, system and the associated component of equipment fault detection
CN111767261A (en) * 2020-05-29 2020-10-13 广州视源电子科技股份有限公司 Debugging log output method and device, storage medium and electronic equipment
CN112131587A (en) * 2020-09-21 2020-12-25 杭州云象网络技术有限公司 Intelligent contract pseudo-random number security inspection method, system, medium and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9384106B2 (en) * 2014-02-21 2016-07-05 Rolf Segger Real time terminal for debugging embedded computing systems

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546460A (en) * 2010-11-12 2012-07-04 微软公司 Debugging in a cluster processing network
CN109388623A (en) * 2018-11-02 2019-02-26 郑州云海信息技术有限公司 A kind of method, system and the associated component of equipment fault detection
CN111767261A (en) * 2020-05-29 2020-10-13 广州视源电子科技股份有限公司 Debugging log output method and device, storage medium and electronic equipment
CN112131587A (en) * 2020-09-21 2020-12-25 杭州云象网络技术有限公司 Intelligent contract pseudo-random number security inspection method, system, medium and device

Also Published As

Publication number Publication date
CN112732568A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
US11853767B2 (en) Inter-core data processing method, system on chip and electronic device
CN110704202B (en) Multimedia recording data sharing method and terminal equipment
CN105607986A (en) Acquisition method and device of user behavior log data
CN111858112B (en) Method, client and server for detecting memory leakage
CN104978180B (en) Unprocessed event prompting method and device and mobile terminal
CN111813641B (en) Method, device, medium and equipment for collecting crash information
CN103838648A (en) Terminal and data backup method
CN110727566B (en) Method, device, medium and electronic equipment for acquiring process crash information
CN110377341B (en) Method, device, medium and electronic equipment for monitoring no-response exception
CN111078523A (en) Log obtaining method and device, storage medium and electronic equipment
CN107908492B (en) Black screen detection method, mobile terminal and computer readable storage medium
US20240152439A1 (en) Detection Method and Electronic Device
CN110881224B (en) Network long connection method, device, equipment and storage medium
WO2024125288A1 (en) Data storage method and apparatus for monitoring devices, and storage medium and device
CN111061448A (en) Log information display method and device, electronic equipment and storage medium
CN110765085A (en) Log information writing method, system, storage medium and mobile terminal
CN112732568B (en) System log acquisition method and device, storage medium and terminal
CN114296986B (en) Memory leakage positioning method, device, medium and electronic equipment
CN107168648B (en) File storage method and device and terminal
CN113961427B (en) System memory analysis method and electronic equipment
CN112989323B (en) Process detection method, device, terminal and storage medium
CN112073505B (en) Method for unloading on cloud server, control device and storage medium
CN116610648A (en) Log storage method and device, electronic equipment and storage medium
CN114070892A (en) Data transmission method and device
CN112231290A (en) Method, device and equipment for processing local log and 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
GR01 Patent grant
GR01 Patent grant