免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2317 | 回复: 2
打印 上一主题 下一主题

增加了个日志服务器,本机message怎么没日志输出 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-11-29 11:27 |只看该作者 |倒序浏览
在syslog.conf增加了个日志服务器\r\ndaemon.notice;auth.info                 @10.10.10.10\r\n但是本机message都没数据生成了\r\n\r\nsyslog.conf root@app2 # more /etc/syslog.conf\r\n\r\n#ident  \"@(#)syslog.conf        1.5     98/12/14 SMI\"   /* SunOS 5.0 */\r\n\r\n#\r\n\r\n# Copyright (c) 1991-1998 by Sun Microsystems, Inc.\r\n\r\n# All rights reserved.\r\n\r\n#\r\n\r\n# syslog configuration file.\r\n\r\n#\r\n\r\n# This file is processed by m4 so be careful to quote (`\') names\r\n\r\n# that match m4 reserved words.  Also, within ifdef\'s, arguments\r\n\r\n# containing commas must be quoted.\r\n\r\n#\r\n\r\n*.err;kern.notice;auth.notice                   /dev/sysmsg\r\n\r\n*.err;kern.debug;daemon.notice;mail.crit        /var/adm/messages\r\n\r\n\r\n\r\n*.alert;kern.err;daemon.err                     operator\r\n\r\n*.alert                                         root\r\n\r\n\r\n\r\n*.emerg                                         *\r\n\r\nauth.notice                                     /var/adm/authlog\r\n\r\n*.*     @10.154.32.179\r\n\r\n\r\n\r\n# if a non-loghost machine chooses to have authentication messages\r\n\r\n# sent to the loghost machine, un-comment out the following line:\r\n\r\n#auth.notice                    ifdef(`LOGHOST\', /var/log/authlog, @loghost)\r\n\r\n\r\n\r\nmail.debug                      ifdef(`LOGHOST\', /var/log/syslog, @loghost)\r\n\r\n\r\n\r\n#\r\n\r\n# non-loghost machines will use the following lines to cause \"user\"\r\n\r\n# log messages to be logged locally.\r\n\r\n#\r\n\r\nifdef(`LOGHOST\', ,\r\n\r\nuser.err                                        @10.0.0.92\r\n\r\nauth.notice                                     /var/adm/authlog\r\n\r\nuser.err                                        /dev/sysmsg\r\n\r\nuser.err                                        /var/adm/messages\r\n\r\nuser.alert                                      `root, operator\'\r\n\r\nuser.emerg                                      *\r\n\r\n)\r\n\r\ndaemon.notice;auth.info                 @10.10.10.10\r\n复制代码root@app2 # tail -f /var/adm/messages\r\nNov 26 08:48:10 app2 syslogd: going down on signal 15\r\nNov 29 10:19:38 app2 syslogd: going down on signal 15\r\nNov 29 10:19:40 app2 syslogd: line 20: unknown priority name \"*\"\r\n\r\nroot@app2 # ps -ef|grep -i syslog\r\n      root 12298 12049  0 10:37:35 pts/1    0:00 grep -i syslog\r\n    root  9020     1  0 10:19:41 ?        0:00 /usr/sbin/syslogd\r\nroot@app2 # \r\n\r\n

论坛徽章:
0
2 [报告]
发表于 2011-01-06 23:56 |只看该作者
*.*     @10.154.32.179\r\n这行有点问题,等级不能用*代表。

论坛徽章:
0
3 [报告]
发表于 2010-11-29 11:27 |只看该作者
  1. root@app2 # syslogd -d\r\nmain(1): Started at time Mon Nov 29 10:39:38 2010\r\nhnc_init(1): hostname cache configured 128 entry ttl:600\r\ngetnets(1): found 1 addresses, they are: 0.0.0.0.2.2 \r\namiloghost(1): testing 10.0.0.74.2.2\r\nconf_init(1): I am loghost\r\ncfline(1): (*.err;kern.notice;auth.notice                       /dev/sysmsg)\r\ncfline(1): (*.err;kern.debug;daemon.notice;mail.crit    /var/adm/messages)\r\ncfline(1): (*.alert;kern.err;daemon.err                 operator)\r\ncfline(1): (*.alert                                             root)\r\ncfline(1): (*.emerg                                             *)\r\ncfline(1): (auth.notice                                 /var/adm/authlog)\r\ncfline(1): (*.* @10.154.32.179)\r\nlogerror(1): syslogd: line 20: unknown priority name \"*\"\r\nlogerror_to_console(1): syslogd: line 20: unknown priority name \"*\"\r\ncfline(1): (mail.debug                  /var/log/syslog)\r\ncfline(1): (daemon.notice;auth.info                     @10.10.10.10)\r\n\r\n  syslogd: version 1.99\r\n  Started: Mon Nov 29 10:39:38 2010\r\nInput message count: system 0, network 0\r\n# Outputs: 8\r\n\r\n------------------------ priority = [file, facility] ------------------------\r\n\r\n0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 \r\n0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 \r\n--------------------------------------------------\r\n5 3 3 3 5 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 X CONSOLE: /dev/sysmsg\r\n7 3 2 5 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 X FILE: /var/adm/messages\r\n3 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 X USERS: operator\r\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 X USERS: root\r\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 X WALL: \r\nX X X X 5 X X X X X X X X X X X X X X X X X X X X FILE: /var/adm/authlog\r\nX X 7 X X X X X X X X X X X X X X X X X X X X X X FILE: /var/log/syslog\r\nX X X 5 6 X X X X X X X X X X X X X X X X X X X X FORW: 10.10.10.10\r\nFacilities:\r\n  [00] kern:   0\r\n  [01] user:   8\r\n  [02] mail:  16\r\n  [03] daemon:  24\r\n  [04] auth:  32\r\n  [05] security:  32\r\n  [06] mark: 192\r\n  [07] syslog:  40\r\n  [08] lpr:  48\r\n  [09] news:  56\r\n  [10] uucp:  64\r\n  [11] cron: 120\r\n  [12] local0: 128\r\n  [13] local1: 136\r\n  [14] local2: 144\r\n  [15] local3: 152\r\n  [16] local4: 160\r\n  [17] local5: 168\r\n  [18] local6: 176\r\n  [19] local7: 184\r\n\r\nPriorities:\r\n  [00] panic:   0\r\n  [01] emerg:   0\r\n  [02] alert:   1\r\n  [03] crit:   2\r\n  [04] err:   3\r\n  [05] error:   3\r\n  [06] warn:   4\r\n  [07] warning:   4\r\n  [08] notice:   5\r\n  [09] info:   6\r\n  [10] debug:   7\r\n  [11] none:  16\r\n\r\n\r\n\r\n                Per File Statistics\r\nFile                            Tot     Dups    Nofwd   Errs\r\n----                            ---     ----    -----   ----\r\n/dev/sysmsg                     0       0       0       0\r\n/var/adm/messages               0       0       0       0\r\noperator                        0       0       0       0\r\nroot                            0       0       0       0\r\nWALL                            0       0       0       0\r\n/var/adm/authlog                0       0       0       0\r\n/var/log/syslog                 0       0       0       0\r\n10.10.10.10                   0       0       0       0\r\n\r\n\r\nlogmsg(10): msg dispatcher started\r\nsys_poll(11): sys_thread started\r\nlogerror(1): syslogd: syslogd pid 9020 already running. Cannot start another syslogd pid 12669\r\nroot@app2 #
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP