Maintaining log size with logrotate

As you know, logs are crucial when it comes to troubleshooting. Linux generally does a very good job of logging almost everything you would want to know, but over time these logs can really add up. On a production server, a log file growing out of control and taking up literally all of your server's free space is a very real issue if left unchecked. In addition to disk space being consumed, a gigantic log file is very hard to open in a text editor in order to view the contents, which makes troubleshooting even harder. A log file of over 500 GB would not only take up a ridiculous amount of space; it would likely cause the system to hang if you try to open it, and transferring a log file to another server for ...

Get Mastering Linux Network Administration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.