作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2012, Vol. 38 ›› Issue (3): 43-45,48. doi: 10.3969/j.issn.1000-3428.2012.03.015

• 软件技术与数据库 • 上一篇    下一篇

基于文本策略和SMCS的海量日志分析方法

张俊峰1,冯巧娟1,张晓丽1,2   

  1. (1. 河南城建学院计算机科学与工程系,河南 平顶山 467036; 2. 南京航空航天大学航空科技智能材料与结构重点实验室,南京 210016)
  • 收稿日期:2011-08-17 出版日期:2012-02-05 发布日期:2012-02-05
  • 作者简介:张俊峰(1967-),男,副教授、硕士,主研方向:网络安全,分布式处理;冯巧娟,讲师、硕士;张晓丽,讲师、博士
  • 基金资助:
    国家自然科学基金资助项目(60907038);河南省科技攻关计划基金资助重点项目(102102210020)

Mass Log Analysis Method Based on File Strategy and SMCS

ZHANG Jun-feng 1, FENG Qiao-juan 1, ZHANG Xiao-li 1,2   

  1. (1. Department of Computer Science and Engineering, Henan University of Urban Construction, Pingdingshan 467036, China; 2. Aeronautical Science Key Laboratory for Smart Material and Structures, Nanjing University of Aeronautics and Astronautics, Nanjing 210016, China)
  • Received:2011-08-17 Online:2012-02-05 Published:2012-02-05

摘要: 现有的海量日志统计分析方法速度慢,且对硬件配置的要求高。为此,提出一种基于文本策略和SMCS的海量日志分析方法。根据文件的软件设计策略,采用日志文件索引方法,将日志文件与日志时间关联,以加快日志提取。SMCS算法采用哈希表、文件归并、堆操作方法对海量日志进行统计分析和内存损耗控制。通过对真实软件进行对比实验,结果表明,该方法的分析速度比传统方法提高4倍。

关键词: Syslog日志, 日志分析, SMCS算法, 海量日志, 文本策略, 控制内存

Abstract: Now the statistical analysis for the massive logs not only is time-consuming, but also requires higher hard configuration. For these questions, a method based on the file software strategy and SMCS algorithm is proposed in this paper. By the software strategy, the log file indexing and the association between the log file and log time are adopted in this method, so as to quicken the log extraction. In order to analyze the massive logs statistically and control the memory loss, hash tables, file merging and heap operation are used in the SMCS algorithm. By experiment of the real software, results indicate that the proposed method is faster than that of traditional statistical analysis by four times.

Key words: Syslog log, log analysis, SMCS algorithm, mass log, file strategy, control memory

中图分类号: