I have the following configuration for logrotating the app logs.
/opt/tomcat/logs/app-web.txt {
copytruncate
daily
size 500M
compress
delaycompress
rotate 0
missingok
notifempty
}
/opt/tomcat/logs has a lot of files
app-web.txt
app-web.txt.1
app-web.txt.2
app-web.txt.3
app-web.txt.4
..
..
..
..
..
app-web.txt.100
I have placed the configuration inside /etc/logrotate.d/app-web. I am running CentOs 6.6
I want to have 9 files only like aap-web.txt and app-web.txt.1.gz to app-web.txt.9.gz
Each file inside /opt/tomcat/logs are of 498 M of size. and they are created every 1 hour 30 min.
$cat /var/lib/logrotate.status
displays the time that I ran manually. It doesn't run automatically by cron.