• rsyslog 读取单个文件测试


    rsyslog 测试(rsyslog 必须yum 安装uat-web02:/root# rpm -qa | grep rsyslog
    rsyslog-8.21.0-1.el6.x86_64)
    
    
    
    
    //读取单个文件测试:
    
    客户端发送:
    uat-web02:/var/log/nginx# echo "zjzc-111222333444qwe" >>scan.log 
    uat-web02:/var/log/nginx# 
    
    
    服务端接收:
    zjtest7-frontend:/data/scan# tail -f scan.2016-09-26 
     scan-aaaaaaaaaaaaa
     bbbbb21231
     scan-bbbbb21231
     scan-cccc21231
     scan-dddd9999
     eeeeeeeeee3131
     eeeeeeeeee3131
     eeeeeeeeee3131
     321dadada--scan
     test scan9999
    
    
     zjzc-111222333444qwe
    
     
     客户端重启rsyslog:
     
     uat-web02:/root# service rsyslog stop
    Shutting down system logger:                               [  OK  ]
    uat-web02:/root# ps -ef | grep rsyslog
    root       722 32322  0 10:02 pts/2    00:00:00 grep rsyslog
    uat-web02:/root# service rsyslog start
    Starting system logger:                                    [  OK  ]
    uat-web02:/root# ps -ef | grep rsyslog
    root       733     1  0 10:02 ?        00:00:00 /sbin/rsyslogd -i /var/run/syslogd.pid
    root       748 32322  0 10:02 pts/2    00:00:00 grep rsyslog
    uat-web02:/root# 
    
    
    此时服务端不会接收重复日志:
    zjtest7-frontend:/data/scan# tail -f scan.2016-09-26 
     scan-aaaaaaaaaaaaa
     bbbbb21231
     scan-bbbbb21231
     scan-cccc21231
     scan-dddd9999
     eeeeeeeeee3131
     eeeeeeeeee3131
     eeeeeeeeee3131
     321dadada--scan
     test scan9999
    
    
     zjzc-111222333444qwe
     

  • 相关阅读:
    PHP技巧通过COM使用ADODB
    PHP开发环境安装配置全攻略
    散列表
    poj Antiprime Sequences
    HDU 2011 菜鸟杯
    UVA The ? 1 ? 2 ? ... ? n = k problem
    poj 3126 Prime Path
    uva 699 The Falling Leaves
    UVA Steps
    poj 1426 Find The Multiple
  • 原文地址:https://www.cnblogs.com/zhaoyangjian724/p/6199164.html
Copyright © 2020-2023  润新知