logrotate not rotating the logs

A common issue is when you first setup a daily logrotate.d entry, it will not rotate the first day. When you use a time based rotation (daily/weekly/monthly) logrotate scribbles a date stamp of the last date it saw the file in /var/lib/logrotate/status (or /var/lib/logrotate.status on RHEL systems). The scribbled date becomes the reference date from … Read more

Where does logrotate save its own log?

logrotate does not log anything by default. normally it should be in your cron somewhere, for instance: $ grep -r — ‘logrotate.conf’ /etc/cron* /etc/cron.daily/logrotate:/usr/sbin/logrotate /etc/logrotate.conf You can either run that manually to see what is wrong, or redirect the logrotate output to a file in the above cron to see what happened next day. Likely … Read more

When to use delaycompress option in logrotate?

Your understanding of copytruncate is correct, but the wording in the manpage for delaycompress is a little misleading. More properly, it should say “when some program cannot be told to immediately close it’s logfile” — for instance, if you’re using sharedscripts and the script sends a signal to the process using the log when all … Read more

logrotate daily and size?

If the size directive is used, logrotate will ignore the daily, weekly, monthly, and yearly directives. This is not clear in the documentation when you execute the man logrotate command. However it can be confirmed in practice, and is mentioned in some arbitrary blog posts such as this one. There is a directive called minsize … Read more