Logrotation
Jump to navigation
Jump to search
Overview
Logrotation에 대한 기술 문서입니다.
Summary
- 무엇인가? - Logrotation
- 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
- 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시
Purpose
이 문서가 존재하는 이유
- Goal: Logrotation에 대한 기술 정보 제공
- Scope: Logrotation의 개념, 사용법, 설정
- Non-goals: 다른 주제로의 확장
Key Concepts
| Concept | Description | Related |
|---|---|---|
| Logrotation | HPC/서버 환경에서 중요한 기술 개념 | Linux, Server |
Detailed Explanation
Controlling the sizes of log files on a Linux server is crucial due to their continuous growth. As log files accumulate, they can consume valuable storage space, server resources, and cause performance issues. To address this problem, log rotation is commonly employed in most Linux distributions.[1]
$ logrotate --version
logrotate 3.19.0
Default mail command: /usr/bin/mail
Default compress command: /bin/gzip
Default uncompress command: /bin/gunzip
Default compress extension: .gz
Default state file path: /var/lib/logrotate/status
ACL support: yes
SELinux support: yes
<syntaxhighlight lang="bash"> The main Logrotate configuration $cat /etc/logrotate.conf
- see "man logrotate" for details
- global options do not affect preceding include directives
- rotate log files weekly, the frequency of log rotation. Alternatively, you can specify another time interval (hourly, daily, monthly, or yearly).
weekly
- use the adm group by default, since this is the owning group
- of /var/log/syslog.
Best Practices
- 최신 버전 사용 권장
- 공식 문서 참고
- 테스트 환경에서 먼저 검증
References
Related Pages
Knowledge Graph
Related