我在Solaris 10上遇到了系统日志的一些问题。看起来configuration不正确,日志消息堆积如山,永远不会写入/ var / adm / messages。
以下是/ var / adm / messages中的内容:
Sep 10 03:10:17 air syslogd: Could not completely output pending messages while preparing re-configuration Sep 10 03:10:17 air syslogd: discarded 1082 messages and restart configuration. Sep 12 03:10:17 air syslogd: Could not completely output pending messages while preparing re-configuration Sep 12 03:10:17 air syslogd: discarded 436 messages and restart configuration.
我发出这个命令:
$ logger -p daemon.notice "TESTING LOGGING"
并在/ var / adm / messages中获得了输出:
Sep 14 11:52:43 air gkwrcc: [ID 702911 daemon.notice] TESTING LOGGING
但没有其他消息似乎使它。
这是我的/etc/syslog.conf:
#ident "@(#)syslog.conf 1.5 98/12/14 SMI" /* SunOS 5.0 */ # # Copyright (c) 1991-1998 by Sun Microsystems, Inc. # All rights reserved. # # syslog configuration file. # # This file is processed by m4 so be careful to quote (`') names # that match m4 reserved words. Also, within ifdef's, arguments # containing commas must be quoted. # *.err;kern.notice;auth.notice /dev/sysmsg *.err;kern.debug;daemon.notice;mail.crit /var/adm/messages auth.info /var/adm/auth.log *.alert;kern.err;daemon.err operator *.alert root *.emerg * # if a non-loghost machine chooses to have authentication messages # sent to the loghost machine, un-comment out the following line: #auth.notice ifdef(`LOGHOST', /var/log/authlog, @loghost) mail.debug ifdef(`LOGHOST', /var/log/syslog, @loghost) # # non-loghost machines will use the following lines to cause "user" # log messages to be logged locally. # ifdef(`LOGHOST', , user.err /dev/sysmsg user.err /var/adm/messages user.alert `root, operator' user.emerg * )
你似乎在几个地方反引号,这可能应该是单引号。