I have /etc/logrotate.d directory populated with files; each service, such as httpd, gets it's own logrotate config file.
The contents in the /etc/logrotate.d dir are configured to rotate after 5k.
I also have a /etc/logrotate.conf file which is not in cron yet. It's configured to: rotate log files weekly
weekly # keep 4 weeks worth of backlogs rotate 4 # create new (empty) log files after rotating old ones create # use date as a suffix of the rotated file dateext # uncomment this if you want your log files compressed compress # RPM packages drop log rotation information into this directory include /etc/logrotate.d # no packages own wtmp and btmp -- we'll rotate them here /var/log/wtmp { monthly create 0664 root utmp minsize 1M rotate 1 } /var/log/btmp { monthly create 0664 root utmp minsize 1M rotate 1 }
Below is a typical config file in the /etc/logrotate.d/ directory:
/var/log/httpd/*log { size 5k missingok notifempty sharedscripts compress sharedscripts postrotate /sbin/service httpd reload > /dev/null 2>/dev/null || true endscript }
My questions is where else on the server that I have to configure so that the files in the /etc/logrotate.d directory are rotated after 5k. And that /etc/logrotate.conf is configured to rotate as configured?