Using logrotate to manage logfiles

In this recipe we will consider the practice of log rotation in order to learn how to improve the functionality and overall performance of the entire system.

Logfiles provide information on the health of your system and assist you in troubleshooting specific difficulties with a service or software application. They can be stored on a separate partition, but during the lifetime of your server, large logfiles can often become too difficult to search, inflate backups, or minimize the known disk space on your system. Logfiles are vital to your role as a server administrator, and as an out-of-control logfile can only serve to hinder, it is the purpose of this recipe to show you how to use a feature known as logrotate ...

Get CentOS 6 Linux Server Cookbook 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.