Logrotate Log Management Tool

Logrotate Log Management Tool

github.com

1

About this website

This system utility manages the automatic rotation, compression, removal, and mailing of log files, designed to simplify administration of systems that generate large numbers of log files. Originally created by Erik Troan at Red Hat in 1995, this tool has been a standard component of virtually every Linux distribution for decades, with over 1,300 stars as of 2026. Key features include: automatic log rotation (renaming active log files with date or sequential suffixes and creating new files, preventing files from growing indefinitely), rotation configuration (per-application or global configuration files specifying rotation frequency, retention count, compression, and post-rotation actions), rotation intervals (daily, weekly, monthly, yearly, and size-based rotation with minimum size thresholds), compression (automatic gzip, bzip2, xz, or zstd compression of rotated files with configurable delay for processes that keep handles open), retention policy (keeping a configurable number of old files and removing older ones), date-based naming (using dateext to append dates to filenames instead of sequential numbers), pre and post-rotation scripts (running commands before and after rotation, such as signaling daemons to reopen files or sending notifications), sharedscripts (running scripts once for multiple matched files instead of per-file, reducing redundant restarts), copy and copytruncate modes (copy truncates in-place, useful for applications that cannot be signaled to reopen logs), mail notification (emailing rotated files before deletion for archival), and state file (tracking last rotation time to ensure correct rotation across reboots).

Tags & Categories

Categories

Statistics

1
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!