[root@server ~]# vim /etc/syslog.conf
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none
/var/log/messages
# The authpriv file has restricted access.
authpriv.*
/var/log/secure
# Log all the mail messages in one place.
mail.*
-/var/log/maillog
# Log cron stuff
cron.*
/var/log/cron
# Everybody gets emergency messages
*.emerg
*
# Save news errors of level crit and higher in a special file.
uucp,news.crit
/var/log/spooler
# Save boot messages also to boot.log
local7.*
----------------------------------------------------------------- |
[root@client ~]#
vim /etc/sysconfig/syslog
# Options to syslogd
# -m 0 disables 'MARK' messages.
# -r enables logging from remote machines
# -x disables DNS lookups on messages recieved with -r
# See syslogd(8) for more details
SYSLOGD_OPTIONS="-r -m 0"
# Options to klogd
# -2 prints all kernel oops messages twice; once for klogd to decode, and
#
once for processing with 'ksymoops'
# -x disables all klogd processing of oops messages entirely
# See klogd(8) for more details
KLOGD_OPTIONS="-x"
#
SYSLOG_UMASK=077
# set this to a umask value to use for all log files as in umask(1).
# By default, all permissions are removed for "group" and "other".
----------------------------------------------------------------- |
[root@client ~]# service syslog restart
关闭内核日志记录器:
[
确定]
关闭系统日志记录器:
[
确定]
启动系统日志记录器:
[
确定]
启动内核日志记录器:
[
确定]
[root@client ~]#
----------------------------------------------------------------- |
[root@client ~]#
vim /etc/syslog.conf
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*
/dev/console
*.* @10.64.165.210
# The authpriv file has restricted access.
authpriv.*
/var/log/secure
……
下面省略
----------------------------------------------------------------- |
[root@client ~]#
cat /var/log/messages |tail
Nov 30 16:44:29 10.64.165.200 kernel: klogd 1.4.1, log source = /proc/kmsg started.
Nov 30 16:44:33 10.64.165.200 kernel: Removing netfilter NETLINK layer.
Nov 30 16:44:33 10.64.165.200 kernel: ip_tables: (C) 2000-2006 Netfilter Core Team
Nov 30 16:44:33 10.64.165.200 kernel: Netfilter messages via NETLINK v0.30.
Nov 30 16:44:33 10.64.165.200 kernel: ip_conntrack version 2.4 (4096 buckets, 32768 max) - 228 bytes per conntrack
|