Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Log collection method, device and equipment and computer readable storage medium

A collection device and computer program technology, applied in the field of storage, can solve the problems of occupying application program memory, affecting the running speed of the application program, log write blocking, etc., so as to reduce the probability of write blocking, improve log collection efficiency, and improve operation. effect of speed

Active Publication Date: 2020-05-19
北京浪潮数据技术有限公司
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] At present, the common practice of application log collection is to collect logs from log files. During the log collection process, a large number of operations need to be performed on log files, which affects the writing efficiency of logs written to log files, resulting in log write blocking, especially It is especially obvious when the log writing frequency is high, and the log collection efficiency is low, occupying a large amount of application memory, and affecting the running speed of the application

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Log collection method, device and equipment and computer readable storage medium
  • Log collection method, device and equipment and computer readable storage medium
  • Log collection method, device and equipment and computer readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0041] see figure 1 , figure 1 It is an implementation flowchart of the log collection method in the embodiment of the present invention, and the method may include the following steps:

[0042] S101: When it is detected that there is log generation, read the thread execution priorities of the log printing thread and the log collection thread from the asynchronous execution thread list.

[0043] Wherein, the thread execution priorities of the log printing thread and the log collection thread are pre-stored in the asynchronous execution thread list.

[0044] An asynchronous execution thread list storing thread execution priorities of the log printing thread and the log collection thread may be created in advance. Whether there is log generation can be detected in real time or according to a preset time interval. When log generation is detected, the thread execution priorities of the log printing thread and the log collection thread are read from the asynchronous execution thr...

Embodiment 2

[0052] see figure 2 , figure 2 It is another implementation flowchart of the log collection method in the embodiment of the present invention, and the method may include the following steps:

[0053] S201: When it is detected that there is log generation, read the thread execution priorities of the log printing thread and the log collection thread from the asynchronous execution thread list.

[0054] Wherein, the thread execution priorities of the log printing thread and the log collection thread are pre-stored in the asynchronous execution thread list.

[0055] S202: When it is determined that the thread execution priority of the log printing thread is higher than the thread execution priority of the log collection thread, first start the log printing thread to call the log framework interface obtained by modifying the source code package of the log framework to print the log, and After detecting that the log printing is complete, start the log collection thread to call t...

Embodiment 3

[0067] see image 3 , image 3 It is another implementation flowchart of the log collection method in the embodiment of the present invention, and the method may include the following steps:

[0068] S301: When it is detected that there is log generation, read the thread execution priorities of the log printing thread and the log collection thread from the asynchronous execution thread list.

[0069] Wherein, the thread execution priorities of the log printing thread and the log collection thread are pre-stored in the asynchronous execution thread list.

[0070] S302: When it is determined that the thread execution priority of the log printing thread is higher than the thread execution priority of the log collection thread, first start the log printing thread to call the log frame interface obtained by encapsulating the log frame to print the log, and when the log is detected After the printing is completed, start the log collection thread to call the log framework interface...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a log collection method, which comprises the following steps of: when log generation is detected, reading thread execution priorities of a log printing thread and a log collection thread from an asynchronous execution thread list; when it is determined that the thread execution priority of the log printing thread is higher than the thread execution priority of the log collection thread, starting the log printing thread firstly to call a log framework interface for log printing, and then starting the log collection thread to call the log framework interface for log collection; otherwise, starting the log collection thread to call the log framework interface to collect logs, and then starting the log printing thread to call the log framework interface to print the logs. According to the method, the probability of log write-in blockage is greatly reduced, the log collection efficiency is improved, the memory of the application program is greatly released, and the running speed of the application program is increased. The invention furthermore discloses a log collection apparatus and device, and a storage medium, which have corresponding technical effects.

Description

technical field [0001] The present invention relates to the field of storage technology, in particular to a log collection method, device, equipment and computer-readable storage medium. Background technique [0002] The so-called log (Log) refers to the time-ordered collection of certain operations of objects specified by the system and their operation results. Each log record describes a separate system event, and the log records necessary and valuable information for IT resource-related activities such as servers, workstations, firewalls, and application software, which is very important for system monitoring, query, reporting, and security auditing of. Therefore, it is necessary to do a good job of collecting logs. [0003] At present, the common practice of application log collection is to collect logs from log files. During the log collection process, a large number of operations need to be performed on log files, which affects the writing efficiency of logs written ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/18G06F16/13G06F3/12
CPCG06F16/1815G06F16/13G06F3/1203
Inventor 王宝山
Owner 北京浪潮数据技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products