系统信息日记配置/etc/syslog.conf
系统信息日志配置/etc/syslog.conf?输出消息的类型 ?格式: ??facility.level facility.level.? ? ? ? ? ?
系统信息日志配置/etc/syslog.conf
?
输出消息的类型 ?格式: ??facility.level; facility.level.? ? ? ? ? ? ? ? ? ? ? 输入消息的位置
*.err;kern.notice;auth.notice ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/dev/sysmsg
*.err;kern.debug;daemon.notice;mail.crit ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/var/adm/messages
重启syslog
/etc/init.d/syslog stop
/etc/init.d/syslog start
?
The selector field?is a semicolon-separated list of priority specifications in the following format:?facility.level; facility.level.
?The?facility field?can contain only 16 codes:kern?Messages generated by the kernel.user?Messages generated by user processes.mail?The mail system.daemon?System daemons, such as the?in.ftpd?and the?telnetd?daemons.auth?The authorization system, including the login and su commands.syslog?Messages generated internally by the syslogd daemon.lpr?The line printer spooling system, such as the lpr and lpc commands.news?Files reserved for the USENET network news system.uucp??(obsolete)?The UNIX-to-UNIX copy (UUCP) system does not use the syslog function.cron?The cron and at facilities, including crontab, at, and cron.local0-7?Eight user-defined codes.the?level?selector specifies the severity or importance of the message. Each level includes all the levels above (of a higher severity).??To remember the sequence for the certification exam you can use an appropriately constructed phase like?"Every alerted cardriver escapes warning notice"emerg?0?Panic conditions that are normally?broadcast to all usersalert?1?Conditions that should be corrected immediately, such as a corrupted system database. Only sysadmin of a particular server needs to be informed by mail or paged.crit?2?Warnings about critical conditions, such as hard device errors.?err?3?Errors other than hard device errorswarning?4?Warning messages, that generally does not interfere with normal operation.notice?5?Non-error conditions that?might require special handlinginfo?6?Purely informational messages?(usually does not require any handling)debug?7?Messages that are normally used only when debugging a programnone?8?Messages are not sent from the indicated facility to the selected file