当前位置:网站首页>Log rotation logrotate
Log rotation logrotate
2022-07-26 06:43:00 【Hejing_ zhang】
log rotation logrotate
1. The configuration file :
- /etc/logrotate.conf # Master profile
- /etc/logrotate.d # The files in the changed directory will be read /etc/logrotate.conf, If the files in this directory do not define special parameters , With /etc/logrotate.conf The setting in the file is taken as the default
2. The flow chart is as follows :

- First execution rotate after , The original messages become messages.1, And it will make a new one messages To store log files
- Second execution ,messages.1 become messages.2,messages become messages.1, Create another one messages
- Third execution ,messages.2 become messages.3,messages.1 become messages.2,messages become messages.1, Create a new messages, Now there are four logs
- The fourth execution ,messages.3 become messages.4,messages.2 become messages.3,messages.1 become messages.2,messages become messages.1, Create a new messages. Now there is
messages.4、messages.3、messages.2、messages.1、messages, Delete messages.4 rotate The numerical value represents the last archived file , Namely xxx.tar.gz file
3. Profile parameter explanation
weekly:rotate cycle
rotate: Number of archives retained
create: The original log file is archived , To create a new log file to store logs
dateext: End with date
compress: Whether to compress when archiving
size: If you set 100K, The trigger condition is that as long as the log size reaches this value, it will be archived
minsize: If you set 100K, The trigger condition is that the size is greater than 100K And the cycle is
maxsize: If you set 100K, The trigger condition is that the cycle is up or the size is satisfied
边栏推荐
- CS5801_HDMI转EDP优势替代LT6711A方案
- Ruby on rails Code Execution Vulnerability (cve-2020-8163) technical analysis, research, judgment and protection
- Experimental flags: --disable_ admission_ control=false --enable_ rm=false --llama_ callback_ port=28000
- Gdown Access denied:Cannot retrieve the public link of the file.
- What are the aspects of performance testing? What are the classification and testing methods?
- The "darkest hour" has not come yet. Cherish every bullet 2020-03-22
- Database and the future of open source
- 排序问题:冒泡排序,选择排序,插入排序
- vulnhub Lampião: 1
- PMP customs formula, don't hurry to recite it
猜你喜欢

@ConstructorProperties注解理解以及其对应使用方式

"Harmonyos" explore harmonyos applications

How does the seckill system ensure that the database does not crash and prevent oversold goods

The creation of "harmonyos" project and the use of virtual machines

Valid bracket sequence of "Niuke | daily question"

Address resolution ARP Protocol
![[pytorch] fine tuning technology](/img/d3/6d0f60fffd815f520f4b3880bd0ac7.png)
[pytorch] fine tuning technology

Uitoolkit tool template project

28. Implement strStr()实现 strStr()

排序问题:冒泡排序,选择排序,插入排序
随机推荐
【图像去噪】基于双立方插值和稀疏表示实现图像去噪matlab源码
openssl: error while loading shared libraries: libssl.so.1.1
[pytorch] CNN practice - flower species identification
CS5801_HDMI转EDP优势替代LT6711A方案
Overview of image classification of vision transformer must read series
[C language] file operation
BPG notes (IV)
SQL optimization scheme
力扣5: 最长回文子串
【故障诊断】基于贝叶斯优化支持向量机的轴承故障诊断附matlab代码
Children's programming electronic society graphical programming level examination scratch level 1 real problem analysis (multiple choice) June 2022
Use and analysis of show profile optimized by MySQL
『HarmonyOS』工程的创建与虚拟机的使用
Esxi 7.0 installation supports mellanox technologies mt26448 [connectx en 10gige, PCIe 2.0 5gt/s] driver, and supports the cheapest 10GB dual fiber network card
Gdown Access denied:Cannot retrieve the public link of the file.
UIToolkit工具模板工程
[image hiding] digital image watermarking method technology based on hybrid dwt-hd-svd with matlab code
"Harmonyos" explore harmonyos applications
Force deduction 5: Longest palindrome substring
【无标题】