I'm able to call logrotate /etc/logrotate.conf whenever I see my log file exceed the specified threshold and it rotates just fine. I was under the impression though that whenever a file specified in the logrotate config breached its threshold it would rotate them automatically without me having to run the command.

/var/log/upstart/*server.log {
        size 2500M
        rotate 5

Any ideas?

1 Answer 1


Which files will be rotated is indeed specified in /etc/logrotate.conf. But the command logrotate still needs to be run. It can be run manually, but it is normally configured to be run daily by cron.

While it depends on the distro your using, this command will likely output if it is specified to be run periodically by cron:

find /etc/cron* -type f | xargs fgrep logrotate
  • So if it's a cron.daily, it could take up to 24hr after hitting the threshold to rotate?
    – KuboMD
    Nov 20, 2018 at 17:42
  • 1
    @KuboMD That is correct.
    – Kusalananda
    Nov 20, 2018 at 19:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .