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

Log processing method based on Linux message queue

A technology of message queue and processing method, which is applied in the field of log processing based on Linux message queue, can solve problems such as complex log information processing, and achieve the effects of diversification and refinement of user needs, strong practicability, and easy promotion

Inactive Publication Date: 2014-06-04
LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF5 Cites 13 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In addition, some software may be composed of multiple processes, and each process may be composed of multiple threads, so the processing of log information generated during its parallel operation is more complicated.

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0029] A log processing method based on a Linux message queue of the present invention will be described in detail below.

[0030] The invention provides a log processing method based on a Linux message queue, which can write log information generated by multiple processes or threads into the same log file, and supports recording to the same log file in the case of mixing multiple processes and threads log, the specific processing process is:

[0031] 1) In the Linux operating system, the system accepts the path of the log file as a parameter.

[0032] 2) If the path is a relative path, convert it to an absolute path.

[0033] 3) Create an unnamed pipe for communication between the log service process to be created and the existing process.

[0034] 4) Create a new process so that there are two processes, parent and child.

[0035] 5) The child process closes the read end descriptor of the unnamed pipe.

[0036] 6) The parent process closes the write descriptor of the unna...

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 provides a log processing method based on a Linux message queue. The log processing method includes the following steps that a log processing system is created; the log processing system is used for processing logs. Compared with the prior art, the log processing method based on the Linux message queue can easily and conveniently record the logs; log information generated in the process of parallel software execution is controlled and recorded more accurately so as to reflect the time and sequence of all evens generated in the operation process of parallel programs, so that in an Linux operation system, the log processing system meeting higher requirements is provide, and diversified and detailed requirements of users are met; the log processing method is high in practicability and easy to popularize.

Description

technical field [0001] The invention relates to the technical field of computer applications, in particular to a log processing method based on a Linux message queue. Background technique [0002] Currently, there are many log processing systems in the Linux operating system. Recording logs during software execution is an effective way to record software execution process and behavior, and then debug software and troubleshoot problems. It plays an important role in solving the difficult-to-reproduce errors caused by encountering abnormal events in the process of software execution. However, most log processing systems do not support multiple processes and threads to record log information to the same log file at the same time. Sometimes, software designers and developers hope to write the execution process of multiple processes or threads into the same log file, so as to better reflect the process of program execution and facilitate log recording and viewing. [0003] For...

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
IPC IPC(8): G06F9/46G06F11/34
Inventor 刘续东
Owner LANGCHAO ELECTRONIC INFORMATION IND CO LTD
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