分类: LINUX
2008-03-03 21:52:42
The syslog-ng application can replace both the syslogd and klogd daemons on Linux hosts. To replace klogd, complete the following steps:
# 注释 :syslog-ng 也能从内核获取日志,从而替换 klogd 的角色
# -)1、首先是创建一个 source ,file()类型,读取 /proc/kmsg 文件
# -)2、使用 log 连接
# -)3、停止 klogd 进程
Procedure 6.3. Replacing klogd on Linux
Add a file source pointing to /proc/kmsg
to the
syslog-ng configuration file.
source s_kmsg { file("/proc/kmsg"); };
Warning | |
---|---|
Do not use a pipe source to read |
Include the source defined in Step 1 in a log path.
Stop klogd.
Warning | |
---|---|
Do not run klogd and syslog-ng simultaneously when using syslog-ng to read
|