1

I configured rsyslog under RHEL 6.4 to send log4j files to a central rsyslog server. This works until the application log files are rotated. rsyslog still tries to read the files but doesn't find any data:

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

it looks like rsyslog is trying to access the files with the old file handle. How can I tell rsyslog to always access the files through the actual file name? Thank you Peter

4

1 回答 1

1

旋转应用程序日志文件后,向 rsyslog 发送 HUP 信号。这将强制 rsyslog 关闭并重新打开其文件描述符。

于 2013-12-07T16:09:16.560 回答