linux log rotation (logrotate)

Introduction logrotate is designed to simplify the management of systems that generate large amounts of log files. It allows automatic rotation, compression, deletion and mailing of log files. Each log file can be processed daily, weekly, monthly or when it becomes too large. Installation Taking centos7 or ubuntu20.04 as an example, the system has installed […]

Linux log management-logrotate (crontab scheduled task, Ceph log dump)

Article directory 1. Overview of logrotate 2. Basic usage of logrotate 3. logrotate operating mechanism logrotate parameters 4. How does logrotate achieve rolling logs without affecting the normal log output of the program? Linux file operation mechanism Option One Option II 5. Logrotate in action–Ceph log dump refer to 1. Overview of logrotate logrotate is […]

Linux: Logging system rsyslog and log rotation logrotate

Directory 1. Logging system rsyslog 1.1. Importance of logs 1.2. Basics of log management 1.3. Process of processing logs 1.4. Common log files (system, process, application) 1.5.Website log management 1.6.rsyslogd configuration 1.7. Main configuration file 2. Log rotation (cutting) logrotate 2.1.logrotate configuration file 2.2. Configure log rotation 2.3.Example 1: Rotate file /var/log/yum.log 2.4.Example 2: Log […]

centos on the use and examples of log file cutting logrotate

Article directory 1. Introduction to Logrotate 1. Introduction to Logrotate configuration file The specific logrotate command format is as follows Logrotater log file cutting strategy Logrotate can trigger log rotation automatically or manually 2. Example: tomcat log 1. Sample file location 2. Create a file named tomcat-9.0.43 in the /etc/logrotate.d directory 3. Add the following […]

[Shell command collection system management] Linux automatic rotation (log rotation) log file logrotate command user guide

Directory title Description grammar format parameter description Error condition Notes Bottom layer implementation Example Example 1 Example 2 Example 3 Example 4 Example 5 Example 6 Example 7 Implemented in c language Conclusion Shell Command Column: Full Analysis of Linux Shell Command description logrotate is a log file management tool in the Linux system. It […]

Log file rotation (logrotate)

Article directory Log file rotation (logrotate) Round Robin Fundamentals Basic configuration for round robin Actually test the operation of logrotate Use Cases Rotate function for custom log files Log file rotation (logrotate) Log rotation (logrotate) is a tool for managing log files. It can help us automatically cut, compress, and delete log files to save […]

About the use of logrotate

How to use logrotate for cutting log file technology By the way, condemn yourself, the technical documentation is always not updated, laziness is really terrible. logrotate is a built-in command of centos. Other linux operating systems may need to be installed by themselves for log cutting and periodic deletion. Simply put, it is to divide […]