日志管理

一、syslogd守护进程及其配置文件

系统在运行中可能会产生许多事件,这些事件都会通过日志消息的形式交给日志守护进程。日志守护进程会对这些日志消息进行筛选、分类,然后存放到指定的日志文件中。

RHEL5.3使用的日志服务是syslog(不同发行版本使用的日志服务可能会不同),,这是一个标准的日志服务程序,不仅可以记录本地系统产生的消息,还可以记录多个联网的服务器、交换机和路由器等设备的日志。

【日志服务配置文件】

为了了解syslogd日志服务的工作方式,可以查看其配置文件。

[root@localhost ~]# cat /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 stuffcron.*/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.loglocal7.*/var/log/boot.log你能给的也只有这么多,在这个狭小的圈子里,

日志管理

相关文章:

你感兴趣的文章:

标签云: