免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: cuitao1212
打印 上一主题 下一主题

/var/adm/messages on solaris 10 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2009-02-11 12:16 |只看该作者
那就是大哥你的机器太稳定啦

论坛徽章:
0
12 [报告]
发表于 2009-02-11 12:40 |只看该作者
原帖由 KirovAirShip 于 2009-2-11 11:58 发表
说不定系统没啥事,想想算了,不更新了。
检查/etc/syslog.conf



让大家看看syslog.conf

论坛徽章:
0
13 [报告]
发表于 2009-02-11 13:34 |只看该作者

回复 #12 yuhuohu 的帖子

root@hostname #cat /etc/syslog.conf

# Anything *.err and above, all kernel messages (apart from debug and info)
# and any auth messages (apart from debug and info) go to console(s):
*.err;kern.notice;auth.notice                   /dev/sysmsg

# Any alert messages (or above) go to root user:
*.alert                                         root

# All emergency message (the highest) go to all logged in users:
*.emerg                                         *

# Record all messages in /var/adm/messages apart from
# mail, lpf and auth ones (they are recorded in logfiles below)
*.debug;mail.none;lpr.none;auth.none            /var/adm/messages

# All mail messages (apart from debug ones) go to
# mailmessages:
mail.info                                       /var/adm/mailmessages

# All authentication events from info and above go to /var/log/authlog:
auth.info                                       /var/log/authlog

# All lpr messages go to lprmessages:
lpr.debug                                       /var/adm/lprmessages



# ------------------------------------------------------------------
#
# For reference, available facilities are:
#     user            Messages generated by user  processes.  This
#                     is  the  default  priority for messages from
#                     programs or facilities not  listed  in  this
#                     file.
#
#     kern            Messages generated by the kernel.
#
#     mail            The mail system.
#
#     daemon          System daemons, such as in.ftpd(1M)
#
#     auth            The authorization system: login(1),  su(1M),
#                     getty(1M), among others.
#
#     lpr             The line printer spooling  system:  lpr(1B),
#                     lpc(1B), among others.
#
#     news            Designated for the USENET network news  sys-
#                     tem.
#
#     uucp            Designated for the UUCP system; it does  not
#                     currently use the syslog mechanism.
#
#     cron            Designated for cron/at messages generated by
#                     systems  that do logging through syslog. The
#                     current version  of  the  Solaris  Operating
#                     Environment  does  not use this facility for
#                     logging.
#     audit           Designated for audit messages  generated  by
#                     systems that audit by means of syslog.
#
#     local0-7        Designated for local use.
#
#     mark            For timestamp messages  produced  internally
#                     by syslogd.
#
#     *               An asterisk indicates all facilities  except
#                     for the mark facility.
#
#
# For reference, all levels are (in descending order of severity):
#     emerg           For panic conditions that would normally  be
#                     broadcast to all users.
#     alert           For  conditions  that  should  be  corrected
#                     immediately,  such  as  a  corrupted  system
#                     database.
#
#     crit            For warnings about critical conditions, such
#                     as hard device errors.
#
#     err             For other errors.
#
#     warning         For warning messages.
#
#     notice          For conditions that  are  not  error  condi-
#                     tions,  but  may require special handling. A
#                     configuration entry with a  level  value  of
#                     notice must appear on a separate line.
#
#     info            Informational messages.
#
#     debug           For messages that  are  normally  used  only
#                     when debugging a program.
#
#     none            Do not  send  messages  from  the  indicated
#                     facility  to the selected file. For example,
#                     a selector of
#
#                     *.debug;mail.none
#
#                     sends all messages except mail  messages  to
#                     the selected file.
#Updated for POEM endpoint
local1.emerg;local1.alert;local1.crit;local1.err;local1.warning;local1.notice;local1.notice     /opt/sw/Apps/Logs/csp_mon.log
# Tivoli logfile adapter entry, ID=
*.emerg;*.alert;*.crit;*.err;*.warning;*.notice;*.info  /tmp/.tivoli/.tecad_logfile.fifo.hostname.
# End of logfile adapter entry, ID=

论坛徽章:
0
14 [报告]
发表于 2009-02-11 14:02 |只看该作者
这是Solaris 9 sparc上的syslog.conf信息,供LZ参考

bash-2.05# cat /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

*.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                                      *
)

论坛徽章:
0
15 [报告]
发表于 2009-02-11 14:17 |只看该作者

回复 #14 geriwolf 的帖子

说实话没觉得有什么不同的

论坛徽章:
0
16 [报告]
发表于 2009-02-11 14:22 |只看该作者
你more 下/dev/sysmsg

[ 本帖最后由 alextu 于 2009-2-11 14:24 编辑 ]

论坛徽章:
0
17 [报告]
发表于 2009-02-11 14:27 |只看该作者
原帖由 alextu 于 2009-2-11 14:22 发表
你more 下/dev/sysmsg



敲了这个以后。系统连输出都没有。。。。hung在那里了。

论坛徽章:
0
18 [报告]
发表于 2009-02-11 14:38 |只看该作者
1.ps -ef|grep syslogd看看进程起了没。
2、手动写一下messages 使用logger命令。

论坛徽章:
0
19 [报告]
发表于 2009-02-11 14:52 |只看该作者
原帖由 haishui 于 2009-2-11 14:38 发表
1.ps -ef|grep syslogd看看进程起了没。
2、手动写一下messages 使用logger命令。



results
1.
root@hostname#ps -ef|grep syslog
    root    93     1   0   Feb 02 ?          35:49 vxconfigd -x syslog -m boot
    root 15759  6435   0 06:50:22 pts/3       0:00 grep syslog
    root  5141     1   0 06:46:26 ?           0:00 /usr/sbin/syslogd
root@hostname#

2.是这么用么?
root@hostname #logger System Test
root@hostname #echo $?
0
root@hostname#pwd
/var/adm
root@hostname#more messages

似乎logger命令也没起作用但是执行成功

论坛徽章:
0
20 [报告]
发表于 2009-02-11 15:19 |只看该作者
1.logger -p mail.crit test
2.tail /var/messages.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP