CN1874253A - Method for managing system log - Google Patents
Method for managing system log Download PDFInfo
- Publication number
- CN1874253A CN1874253A CN 200510073574 CN200510073574A CN1874253A CN 1874253 A CN1874253 A CN 1874253A CN 200510073574 CN200510073574 CN 200510073574 CN 200510073574 A CN200510073574 A CN 200510073574A CN 1874253 A CN1874253 A CN 1874253A
- Authority
- CN
- China
- Prior art keywords
- log
- journal
- record
- file
- backup
- 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
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The method includes steps: (1) determining whether there is journal log in backup file of system journal; if yes, reading and processing journal log in backup file of system journal, and storing processed journal data to journal database; then, executing step (2); otherwise executing step (2) directly; (2) reading journal log in file of system journal, and storing read journal log to backup file of system journal, then cleaning up journal log in file of system journal; (3) reading and processing journal log in backup file of system journal, and storing processed journal data to journal database; then cleaning up journal log in backup file of system journal. Processing and storing journal log in backup file of system journal in advance, the invention prevents journal log in backup file of system journal from missing when restarting system after fault so as to reduce loss.
Description
Technical field
(Network Management System, NMS) technical field are meant a kind of system log management method especially to the present invention relates to network management system.
Background technology
The log record of system provides the detailed audit to system activity, and these daily records are used to assess, the running environment and the various operation of auditing system.For ordinary circumstance, log record comprises recording user login time, login place, carries out content such as what operation, if use properly, log record can provide about the infringement that endangers safety or invasion to the system manager very Useful Information such as attempts.
For huger network management system,, need special Log Administration System (Log Management System) that the log record that whole system produces is handled usually because the daily record quantity that whole system produces is very huge.The log record that each equipment in the network management system sends can send on the equipment that is used for the gathering system daily record specially usually; general this equipment of title is syslog server (Syslog Server); syslog server stores log record in the syslog file (Syslog File) into behind the log record that receives other equipment transmissions.After this, daily record data after Log Administration System in the network management system just can be handled and will handle the log record in the syslog file stores in the log database (Log DB), by the daily record data in the log database, just can provide the daily record of handling related data to the network manager.
Because the log record enormous amount that network management system produced, if all log records that will produce all are stored in the syslog file, the memory space that waste is huge, and, be difficult to directly syslog file be upgraded and handle because the variation of syslog file is very fast.Therefore in the prior art, Log Administration System is that syslog file is set up the system journal backup file, by the mode that regularly triggers the log record in the syslog file is transferred in the system journal backup file, again the log record in the system journal backup file is handled, and the daily record data that will obtain after will handling stores in the log database, then the log record in the scavenge system backup log.By such cyclical process, need be that syslog file and system journal backup file distribute suitable memory space only according to system situation and the time length that regularly triggers, just can realize processing to a large amount of log records of quick generation, and the storage of the daily record data after handling.
But, if in the process that the log record in the system journal backup file is handled, owing to system breaks down or other crash as reasons such as power down or shutdown suddenly, perhaps because database breaks down storage after will not handling in log database, so after restarting systems, system at first transfers to the log record in the syslog file in the system journal backup file, these log records have covered the log record in the preceding system journal backup file of system restart, and the log record in the system journal backup file is not processed into daily record data and stores in the log database before the system restart, thereby has caused before the system restart losing of log record in the system journal backup file.Because log record is extremely important for network management system, and the log record of system before breaking down is more even more important because of the related causes that can the system of inquiring breaks down by these log records, so losing of these log records, the loss that causes is very huge.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of system log management method, this method can prevent losing of log record.
In order to achieve the above object, the invention provides a kind of system log management method, this method comprises:
A, judge whether log record is arranged in the system journal backup file, if then the log record in the reading system backup log is handled, and the daily record data that will obtain after will handling stores in the log database, then execution in step B; Otherwise direct execution in step B;
Log record in B, the reading system journal file, and the log record that reads stored in the system journal backup file, the log record in the scavenge system journal file then;
Log record in C, the reading system backup log is handled, and the daily record data that will obtain after will handling stores in the log database, then the log record in the scavenge system backup log.
Preferably, after the daily record data that will obtain after will handling described in the steps A stores in the log database, further comprise: the log record in the scavenge system backup log.
Preferably, described steps A is regularly to trigger.
As can be seen from the above technical solutions, among the present invention, by in management process to system journal, at first judge whether log record is arranged in the system journal backup file, if have, after then the daily record data that obtains after the log record in the system journal backup file is handled and will be handled stores in the log database, just the log record in the syslog file is transferred in the system journal backup file, and then the log record in the treatment system backup log, the daily record data that obtains is stored in the log database; Thereby after transferring to the log record in the syslog file in the system journal backup file, even system breaks down, the log record in the system journal backup file is not handled, or the daily record data after will not handling stores in the log database, after system restart, also direct original log record in the covering system backup log has not been avoided losing of log record, has reduced loss;
In addition, after storing in the log database by the daily record data that after will handling, obtains among the present invention, log record in the system journal backup file is removed, prevented reprocessing, alleviated the burden of system log record in the system journal backup file.
Description of drawings
Fig. 1 is the overview flow chart of system log management method of the present invention;
Fig. 2 is the flow chart of system log management method specific embodiment of the present invention.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with accompanying drawing.
Main thought of the present invention is, Log Administration System is in the management process to system journal, at first the log record in the system journal backup file is handled, and after the daily record data that will obtain after will handling stores in the log database, just the log record in the reading system journal file stores in the backup log, restarts losing of log record in the backup file of back thereby avoid breaking down in system.
The overall procedure of system log management method of the present invention as shown in Figure 1, step is as follows:
Same as the prior art, system triggers and carries out this step by mode regularly;
Log record in step 103, the reading system journal file, and the log record that reads stored in the system journal backup file, the log record in the scavenge system journal file then;
In this step, when storing into the log record that reads in the system journal backup file, though covered the log record in the original system backup log, but because these log records are processed, and the daily record data after will handling has been saved in the log database, just guaranteed that log record can not lose;
Log record in step 104, the reading system backup log is handled, and the daily record data that will obtain after will handling stores in the log database, then the log record in the scavenge system backup log.
The present invention is described in detail by specific embodiment more below.
The flow process of the specific embodiment of system log management method of the present invention as shown in Figure 2, flow process among Fig. 2 is also regularly triggered by system, step wherein is most of identical with Fig. 1, difference only is, after the daily record data that will obtain after will handling in step 102 stores in the log database, before the execution in step 103, first execution in step 1021: the log record in the scavenge system backup log.
Because when execution in step 103, system may break down before with the log record in the log record covering system backup log in the syslog file, and break down constantly and restart in the execution graph 1 of back during flow process at this, system can be once more handles log record treated in the system journal backup file and that stored result.So increased step 1021 in the present embodiment, by the log record in the scavenge system backup log in step 1021, even fault has appearred in system before with the log record in the log record covering system backup log in the syslog file, can be after judging the system journal backup file and being sky after restarting, direct execution in step 103, prevented reprocessing, alleviated the burden of system log record in the system journal backup file.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being made, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (3)
1, a kind of system log management method is characterized in that, this method comprises:
A, judge whether log record is arranged in the system journal backup file, if then the log record in the reading system backup log is handled, and the daily record data that will obtain after will handling stores in the log database, then execution in step B; Otherwise direct execution in step B;
Log record in B, the reading system journal file, and the log record that reads stored in the system journal backup file, the log record in the scavenge system journal file then;
Log record in C, the reading system backup log is handled, and the daily record data that will obtain after will handling stores in the log database, then the log record in the scavenge system backup log.
2, method according to claim 1 is characterized in that, after the daily record data that will obtain after will handling described in the steps A stores in the log database, further comprises: the log record in the scavenge system backup log.
3, method according to claim 1 and 2 is characterized in that, described steps A is regularly to trigger.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005100735742A CN100372307C (en) | 2005-06-02 | 2005-06-02 | Method for managing system log |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005100735742A CN100372307C (en) | 2005-06-02 | 2005-06-02 | Method for managing system log |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1874253A true CN1874253A (en) | 2006-12-06 |
CN100372307C CN100372307C (en) | 2008-02-27 |
Family
ID=37484534
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2005100735742A Expired - Fee Related CN100372307C (en) | 2005-06-02 | 2005-06-02 | Method for managing system log |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100372307C (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2010031302A1 (en) * | 2008-09-16 | 2010-03-25 | 中兴通讯股份有限公司 | Method and system for clearing log files of service system |
CN1976499B (en) * | 2006-12-18 | 2010-05-19 | 中兴通讯股份有限公司 | System for realizing historical short message repeating and method thereof |
CN102521070A (en) * | 2011-11-18 | 2012-06-27 | 深圳中兴网信科技有限公司 | Mirror image recovering method of journal information based on internal memory |
WO2015196694A1 (en) * | 2014-06-27 | 2015-12-30 | 中兴通讯股份有限公司 | Single-board log information storage method and system |
CN107357686A (en) * | 2017-07-20 | 2017-11-17 | 郑州云海信息技术有限公司 | A kind of daily record delet method and device |
CN109104314A (en) * | 2018-08-20 | 2018-12-28 | 郑州云海信息技术有限公司 | A kind of method and device for modifying log configuration file |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1011330A (en) * | 1996-06-26 | 1998-01-16 | Ricoh Co Ltd | Log recording method and device therefor |
JPH11312101A (en) * | 1998-04-28 | 1999-11-09 | Oki Electric Ind Co Ltd | Method and device for managing operation information |
CN1159649C (en) * | 2000-12-28 | 2004-07-28 | 中兴通讯股份有限公司 | Automatic circular daily record information storing method and system |
JP2004185460A (en) * | 2002-12-05 | 2004-07-02 | Mitsubishi Electric Corp | Operation history data management system |
CN1265284C (en) * | 2002-12-13 | 2006-07-19 | 英业达股份有限公司 | Dynamic journal recording method |
-
2005
- 2005-06-02 CN CNB2005100735742A patent/CN100372307C/en not_active Expired - Fee Related
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1976499B (en) * | 2006-12-18 | 2010-05-19 | 中兴通讯股份有限公司 | System for realizing historical short message repeating and method thereof |
WO2010031302A1 (en) * | 2008-09-16 | 2010-03-25 | 中兴通讯股份有限公司 | Method and system for clearing log files of service system |
CN102521070A (en) * | 2011-11-18 | 2012-06-27 | 深圳中兴网信科技有限公司 | Mirror image recovering method of journal information based on internal memory |
WO2015196694A1 (en) * | 2014-06-27 | 2015-12-30 | 中兴通讯股份有限公司 | Single-board log information storage method and system |
CN105281934A (en) * | 2014-06-27 | 2016-01-27 | 中兴通讯股份有限公司 | Storage method and system for single board log information |
CN105281934B (en) * | 2014-06-27 | 2020-02-14 | 中兴通讯股份有限公司 | Method and system for storing single board log information |
CN107357686A (en) * | 2017-07-20 | 2017-11-17 | 郑州云海信息技术有限公司 | A kind of daily record delet method and device |
CN109104314A (en) * | 2018-08-20 | 2018-12-28 | 郑州云海信息技术有限公司 | A kind of method and device for modifying log configuration file |
CN109104314B (en) * | 2018-08-20 | 2022-02-25 | 郑州云海信息技术有限公司 | Method and device for modifying log configuration file |
Also Published As
Publication number | Publication date |
---|---|
CN100372307C (en) | 2008-02-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102160048B (en) | Collecting and analyzing malware data | |
CN1874253A (en) | Method for managing system log | |
CN103761165B (en) | Log backup method and device | |
EP1096382A2 (en) | Monitoring of computer usage | |
CN1408083A (en) | Scalable storage architecture | |
CN102693388B (en) | Data safety protection processing system, method and storage medium | |
CN1480850A (en) | Method for dynamic transferring data and its storing system | |
US11714740B2 (en) | Storage-based log file management | |
CN111930706B (en) | Remote call-based distributed network file storage system and method | |
CN111581021B (en) | Application program starting abnormality repairing method, device, equipment and storage medium | |
CN114610567A (en) | Container monitoring method, network device and storage medium | |
CN1489049A (en) | Method for monitoring background programme | |
JP4256107B2 (en) | Method and program for dealing with unauthorized intrusion to data server | |
CN110716903A (en) | Log file cleaning method and device | |
CN111818097A (en) | Traffic monitoring method and device based on behaviors | |
WO2009053356A1 (en) | Method of managing operations for administration, maintenance and operational upkeep, management entity, and corresponding computer program product | |
CN1262926C (en) | Watchdog implementing method based on sharing memory | |
Cisco | Maintaining the TrafficDirector Environment | |
CN1506829A (en) | Method of preventing software error caused by long time running | |
CN108197148A (en) | A kind of file clean-up method, equipment and computer readable storage medium | |
CN113407415A (en) | Log management method and device of intelligent terminal | |
CN1735029A (en) | Registration form protection System and method | |
CN118012673B (en) | Database data asset protection method, device, computer equipment and storage medium | |
US8190579B2 (en) | IMS change mapper | |
CN111124428A (en) | Application automatic publishing method based on middleware creating and related device |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20080227 Termination date: 20160602 |