SUSE Support

Here When You Need Us

logrotate is slow if a lot of logfiles exist

This document (7002072) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 10 Service Pack 2
SUSE Linux Enterprise Server 10 Service Pack 1
SUSE Linux Enterprise Point of Service
SUSE Linux Enterprise Desktop 10 Service Pack 2
SUSE Linux Enterprise Desktop 10 Service Pack 1

Situation

The logrotate script is run once a day to ensure logfiles do not exceed a certain size.
When a predefined limit is reached, that logfile will be compressed and a new file will be created and used instead.

Under certain situations like if tens of thousands logfiles exist, logrotate would not finish until the next run is scheduled and the rotation will fail.

Reason is a not very efficient algorithm to discover logfiles to rotate

Resolution

The easiest resolution clearly is to avoid such a lot of logfiles.

Logrotate on SLES10 SP2 is fixed with logrotate-3.7.3-13.8.
SLES11 already comes with that fix.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7002072
  • Creation Date: 03-Dec-2008
  • Modified Date:05-Mar-2021
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Point of Service
    • SUSE Linux Enterprise Real Time
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.