Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1770614
  • 博文数量: 184
  • 博客积分: 10122
  • 博客等级: 上将
  • 技术积分: 5566
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-08 12:32
文章存档

2011年(1)

2008年(183)

我的朋友

分类: LINUX

2008-03-03 21:51:14

6.3. Collecting logs from chroot

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

  1. Create a /dev directory within the chroot. The applications running in the chroot send their log messages here.

  2. 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).

  3. Include the source in a log statement.


阅读(833) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~