分类: LINUX
2008-03-03 21:51:14
To collect logs from a chroot using a syslog-ng client running on the host, complete the following steps:
# 注释 :要让 syslog-ng 收集一个在 chroot 环境下运行的程序的日志,应该按照如下的步骤 :
# -)1、首先建立 chroot 的环境,记得要建立 /dev 目录和 /dev/log 文件
# -)2、syslog-ng client 端必须是运行在正常环境下,而不是 chroot 环境,同时 source 指向这个 chroot 环境下的 /dev/log 文件,例如 /chroot/dev/log
# -)3、通过 log 连接。
Procedure 6.2. Collecting logs from chroot
Create a /dev
directory within the chroot. The
applications running in the chroot send their log messages here.
Create a local source in the configuration file of the syslog-ng application
running outside the chroot. This source should point to the /dev/log
file within the chroot (e.g., to the /chroot/dev/log
directory).
Include the source in a log statement.