It sends SYSLOG to a Linux Box
gw#conf t
gw(config)#logging on
gw(config)#logging 192.168.0.2
gw(config)#logging facility local1
gw(config)#logging source-interface e0
Change formats of date, save log into memory. See by "sh logging"
gw(config)#timestamps log datetime msec localtime
gw(config)#service timestamps debug uptime
gw(config)#logging buffered 8192 debugging
Edit /etc/sysconfig/syslog (RedHat7.2) to accept syslog messages remotely
SYSLOGD_OPTIONS="-m 0 -r"
Edit /etc/syslog.conf and add one line as below
...
local1.* /var/log/gw.log
Edit /etc/logrotate.d/syslog to lotate /var/log/gw.log file
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boo
t.log /var/log/cron /var/log/gw.log {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || t
rue
endscript
}
Restart Syslog
# /etc/init.d/syslog restart
Shutting down kernel logger: [ OK ]
Shutting down system logger: [ OK ]
Starting system logger: [ OK ]
Starting kernel logger: [ OK ]
文章来源于领测软件测试网 https://www.ltesting.net/
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:info@testage.com.cn 电话:010-51297073