- 论坛徽章:
- 0
|
如何将本机的syslog信息发到另一主机?
原帖由 "nimysun" 发表:
我昨天也碰巧做了这个试验,但是没有成功。我看文档上要求把向外发送messages的主机中的/etc/hosts中的loghost指向接收方。
然后重启syslogd进程
# pkill -1 syslogd
If you change the "loghost" in /etc/hosts, you need reboot the system to make the change take effect.
For a simple test, do like this:
1)add a line to system A which sends messages out:
"local0.notice<TAB>; @host_name
2)On loghost B, touch /var/log/local0
3)Add to loghost B:
"local0.notice<TAB>;/var/log/local0"
4)On system A:
#logger -p local0.notice test is successful |
|