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

Efterlad et Svar

Dette websted bruger Akismet at reducere spam. Lær hvordan din kommentar data behandles.

Vi bruger cookies til at give dig den bedste online oplevelse. Ved at acceptere du accepterer brugen af ​​cookies i overensstemmelse med vores cookie-politik.