1

RHEL 6.4 で rsyslog を構成して、log4j ファイルを中央の rsyslog サーバーに送信しました。これは、アプリケーション ログ ファイルがローテーションされるまで機能します。rsyslog は引き続きファイルを読み取ろうとしますが、データが見つかりません。

9332.655820752:7f609100d700: strm 0x7f607c005580: file 10 read 0 bytes
9332.655829701:7f609100d700: stream checking for file change on '/var/log/tomcat7x/fa-vm-web-expert-performance-events.log', inode 2069/2069file 7 read 0 bytes
9342.665937537:7f609100d700: stream checking for file change on '/var/log/tomcat7x/fa-vm-web-expert-all-events.log', inode 2063/2063file 8 read 0 bytes
9342.665949751:7f609100d700: stream checking for file change on '/var/log/tomcat7x/catalina-daemon.out', inode 1179/1179file 9 read 0 bytes
9342.665960655:7f609100d700: stream checking for file change on '/var/log/tomcat7x/fa-vm-web-expert-application-all-events.log', inode 2068/2068file 10 read 0 bytes

rsyslog が古いファイル ハンドルでファイルにアクセスしようとしているようです。実際のファイル名を介して常にファイルにアクセスするように rsyslog に指示するにはどうすればよいですか? ありがとうピーター

4

1 に答える 1

1

アプリケーション ログ ファイルをローテーションした後、HUP シグナルを rsyslog に送信します。これにより、rsyslog は強制的にファイル記述子を閉じてから再度開きます。

于 2013-12-07T16:09:16.560 に答える