서버 등 운영체제(OS)/Linux
journalctl 로그 용량/보존 기한 설정하기
jihun202
2022. 8. 11. 09:44
반응형
var/log 에 용량이 많아 확인해보니 journal log 가 4G 넘게 쌓여있는걸 보고,
stackoverflow 를 참고해 해결했다.
The self maintenance method is to vacuum the logs by size or time.
Retain only the past two days:
journalctl --vacuum-time=2d
Retain only the past 500 MB:
journalctl --vacuum-size=500M
man journalctl for more information.
출처:
https://unix.stackexchange.com/questions/139513/how-to-clear-journalctl
반응형