On Fri, 24 Jun 2022 02:33:24 -0400 Felix Miata <mrmazda@earthlink.net> wrote:
On a PC that sees only occasional use, I'm using what appears to be default files in /etc/logrotate.d/, timestamped Oct 2018. zypper.lr there specifies size 10M. After a reboot with its size exceeding 10M, e.g. 25,000K, it remains the same size until some later unknown time or number of boots when it finally gets rotated and shrunk. Why? How can rotating and compressing it be made to happen when on boot it is found to exceed the configured limit. Is it simply that logrotate needs to be forced to run other than via a daily cron job? If yes, what is a good method? If not, how?
You don't mention what version of OS you're using or what version of logrotate come to that, so guesswork ... You know you can use @reboot as a cron time-specifier right? And ISTR in more modern OS that logrotate is controlled via systemd instead.