CN102594581A - Method for recording log data - Google Patents

Method for recording log data Download PDF

Info

Publication number
CN102594581A
CN102594581A CN2011100052553A CN201110005255A CN102594581A CN 102594581 A CN102594581 A CN 102594581A CN 2011100052553 A CN2011100052553 A CN 2011100052553A CN 201110005255 A CN201110005255 A CN 201110005255A CN 102594581 A CN102594581 A CN 102594581A
Authority
CN
China
Prior art keywords
daily record
record data
measuring period
flow
current measuring
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.)
Granted
Application number
CN2011100052553A
Other languages
Chinese (zh)
Other versions
CN102594581B (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.)
TD Tech Ltd
Original Assignee
TD Tech 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 TD Tech Ltd filed Critical TD Tech Ltd
Priority to CN201110005255.3A priority Critical patent/CN102594581B/en
Publication of CN102594581A publication Critical patent/CN102594581A/en
Application granted granted Critical
Publication of CN102594581B publication Critical patent/CN102594581B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Recording Measured Values (AREA)

Abstract

The invention discloses a method for recording log data, which comprises the following steps: A, predetermining the lengths of measurement periods and starting one measurement period; B, monitoring accumulated flow of the log data in real time in the current measurement period; C, judging whether the accumulated flow of the log data in the current measurement period is greater than a predetermined throttle flow threshold, if so, stopping recording the log data which are recorded currently and are of the lowest level according to predetermined levels of the log data, starting a new measurement period and returning to execute the step B, if not, executing a step D; and D, judging whether a predetermined restoration condition is satisfied, if so, restoring to record log data of all levels, if not, returning to execute the step B. By using the method provided by the invention, when a communication device is in abnormal condition, the retention time of the log data is prolonged effectively, thereby facilitating fault location of the communication device.

Description

A kind of recording method of daily record data
Technical field
The present invention relates to communication technical field, particularly a kind of recording method of daily record data.
Background technology
In the existing communication technology, various communication equipments (for example, the base station) need write down a large amount of daily record datas as a kind of technical equipment of long-time running at its run duration, thereby can when this communication equipment breaks down, be used for fault location.Along with the continuity of time, the quantity of the daily record data that communication equipment produced will get more and more, if all daily record datas that communication equipment is produced all are stored in the journal file, and need very large memory space.Because the physics limited size of memory; Therefore can not in journal file, store the daily record data of all time periods; And can only store the interior daily record data of section sometime; When the size of daily record file reached the maximum of its setting, daily record data the earliest will progressively be covered by up-to-date daily record data.Therefore, the remaining time of daily record data in journal file is limited.
For the fault location of communication equipment, the length of the remaining time of daily record data in journal file is very important.The remaining time of daily record data is long more, with the fault location that helps the later stage more.If the remaining time of institute's stored log data is shorter; And after fault occurs, fail to obtain this journal file within the remaining time at daily record data in time; The daily record data of running orbit will be covered by daily record data afterwards before and after then record trouble took place; And only remaining fault " residual " information after taking place, thereby make the work of fault location of the communication equipment comparison difficulty that becomes.
In the prior art, all be the remaining time that prolongs daily record data through daily record data being simplified, optimizing generally.This method belongs to a kind of passive measure, when communication device works just often, the record of daily record data is general relatively steadily, therefore can pre-estimate the remaining time of daily record data; Yet; When the operating state of communication equipment occur unusual (for example; Break down) time; Will produce a large amount of daily record datas in the short period of time, these a large amount of daily record datas that produce will take a large amount of memory spaces in the journal file, therefore will make the remaining time of the daily record data in the journal file seriously shorten; Daily record data (being referred to as " gold locating information ") before and after unusual condition takes place will be covered by newly-increased daily record data at short notice, thereby will the work of the fault location of this communication equipment be produced serious influence.
Summary of the invention
In view of this, the present invention provides a kind of recording method of daily record data, and this method can effectively prolong the remaining time of daily record data, thereby help communication equipment is carried out fault location when communication equipment generation unusual condition.
According to above-mentioned purpose, technical scheme of the present invention is achieved in that
A kind of recording method of daily record data, this method comprises:
A, in advance the length of measuring period is set, and starts a measuring period;
B, in current measuring period, the real-time integrated flow of monitoring journal data;
C, judge the daily record data in current measuring period integrated flow whether greater than preset throttling flow fault value; If, then according to the grade of the daily record data that is provided with in advance, stop to write down by daily record data that write down and elementary, and start new measuring period, return execution in step B; Otherwise, execution in step D;
D, judge whether the recovery condition that is provided with is in advance set up, if, the daily record data of all grades of recovery record then; Otherwise, return execution in step B.
The integrated flow of said real-time monitoring journal data comprises:
A counter is set in advance, is used for the flow of the daily record data in real-time accumulated current measuring period; Wherein, said timer will be in the initial moment zero clearing of each measuring period.
Whether the said integrated flow of judging the daily record data in current measuring period greater than preset throttling flow fault value is:
Whether the integrated flow of the daily record data of real-time judge in current measuring period is greater than preset throttling flow fault value.
Whether the said integrated flow of judging the daily record data in current measuring period greater than preset throttling flow fault value is:
When finished each measuring period, whether the integrated flow of judging the daily record data in current measuring period was greater than preset throttling flow fault value.
Whether the said integrated flow of judging the daily record data in current measuring period greater than preset throttling flow fault value is:
In the predefined moment, whether the integrated flow of judging the daily record data in current measuring period is greater than preset throttling flow fault value.
This method also further comprises:
According to the content of daily record data daily record data is divided into 4 kinds of grades that are described below according to from low to high order: information level, alarm level, fault levels and fatal error level.
Said recovery condition is one of condition that is described below, or the combination in any between any a plurality of conditions that are described below:
1) accomplished uploading of journal file;
2) communication equipment has been accomplished reset operation;
3) integrated flow of the daily record data in continuous L measuring period is less than opening stream flow fault value N; Wherein, 0≤N<M;
4) duration that stops log data step by step is greater than preset time threshold.
By on can know, the invention provides a kind of recording method of daily record data because in the method,, and start a measuring period with the length that be set measuring period in advance; In current measuring period, the integrated flow of real-time monitoring journal data; Whether the integrated flow of judging the daily record data in current measuring period is greater than preset throttling flow fault value; If, then according to the grade of the daily record data that is provided with in advance, stop to write down by daily record data that write down and elementary, and start new measuring period, continue the integrated flow of real-time monitoring journal data; Otherwise, with judging whether the recovery condition that is provided with is in advance set up, if, the daily record data of all grades of recovery record then; Otherwise, continue the integrated flow of real-time monitoring journal data, thereby can when communication equipment generation unusual condition, effectively prolong the remaining time of daily record data, thereby help communication equipment is carried out fault location.
Description of drawings
Fig. 1 is the recording method flow chart of daily record data of the present invention.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer, below lift specific embodiment and, the present invention is carried out further detailed explanation with reference to accompanying drawing.
The invention provides a kind of recording method of daily record data, in the method,, and start a measuring period the length that be set measuring period in advance; In current measuring period, the integrated flow of real-time monitoring journal data; Whether the integrated flow of judging the daily record data in current measuring period is greater than preset throttling flow fault value; If, then according to the grade of the daily record data that is provided with in advance, stop to write down by daily record data that write down and elementary, and start new measuring period, continue the integrated flow of real-time monitoring journal data; Otherwise, with judging whether the recovery condition that is provided with is in advance set up, if, the daily record data of all grades of recovery record then; Otherwise, continue the integrated flow of real-time monitoring journal data.Through using the recording method of above-mentioned daily record data; Can be when communication equipment generation unusual condition; Prevent that the daily record data before and after the unusual condition generation from being covered by the daily record data of follow-up new generation in a large number; Prolonged the remaining time of daily record data effectively, so that the fault of communication equipment is carried out accurate in locating.
Fig. 1 is the recording method flow chart of daily record data of the present invention.As shown in Figure 1, the recording method of said daily record data comprises the step that is described below:
Step 101 is provided with the length of measuring period in advance, and starts a measuring period.
In this step, can be according to the needs of practical application, be provided with in advance and start a measuring period, and the length T of this measuring period is set.
Step 102, in current measuring period, the integrated flow of real-time monitoring journal data.
In this step, will be in each measuring period the integrated flow of monitoring journal data in real time.The integrated flow of wherein said daily record data can be that the accumulative total in measuring period is got quantity ready.For instance, in specific embodiment of the present invention, a counter can be set in advance, be used for the flow (be in real-time accumulated measuring period accumulative total get quantity ready) of the daily record data in real-time accumulated current measuring period.Therefore this timer will, can obtain the current integrated flow of the daily record data in current measuring period in the initial moment zero clearing of each measuring period through the value that reads this timer.
Step 103, whether the integrated flow of judging the daily record data in current measuring period is greater than preset throttling flow fault value, if then execution in step 104; Otherwise, execution in step 105.
In this step; Can a throttling flow fault value M be set in advance according to practical situations; The integrated flow of the daily record data in more current then measuring period and the size of throttling flow fault value M, whether the integrated flow of promptly judging the daily record data in current measuring period is greater than preset throttling flow fault value M.When the integrated flow of the daily record data in current measuring period during, then will start flow control mechanism, promptly follow-up step 104 step by step greater than preset throttling flow fault value M; And when the integrated flow of the daily record data in current measuring period is less than or equal to preset throttling flow fault value M, then with execution in step 105.
In addition, in this step, above-mentioned decision operation can be a real-time judge, also can be when finish each measuring period, to judge, can also be to judge in the predefined moment.Wherein, when carrying out real-time judge, the judgement number of times in measuring period is more, and operand is bigger, but fast to regulating the speed of the flow of daily record data; And if when finish each measuring period, judge, the number of times of then judging is few, and operand is less, but slower to regulating the speed of the flow of daily record data; In addition, if judge in the predefined moment, then can be through to judging that setting constantly adjusts the number of times of judgement, thus control regulating the speed to the flow of daily record data.Therefore, in specific embodiment of the present invention, can select different judgment modes according to practical situations.
Step 104 according to the grade of the daily record data that is provided with in advance, stops to write down by daily record data that write down and elementary, and starts next measuring period; Return execution in step 102.
In specific embodiment of the present invention; The grade of various daily record datas can be set according to the content of daily record data in advance; Then according to the grade of the daily record data that is provided with in advance; Stop to write down the daily record data of each grade step by step according to hierarchal order from low to high, thereby prevent that the daily record data (i.e. " gold locating information ") before and after the unusual condition generation from being covered by the daily record data of follow-up new generation in a large number.
For example; In specific embodiment of the present invention, can daily record data be divided into 4 kinds of grades that are described below according to from low to high order: information (Info) level, warning (Warning) level, mistake (Error) level and fatal error (Fatal) grade according to the content of daily record data.Wherein, the grade of Info level is minimum, and the grade of Fatal level is the highest.Then, can be according to the grade of above-mentioned daily record data height, stop to write down the daily record data of each grade step by step according to hierarchal order from low to high, promptly, stop to write down by daily record data that write down and elementary according to the grade height of above-mentioned daily record data.
For example; If the integrated flow of the daily record data in current measuring period is greater than before the preset throttling flow fault value; Communication equipment is also at all daily record datas of record; Then, can stop to write down the daily record data of elementary information level when the integrated flow of the daily record data in current measuring period during greater than preset throttling flow fault value; If the integrated flow of the daily record data in current measuring period is greater than before the preset throttling flow fault value; Stopped the daily record data of recorded information level; Only write down the daily record data of alarm level, fault levels and fatal error level; The integrated flow of the daily record data in then current measuring period will stop to write down the daily record data of alarm level during greater than preset throttling flow fault value; ..., the rest may be inferred; If the integrated flow of the daily record data in current measuring period is greater than before the preset throttling flow fault value; Only write down the daily record data of fatal error level; The integrated flow of the daily record data in then current measuring period can stop to write down the daily record data of fatal error level during greater than preset throttling flow fault value; At this moment, with the daily record data that no longer in journal file, continues all grades of record.
Step 105 judges whether the recovery condition that is provided with is in advance set up, if then execution in step 106; Otherwise, return and continue execution in step 102.
In this step, can determine whether stopping to carry out above-mentioned flow control mechanism according to the recovery condition that is provided with in advance.If the recovery condition is set up, but execution in step 106 then stops above-mentioned flow control mechanism, recovers normal logdata record; If the recovery condition is not set up yet, then will return execution in step 102.
In specific embodiment of the present invention, described recovery condition can preestablish according to practical situations.For example, said recovery condition can be one of condition that is described below, or the combination in any between any a plurality of conditions that are described below:
1) accomplished uploading of journal file.
2) communication equipment has been accomplished reset operation.
3) integrated flow of the daily record data in continuous L measuring period is less than opening stream flow fault value N.
Wherein, the value of above-mentioned L and the value of opening stream flow fault value N all can be provided with according to practical situations in advance, and 0≤N<M.
4) duration of daily record data that stops to write down arbitrary grade is greater than preset time threshold.
Wherein, above-mentioned time threshold can be provided with according to practical situations in advance.
Step 106, the daily record data of all grades of recovery record.
In this step, will stop above-mentioned flow control mechanism, recover the record of normal daily record data, i.e. the operation of the daily record data of all grades of recovery record.
Through using the recording method of above-mentioned daily record data; Can be when communication equipment generation unusual condition; Stop recording section or whole daily record data; Prevent that the daily record data (i.e. " gold locating information ") before and after the unusual condition generation from being covered by the daily record data of follow-up new generation in a large number, thereby can prolong the remaining time of the daily record data in the journal file effectively, so that the fault of communication equipment is carried out accurate in locating.
Can know through above-mentioned introduction; In the recording method of above-mentioned daily record data provided by the present invention, because the integrated flow of monitoring journal data in real time, and when the integrated flow of the daily record data in current measuring period during greater than the throttling flow fault value preset; Grade according to the daily record data that is provided with in advance; Stop to write down the daily record data of each grade step by step, thereby can when communication equipment generation unusual condition, prevent that the daily record data before and after the unusual condition generation from being covered by the daily record data of follow-up new generation in a large number; Prolonged the remaining time of daily record data effectively, so that the fault of communication equipment is carried out accurate in locating.
The above is merely preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being made, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (7)

1. the recording method of a daily record data is characterized in that, this method comprises:
A, in advance the length of measuring period is set, and starts a measuring period;
B, in current measuring period, the real-time integrated flow of monitoring journal data;
C, judge the daily record data in current measuring period integrated flow whether greater than preset throttling flow fault value; If, then according to the grade of the daily record data that is provided with in advance, stop to write down by daily record data that write down and elementary, and start new measuring period, return execution in step B; Otherwise, execution in step D;
D, judge whether the recovery condition that is provided with is in advance set up, if, the daily record data of all grades of recovery record then; Otherwise, return execution in step B.
2. the method for claim 1 is characterized in that, the integrated flow of said real-time monitoring journal data comprises:
A counter is set in advance, is used for the flow of the daily record data in real-time accumulated current measuring period; Wherein, said timer will be in the initial moment zero clearing of each measuring period.
3. the method for claim 1 is characterized in that, whether the said integrated flow of judging the daily record data in current measuring period greater than preset throttling flow fault value is:
Whether the integrated flow of the daily record data of real-time judge in current measuring period is greater than preset throttling flow fault value.
4. the method for claim 1 is characterized in that, whether the said integrated flow of judging the daily record data in current measuring period greater than preset throttling flow fault value is:
When finished each measuring period, whether the integrated flow of judging the daily record data in current measuring period was greater than preset throttling flow fault value.
5. the method for claim 1 is characterized in that, whether the said integrated flow of judging the daily record data in current measuring period greater than preset throttling flow fault value is:
In the predefined moment, whether the integrated flow of judging the daily record data in current measuring period is greater than preset throttling flow fault value.
6. the method for claim 1 is characterized in that, this method also further comprises:
According to the content of daily record data daily record data is divided into 4 kinds of grades that are described below according to from low to high order: information level, alarm level, fault levels and fatal error level.
7. the method for claim 1 is characterized in that, said recovery condition is one of condition that is described below, or the combination in any between any a plurality of conditions that are described below:
1) accomplished uploading of journal file;
2) communication equipment has been accomplished reset operation;
3) integrated flow of the daily record data in continuous L measuring period is less than opening stream flow fault value N; Wherein, 0≤N<M;
4) duration that stops log data step by step is greater than preset time threshold.
CN201110005255.3A 2011-01-12 2011-01-12 A kind of recording method of daily record data Active CN102594581B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110005255.3A CN102594581B (en) 2011-01-12 2011-01-12 A kind of recording method of daily record data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110005255.3A CN102594581B (en) 2011-01-12 2011-01-12 A kind of recording method of daily record data

Publications (2)

Publication Number Publication Date
CN102594581A true CN102594581A (en) 2012-07-18
CN102594581B CN102594581B (en) 2016-03-16

Family

ID=46482804

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110005255.3A Active CN102594581B (en) 2011-01-12 2011-01-12 A kind of recording method of daily record data

Country Status (1)

Country Link
CN (1) CN102594581B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105700996A (en) * 2014-11-27 2016-06-22 迈普通信技术股份有限公司 Log output method and apparatus
CN106293541A (en) * 2016-08-19 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of blog management method storing system and system
CN106528344A (en) * 2016-11-11 2017-03-22 郑州云海信息技术有限公司 Log management method for storage system
CN108121303A (en) * 2016-11-30 2018-06-05 沈阳中科博微科技股份有限公司 A kind of log recording method applied to manufacturing equipment statistical analysis process
CN109933462A (en) * 2019-02-25 2019-06-25 深圳小云字符信息科技有限公司 Log information processing method
CN110290546A (en) * 2019-06-21 2019-09-27 京信通信系统(中国)有限公司 Restart localization method, device, base station equipment and storage medium in base station
CN110324211A (en) * 2019-08-08 2019-10-11 宜人恒业科技发展(北京)有限公司 A kind of data capture method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002318736A (en) * 2001-04-23 2002-10-31 Nec Corp System, method and program for saving log data
CN101505245A (en) * 2009-03-06 2009-08-12 成都市华为赛门铁克科技有限公司 Method and apparatus for sending log information
CN101610172A (en) * 2009-07-29 2009-12-23 杭州华三通信技术有限公司 A kind of mthods, systems and devices of reporting attack logs
CN101753971A (en) * 2008-12-22 2010-06-23 中兴通讯股份有限公司 Journal system and journal recording method in content management system in uniform video management platform

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002318736A (en) * 2001-04-23 2002-10-31 Nec Corp System, method and program for saving log data
CN101753971A (en) * 2008-12-22 2010-06-23 中兴通讯股份有限公司 Journal system and journal recording method in content management system in uniform video management platform
CN101505245A (en) * 2009-03-06 2009-08-12 成都市华为赛门铁克科技有限公司 Method and apparatus for sending log information
CN101610172A (en) * 2009-07-29 2009-12-23 杭州华三通信技术有限公司 A kind of mthods, systems and devices of reporting attack logs

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105700996A (en) * 2014-11-27 2016-06-22 迈普通信技术股份有限公司 Log output method and apparatus
CN106293541A (en) * 2016-08-19 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of blog management method storing system and system
CN106528344A (en) * 2016-11-11 2017-03-22 郑州云海信息技术有限公司 Log management method for storage system
CN108121303A (en) * 2016-11-30 2018-06-05 沈阳中科博微科技股份有限公司 A kind of log recording method applied to manufacturing equipment statistical analysis process
CN109933462A (en) * 2019-02-25 2019-06-25 深圳小云字符信息科技有限公司 Log information processing method
CN110290546A (en) * 2019-06-21 2019-09-27 京信通信系统(中国)有限公司 Restart localization method, device, base station equipment and storage medium in base station
CN110324211A (en) * 2019-08-08 2019-10-11 宜人恒业科技发展(北京)有限公司 A kind of data capture method and device

Also Published As

Publication number Publication date
CN102594581B (en) 2016-03-16

Similar Documents

Publication Publication Date Title
CN102594581A (en) Method for recording log data
CN102323505B (en) Device and method for supporting life prediction and failure cause analysis of optical device
CN105468917B (en) A kind of pipeline failure prediction technique and device
CN102591591B (en) Disk detection system, disk detection method and network store system
CN100517249C (en) Method for capturing function for resulting in memory rewriting by wild pointer
US9239988B2 (en) Network event management
CN105589795A (en) Disk failure prediction method and device based on prediction model
US20160209838A1 (en) Abnormality Diagnosis Method and Device Therefor
CN105629862B (en) Real-time log recording method of control equipment based on PLC
CN109539473A (en) The fault type of air-conditioning system determines method, electronic equipment
CN107809349B (en) Device and method for monitoring server signal waveform
CN105137227A (en) Testing device and method for power-down protection of intelligent card
CN103306893A (en) Failure early warning and alarming method for wind-driven generator
CN103207825A (en) Method and device for managing faults of entire equipment cabinet
JP6205945B2 (en) Transmission apparatus, transmission apparatus control method, and transmission apparatus control program
CN105183627A (en) Server performance prediction method and system
CN103188103A (en) Self-monitoring method of network management system
CN106899436A (en) A kind of cloud platform failure predication diagnostic system
CN103675357A (en) Anemometer fault warning method and system
CN104251913B (en) Rotating machinery monitors system start and stop intelligent determination method
CN105159817A (en) Log file processing system and method
CN105425739A (en) System for predicting abnormality occurrence using PLC log data
CN104765648A (en) Problem node detection method and device based on real-time computing system
CN103064776A (en) Performance monitoring method and performance monitoring device
CN101957867B (en) Data caching method in disconnection state of distributed application of power dispatching automation system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant