Centos 6 LogRotate Debugging

Not sure if your log rotate patterns in /etc/logrotate.d/* are working as you'd expect, or want to know what a pattern is catching?

Then you want logs for your logs (ha). In this case you can troubleshoot by running the built in debug tool:

/usr/sbin/logrotate –debug /etc/logrotate.conf

Output this to a file for easier searching since you’ll likely only care about one or two patterns you’re changing:

/usr/sbin/logrotate –debug /etc/logrotate.conf > out.txt 2>&1

https://www.centos.org/forums/viewtopic.php?t=6249

http://stackoverflow.com/questions/6674327/redirect-all-output-to-file

Tinggalkan pesanan

Laman web ini menggunakan Akismet untuk mengurangkan spam. Belajar bagaimana data komen anda diproses.

Kami menggunakan cookies untuk memberikan anda pengalaman dalam talian yang terbaik. Dengan bersetuju anda menerima penggunaan cookies mengikut dasar cookies kami.