CN102455889B - Method, device and enterprise system for obtaining process output logs - Google Patents

Method, device and enterprise system for obtaining process output logs Download PDF

Info

Publication number
CN102455889B
CN102455889B CN201010524996.8A CN201010524996A CN102455889B CN 102455889 B CN102455889 B CN 102455889B CN 201010524996 A CN201010524996 A CN 201010524996A CN 102455889 B CN102455889 B CN 102455889B
Authority
CN
China
Prior art keywords
daily record
inlet flow
monitoring thread
stream
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.)
Active
Application number
CN201010524996.8A
Other languages
Chinese (zh)
Other versions
CN102455889A (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.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN201010524996.8A priority Critical patent/CN102455889B/en
Publication of CN102455889A publication Critical patent/CN102455889A/en
Application granted granted Critical
Publication of CN102455889B publication Critical patent/CN102455889B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention, belonging to the computer software field, provides a method, a device and an enterprise system for obtaining process output logs. The method comprises the following steps of: when creating a second progress in a first progress, obtaining the log input stream of the second progress; creating a monitoring thread through the first progress, and regularly examining whether a new log stream is produced by the log input stream of the second progress through the monitoring thread; and when the monitoring thread finds out that the new log stream is produced by the log input stream of the second progress, outputting the new log stream to the progress log document of the second progress. The method provided in the invention obtains the output log of the second progress by creating the monitoring thread through the first progress and regularly examining the log input stream of the second progress, and ensures that log information can be obtained in real time by regularly examining the log input stream of the second progress; and the log stream is used so that the output log of the progress can be obtained conveniently and at low consumption.

Description

A kind of method, device and business system of obtaining process output logs
Technical field
The invention belongs to computer software fields, relate in particular to a kind of method, device and business system of obtaining process output logs.
Background technology
Process is one and has the program of standalone feature about the once operation activity of certain data acquisition.It can apply for and have system resource, is a dynamic concept, is a movable entity.It is not the code of program, also comprises current activity, by the value of programmable counter and the content of processing register, represents.In large-scale business application, generally by a plurality of different processes, provide service, the service of large scale business application is monitored in the daily record that need to inquire about the output journal of these processes or directly read process output, but to process output logs read or the inquiry of process output logs will cause output journal slow, consumption of natural resource is many, can not guarantee the shortcomings such as real-time.
Summary of the invention
The object of the embodiment of the present invention is to provide a kind of method of obtaining easily and efficiently process output logs, is intended to the problem that solution must not be obtained process output logs in real time.
The embodiment of the present invention is achieved in that a kind of method of obtaining process output logs, and described method comprises the following steps:
When creating the second process in the first process, obtain the daily record inlet flow of the second process, the daily record inlet flow of described the second process comprises general daily record inlet flow and error log inlet flow;
By the first process creation monitoring thread, and by the daily record inlet flow that monitoring thread is made regular check on the second process, whether produced new daily record and flowed;
When the daily record inlet flow that monitors the second process when monitoring thread has produced new daily record stream, new daily record stream is exported to the process log file of the second process,
The described first process creation monitoring thread of passing through, and be specially by the step whether the daily record inlet flow that monitoring thread is made regular check on the second process has produced new daily record stream:
By the first process creation the first monitoring thread and the second monitoring thread;
Whether by the first monitoring thread monitoring, make regular check on general daily record inlet flow has produced new daily record and has flowed;
Whether by the second monitoring thread monitoring, make regular check on error log inlet flow has produced new daily record and has flowed.
Another object of the embodiment of the present invention is to provide a kind of device that obtains process output logs, and described device comprises:
Inlet flow acquisition module, for by creating the second process in the first process, and obtains the daily record inlet flow of described the second process, and the daily record inlet flow of described the second process comprises general daily record inlet flow and error log inlet flow;
Make regular check on module, by the first process creation monitoring thread, and by the daily record inlet flow that monitoring thread is made regular check on the second process, whether produced new daily record and flow.
New daily record output module, while having produced new daily record stream for monitor the daily record inlet flow of the second process when monitoring thread, new daily record stream is exported to the process log file of the second process, the described first process creation monitoring thread of passing through, and be specially by the step whether the daily record inlet flow that monitoring thread is made regular check on the second process has produced new daily record stream:
By the first process creation the first monitoring thread and the second monitoring thread;
Whether by the first monitoring thread monitoring, make regular check on general daily record inlet flow has produced new daily record and has flowed;
Whether by the second monitoring thread monitoring, make regular check on error log inlet flow has produced new daily record and has flowed.
Another object of the embodiment of the present invention is to provide a kind of business system, comprises the described device that obtains process output logs.
In embodiments of the present invention, by start the inlet flow that obtains described the second process after the second process in the first process, and by the method that the monitoring thread of the first process creation is made regular check on the daily record inlet flow of the second process, obtain the output journal of the second process.The method of making regular check on the daily record inlet flow of the second process has guaranteed to obtain in real time log information, and the use of daily record stream can facilitate and low consumption obtain process output logs.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the method for obtaining process output logs that provides of first embodiment of the invention;
Fig. 2 is the process flow diagram of the method for obtaining process output logs that provides of second embodiment of the invention;
Fig. 3 is the device schematic diagram that obtains process output logs that the embodiment of the present invention provides.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The embodiment of the present invention is by start the inlet flow that obtains described the second process after the second process in the first process, and by the method that the monitoring thread of described the first process creation is made regular check on the daily record inlet flow of described the second process, obtains the output journal of described the second process.
The invention provides a kind of method and apparatus that obtains process output logs:
Described method comprises:
When creating the second process in the first process, obtain the daily record inlet flow of the second process;
By the first process creation monitoring thread, and by the daily record inlet flow that monitoring thread is made regular check on the second process, whether produced new daily record and flowed;
When the daily record inlet flow that monitors the second process when monitoring thread has produced new daily record stream, new daily record stream is exported to the process log file of the second process.
Described device comprises:
Inlet flow acquisition module, for by creating the second process in the first process, and obtains the daily record inlet flow of described the second process.
Make regular check on module, by the first process creation monitoring thread, and by the daily record inlet flow that monitoring thread is made regular check on the second process, whether produced new daily record and flow.
New daily record output module, while having produced new daily record stream for monitor the daily record inlet flow of the second process when monitoring thread, exports new daily record stream to the process log file of the second process.
For technical solutions according to the invention are described, below by specific embodiment, describe.
Embodiment mono-:
Fig. 1 shows the idiographic flow of the method for obtaining process output logs that first embodiment of the invention provides.
In step S101, when creating the second process in the first process, obtain the daily record inlet flow of the second process.
In embodiments of the present invention, the second process is the subprocess of the first process creation.The daily record inlet flow of the second process of obtaining comprises general daily record inlet flow and error log inlet flow.
In step S102, by the first process creation monitoring thread, and by the daily record inlet flow that monitoring thread is made regular check on the second process, whether produced new daily record and flowed.
In embodiments of the present invention, the first process creates respectively two monitoring thread and is respectively the first monitoring thread and the second monitoring thread.Wherein whether the first monitoring thread has produced new daily record stream for making regular check on the general daily record inlet flow of the second process, and whether the second monitoring thread has produced new daily record stream for making regular check on the error log inlet flow of the second process.Regularly can set according to actual demand, as checked that every 10 milliseconds one is inferior, certainly regularly can also be set to interval At All Other Times, at this, with this, not illustrate and be limited.The method of making regular check on described the second process output logs stream can be obtained the output journal stream of the second process in real time.
In step S103, when the daily record inlet flow that monitors the second process when monitoring thread has produced new daily record stream, new daily record stream is exported to the process log file of the second process.
In embodiments of the present invention, when the first monitoring thread monitors described general daily record inlet flow, there is new daily record miscarriage raw, the new daily record stream of general daily record inlet flow is outputed to the process log file of the second process.When the second monitoring thread monitors described error log inlet flow, there is new daily record miscarriage raw, the new daily record stream of error log inlet flow is outputed to the process log file of the second process.
In embodiments of the present invention, if do not have new daily record miscarriage raw, monitoring thread is returned to the daily record inlet flow that continues second process of making regular check on.
In embodiments of the present invention, whether monitoring thread is made regular check on process the raw method of new daily record miscarriage, can Real-time Obtaining under the daily record output stream of process, and the use of daily record stream can facilitate and low consumption obtain process output logs.
Embodiment bis-:
Fig. 2 shows the idiographic flow of the method for obtaining process output logs that second embodiment of the invention provides.
In step S201, when creating the second process in the first process, obtain the daily record inlet flow of the second process.
In step S202, by the first process creation monitoring thread, and by the daily record inlet flow that monitoring thread is made regular check on the second process, whether produced new daily record and flowed.
In step S203, when the daily record inlet flow that monitors the second process when monitoring thread has produced new daily record stream, export new daily record stream to buffer memory.
In embodiments of the present invention, when having new daily record miscarriage raw, first new daily record stream is outputed in buffer memory.
In step S204, the daily record stream in buffer memory is outputed to the process log file of the second process.
In embodiments of the present invention, new daily record stream first outputs to buffer memory before outputing to journal file, can accelerate the output speed of daily record, and there will not be the situation of obstruction.
Embodiment tri-:
Fig. 3 shows the structure of the device that obtains process output logs that the embodiment of the present invention provides, and for convenience of explanation, only shows the part relevant to the embodiment of the present invention.This device can be to be built in the unit that software unit, hardware cell or software and hardware in business system combine, or is integrated in the application system of business system or business system as suspension member independently.Wherein:
Inlet flow acquisition module 1, for by creating the second process in the first process, and obtains the daily record inlet flow of described the second process.
In embodiments of the present invention, the second process is the subprocess of the first process creation.The daily record inlet flow of the second process of obtaining comprises general daily record inlet flow and error log inlet flow.
Make regular check on module 2, by the first process creation monitoring thread, and by the daily record inlet flow that monitoring thread is made regular check on the second process, whether produced new daily record and flow.
Cache module 3, outputs to buffer memory for monitoring when monitoring thread when the daily record inlet flow of the second process has produced new daily record stream by new daily record stream, the newer daily record stream in buffer memory is outputed to the process log file of the second process.
New daily record output module 4, while having produced new daily record stream for monitor the daily record inlet flow of the second process when monitoring thread, exports new daily record stream to the process log file of the second process.
In embodiments of the present invention, by start the inlet flow that obtains described the second process after the second process in the first process, and by the method that the monitoring thread of described the first process creation is made regular check on the daily record inlet flow of described the second process, obtain the output journal of described the second process.The method of making regular check on the daily record inlet flow of the second process has guaranteed to obtain in real time log information, and the use of daily record stream can facilitate and low consumption obtain process output logs.After obtaining output journal information, deposited again in buffer memory, make the output of daily record very fast and there will not be the situation of obstruction.
One of ordinary skill in the art will appreciate that, the all or part of step realizing in above-described embodiment method is to come the hardware that instruction is relevant to complete by program, described program can be in being stored in a computer read/write memory medium, described storage medium, as ROM/RAM, disk, CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.

Claims (5)

1. a method of obtaining process output logs, is characterized in that, described method comprises the following steps:
When creating the second process in the first process, obtain the daily record inlet flow of the second process, the daily record inlet flow of described the second process comprises general daily record inlet flow and error log inlet flow;
By the first process creation monitoring thread, and by the daily record inlet flow that monitoring thread is made regular check on the second process, whether produced new daily record and flowed;
When the daily record inlet flow that monitors the second process when monitoring thread has produced new daily record stream, new daily record stream is exported to the process log file of the second process,
The described first process creation monitoring thread of passing through, and be specially by the step whether the daily record inlet flow that monitoring thread is made regular check on the second process has produced new daily record stream:
By the first process creation the first monitoring thread and the second monitoring thread;
Whether by the first monitoring thread monitoring, make regular check on general daily record inlet flow has produced new daily record and has flowed;
Whether by the second monitoring thread monitoring, make regular check on error log inlet flow has produced new daily record and has flowed.
2. the method for claim 1, is characterized in that, when the daily record inlet flow that monitors the second process when monitoring thread has produced new daily record stream, the step that exports new daily record stream the process log file of the second process to is specially:
The daily record inlet flow that monitors the second process when monitoring thread outputs to buffer memory by new daily record stream while having produced new daily record stream;
New daily record stream in buffer memory is outputed to the process log file of the second process.
3. a device that obtains process output logs, is characterized in that, described device comprises:
Inlet flow acquisition module, for by creating the second process in the first process, and obtains the daily record inlet flow of described the second process, and the daily record inlet flow of described the second process comprises general daily record inlet flow and error log inlet flow;
Make regular check on module, by the first process creation monitoring thread, and by the daily record inlet flow that monitoring thread is made regular check on the second process, whether produced new daily record and flow;
New daily record output module, while having produced new daily record stream for monitor the daily record inlet flow of the second process when monitoring thread, exports new daily record stream to the process log file of the second process;
The described first process creation monitoring thread of passing through, and be specially by the step whether the daily record inlet flow that monitoring thread is made regular check on the second process has produced new daily record stream:
By the first process creation the first monitoring thread and the second monitoring thread;
Whether by the first monitoring thread monitoring, make regular check on general daily record inlet flow has produced new daily record and has flowed;
Whether by the second monitoring thread monitoring, make regular check on error log inlet flow has produced new daily record and has flowed.
4. device as claimed in claim 3, is characterized in that, described device also comprises:
Cache module, outputs to buffer memory for monitoring when monitoring thread when the daily record inlet flow of the second process has produced new daily record stream by new daily record stream, the newer daily record stream in buffer memory is outputed to the process log file of the second process.
5. a business system that comprises the device that obtains process output logs described in the arbitrary claim of claim 3 to 4.
CN201010524996.8A 2010-10-29 2010-10-29 Method, device and enterprise system for obtaining process output logs Active CN102455889B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010524996.8A CN102455889B (en) 2010-10-29 2010-10-29 Method, device and enterprise system for obtaining process output logs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010524996.8A CN102455889B (en) 2010-10-29 2010-10-29 Method, device and enterprise system for obtaining process output logs

Publications (2)

Publication Number Publication Date
CN102455889A CN102455889A (en) 2012-05-16
CN102455889B true CN102455889B (en) 2014-03-26

Family

ID=46039110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010524996.8A Active CN102455889B (en) 2010-10-29 2010-10-29 Method, device and enterprise system for obtaining process output logs

Country Status (1)

Country Link
CN (1) CN102455889B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR3025627B1 (en) * 2014-09-10 2018-03-23 Bull Sas HIGH PERFORMANCE MECHANISM FOR GENERATING JOURNALIZATION INFORMATION OF A COMPUTER PROCESS
CN106708578B (en) * 2016-12-23 2021-11-09 北京五八信息技术有限公司 Log output method and device based on double threads
CN106649071B (en) * 2016-12-30 2019-12-20 广州华多网络科技有限公司 Method and device for reporting log in process
CN107330101A (en) * 2017-07-06 2017-11-07 深圳中兴飞贷金融科技有限公司 Big data acquisition method, apparatus and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1477509A (en) * 2002-08-19 2004-02-25 万达信息股份有限公司 Process automatic restoring method
CN1996257A (en) * 2006-12-26 2007-07-11 华为技术有限公司 Method and system for monitoring process
CN101674465A (en) * 2009-10-28 2010-03-17 广东威创视讯科技股份有限公司 Method and system for multi-task monitoring process of videos

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1477509A (en) * 2002-08-19 2004-02-25 万达信息股份有限公司 Process automatic restoring method
CN1996257A (en) * 2006-12-26 2007-07-11 华为技术有限公司 Method and system for monitoring process
CN101674465A (en) * 2009-10-28 2010-03-17 广东威创视讯科技股份有限公司 Method and system for multi-task monitoring process of videos

Also Published As

Publication number Publication date
CN102455889A (en) 2012-05-16

Similar Documents

Publication Publication Date Title
Park et al. Deep learning inference in facebook data centers: Characterization, performance optimizations and hardware implications
CN101719149B (en) Data synchronization method and device
KR101792582B1 (en) Efficient query processing using histograms in a columnar database
US8930736B2 (en) Inferred electrical power consumption of computing devices
CN111209352B (en) Data processing method and device, electronic equipment and storage medium
CN102455889B (en) Method, device and enterprise system for obtaining process output logs
CN103218263B (en) The dynamic defining method of MapReduce parameter and device
US20150213072A1 (en) Parallel load in a column-store database
CN103019855A (en) Method for forecasting executive time of Map Reduce operation
CN103425568A (en) Method and device for processing log information
CN111177237B (en) Data processing system, method and device
Ouyang et al. Active SSD design for energy-efficiency improvement of web-scale data analysis
CN110557291A (en) Network service monitoring system
CN107391230B (en) Implementation method and device for determining load of virtual machine
CN110569230A (en) Method, system and equipment for interconversion between database design model and design document
US10691653B1 (en) Intelligent data backfill and migration operations utilizing event processing architecture
CN110019045B (en) Log floor method and device
US8539492B1 (en) Managing data dependencies among multiple jobs using separate tables that store job results and dependency satisfaction
CN108763043A (en) Acquisition methods, the apparatus and system of pressure testing data in a kind of storage device
Yoshimi et al. An FPGA-based tightly coupled accelerator for data-intensive applications
CN110334011B (en) Method and device for executing test case
CN104461931A (en) Method for output processing of trace logs of multi-kernel storage device and multi-kernel environment
CN107704362A (en) A kind of method and device based on Ambari monitoring big data components
CN117172370A (en) Customer loss prediction method, system, equipment and storage medium
CN111708541A (en) Method and device for compiling mirror image file

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant