ITPub博客

首页 > IT基础架构 > 服务器/存储 > 把日志写到其他服务器上的操作步骤

把日志写到其他服务器上的操作步骤

原创 服务器/存储 作者:tonykorn97 时间:2008-05-09 20:13:24 0 删除 编辑

1,first, on the log server set up syslogd to accept remote memmages.
a, EDIT /etc/sysconfig/syslog;
YSSLOGD_OPTIONS="-r -m 0 "
b, restart syslogd;
# service syslog restart

[@more@]

2, on the log client set up syslogd to send messages from the user facility to the log server.
a, Append in /etc/syslog.conf the following line:
user.* @172.25.1.114
b, restart syslogd
#service syslog restart

3, test the new setup by using logger to generate a syslog messages.does the message appear in you neighbor's /var/log/messages?
#logger -i -t root "This is a test"

服务器日志信息
[root@tonykorn97 ~]# tail -f /var/log/messages
May 9 20:01:34 tonykorn97 syslog: klogd startup succeeded
May 9 20:01:34 tonykorn97 syslog: syslogd shutdown succeeded
May 9 20:03:10 172.25.1.115 root: it this is a test

[root@tonykorn97 ~]#

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/312079/viewspace-1003724/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2007-12-05

  • 博文量
    1854
  • 访问量
    2088331