免费注册 查看新帖 |

Chinaunix

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

Configuring the /etc/syslog.conf File [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-01-21 20:39 |只看该作者 |倒序浏览

Configuring the /etc/syslog.conf File

The target locations for the syslog message files are defined within the /etc/syslog.conf file. You must restart the syslogd daemon whenever you make any changes to this file.
The following excerpt from the /etc/syslog.conf file shows how various events are logged by the
system
.
  • *.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 *
    Note: Within the /etc/syslog.conf file, use a selector level of err to indicate that all events of priority error (and higher) are logged to the target defined in the action field.
    In Line 1, every error event (*.err) and all kernel and authorization facility events of level notice, which are not error conditions but might require special handling, will write a message to the /dev/sysmsg file.
    In Line 2, every error event (*.err), all kernel facility events of level debug, all daemon facility events of level notice, and all critical level mail events will record a message in the /var/adm/messages file. Therefore, errors are logged to both files.
    Line 3 indicates that all alert level events, including the kernel error level and daemon error level events, are sent to the user operator if this user is logged in.
    Line 4 indicates that all alert level events are sent to the root user if the root user is logged in.
    Line 5 indicates that any event that the system interprets as an emergency will be logged to the terminal of every logged-in user.
    To alter the event logging mechanism, edit the /etc/syslog.conf file, and restart the syslogd daemon.
    The syslogd daemon can be started automatically during boot or manually from the command line.
    Starting the syslogd Daemon During Boot Operation
    The /lib/svc/method/system-log file starts the syslogd process during each system boot.
    The /etc/syslog.conf
    configuration file
    is read each time the syslogd daemon starts.
    Manually Stopping and Starting the syslogd Daemon
    If the configuration file has been modified, you can manually stop or start the syslogd daemon, or send it a refresh command, which causes the daemon to reread the /etc/syslog.conf file.
    To stop the syslogd daemon, perform the command:# svcadm disable svc:/system/system-log:default
    To start the syslogd daemon, perform the command:# svcadm enable svc:/system/system-log:default
    To send a refresh to the syslogd daemon, perform the command:# svcadm refresh svc:/system/system-log:default

    本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/36549/showart_469005.html
  • 您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

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

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP