:
CollectionLauchor
:
CollectionThread
:
DataCollector
: LogDealer : LogRecord :
MatchedRecord
1: start( )
2: collect( )
16: deal(Vector)
6: new
11: new
3: getNativeIP( )
4: initlog( )
5: mappingLogBuffer(String)
8: parseLogBuffer(MappedByteBuffer, Vector, Vector)
7: activate(String)
10: passivate(Vector, String)
9: match(Vector, Vector)
12: new
13: init( )
15:
14: initSocket( )
17: send( )
3) 配置文件说明:
为了保证系统得灵活性,在该系统中把服务器和本机有关的参数都通过属性文件配置,
由程序动态读取。文件名确定为 unix_server.properties
属性 key 属性 value 例子 备注说明
interval interval = 60
采集的间隔时间 ,以分钟为单位
ip
ip = 192.168.0.20 采集点的 IP 地址。
sourcefile sourcefile= f:\\usr\\adm\\wtmpx 采集的源的文件名,包含目录
destinationpath destinationpath= f:\\usr\\history\\
采集源的备份目录,目录后面必须加
目录分隔符号。
command command=cmd /C move 数据源被采集的时候,先移动到备份
目录,这个属性设置数据源文件移动
的 shell 指令或 dos 指令。
historyfile historyfile = history.dat 由于在采集的时候有的用户正在登
录中,还没有登出,所以无法处理这
种数据,这就是不能匹配成对的数