Hi,
I am encountering duplicate runs of gzip related to big log files that need rotating when calling logrotate i.e. hourly.
My use case:
- I am receiving 100-500GB of logs via
rsyslog (daily) that I save to a local logfile.
- To ensure that logs are rotated in i.e. sizeable junks, I run
logrotate hourly.
- To save on disk space, i enabled
delaycompress.
- When the system is under load (CPU and/or IO), compression might take >1hr. Thus, logrotate is started again and ends up
delaycompress-ing the same file again, contributing to the overload of the system. In this way, I sometimes see 4-5 concurrent instances of logrotate & gzip.
Is there a way to handle this (w/o implementing a locking mechanism myself), or would this require new functionality in logrotate?
Thanks,
Raoul