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

计算机工程 ›› 2012, Vol. 38 ›› Issue (18): 255-257. doi: 10.3969/j.issn.1000-3428.2012.18.069

• 开发研究与设计技术 • 上一篇    下一篇

基于Linux内核的智能日志生成系统

刘洪武,梁 亮,杨国为,宋高俊   

  1. (南昌航空大学信息工程学院,南昌 330063)
  • 收稿日期:2011-09-27 修回日期:2012-01-16 出版日期:2012-09-20 发布日期:2012-09-18
  • 作者简介:刘洪武(1975-),男,博士,主研方向:智能信号,信息处理,无线通信技术;梁 亮,硕士;杨国为、宋高俊,博士
  • 基金资助:
    国家自然科学基金资助项目(60973048);航空科学基金资助项目(20102056005);江西省教育厅青年科学基金资助项目(GJJ10194)

Intelligent Log Generation System Based on Linux Kernel

LIU Hong-wu, LIANG Liang, YANG Guo-wei, SONG Gao-jun   

  1. (School of Information Engineering, Nanchang Hangkong University, Nanchang 330063, China)
  • Received:2011-09-27 Revised:2012-01-16 Online:2012-09-20 Published:2012-09-18

摘要: 提出一种日志生成系统,克服传统系统不能在进程中随意更改日志生成的模块与级别。通过修改配置文件和用动态命令2种方式,进行不同模块、不同级别的日志选择性生成。该设计可以用扫描配置文件的方式,根据配置文件中不同模块与级别的标识更新日志生成列表,也可以在进程运行当中,以人机交互的命令通过进程间通信的方法更新日志生成列表,再调用API接口实现按需生成日志。测试结果表明,该设计可以实现按需求输出日志的功能。

关键词: 日志生成系统, 配置文件, 动态命令, Linux内核, 系统调用, API接口, 进程间通信

Abstract: The log generation system in this paper overcomes the traditional log generation system which cannot modify the generation of modules and levels log, the configuration file can be modified and the dynamic command can be used to get selective generation of different modules and levels log in this design. This design uses the scanning of configuration file, according to the identification of different modules and levels in configuration file to update the list of log generation, the dynamic command inputs with the Inter-process Communication(IPC) in process to update the list of log generation, then uses the API interface to generate the log according to the demand.

Key words: log generation system, configuration file, dynamic command, Linux kernel, system call, API-interface, Inter-process Communication(IPC)

中图分类号: