free 명령어를 이용하여 swap 사용량과
프로세스가 사용 중인 swap 사용량이 다르다면 (/proc/*/status)
journalctl 로그 사용량이 높아서 swap 을 쓰고 있을 수 있습니다
# 사용량 확인
journalctl --disk-usage
# 3일치 남기고 삭제
journalctl --vacuum-time=3d
(기본값으로 journal 로그는 영구보관이 아니기에.. 리붓시 초기화 되는데
uptime 긴 서버들에서 위와 같은 문제가 발생할 수 있음)
[root@dev-dmz-mgnt ~]# free -m
total used free shared buff/cache available
Mem: 32006 2008 8626 278 21371 29261
Swap: 1907 1006 901
[root@abc ~]# journalctl --vacuum-time=3d
Deleted archived journal /run/log/journal/a8bc76da4b5142319bca52d40642c2d9/system@9a68db219b8243cc99f458b9bfa12f7f-00000000001190a0-0005cbe605a81df9.journal (48.0M).
Deleted archived journal /run/log/journal/a8bc76da4b5142319bca52d40642c2d9/system@9a68db219b8243cc99f458b9bfa12f7f-00000000001223d3-0005ccdb4df414b5.journal (48.0M).
Deleted archived journal /run/log/journal/a8bc76da4b5142319bca52d40642c2d9/system@9a68db219b8243cc99f458b9bfa12f7f-000000000012b7ba-0005cdcf78301fdf.journal (48.0M).
Deleted archived journal /run/log/journal/a8bc76da4b5142319bca52d40642c2d9/system@9a68db219b8243cc99f458b9bfa12f7f-0000000000134c82-0005cec26b39c79f.journal (48.0M).
Deleted archived journal /run/log/journal/a8bc76da4b5142319bca52d40642c2d9/system@9a68db219b8243cc99f458b9bfa12f7f-000000000013dfeb-0005cfb86d7f1a39.journal (48.0M).
Deleted archived journal /run/log/journal/a8bc76da4b5142319bca52d40642c2d9/system@9a68db219b8243cc99f458b9bfa12f7f-00000000001472d6-0005d0ae5de1192a.journal (48.0M).
Deleted archived journal /run/log/journal/a8bc76da4b5142319bca52d40642c2d9/system@9a68db219b8243cc99f458b9bfa12f7f-0000000000150628-0005d1a4032551dd.journal (48.0M).
Deleted archived journal /run/log/journal/a8bc76da4b5142319bca52d40642c2d9/system@9a68db219b8243cc99f458b9bfa12f7f-0000000000159881-0005d29a65fad030.journal (48.0M).
Deleted archived journal /run/log/journal/a8bc76da4b5142319bca52d40642c2d9/system@9a68db219b8243cc99f458b9bfa12f7f-0000000000162baa-0005d38f78a9ea55.journal (48.0M).
Deleted archived journal /run/log/journal/a8bc76da4b5142319bca52d40642c2d9/system@9a68db219b8243cc99f458b9bfa12f7f-000000000016bee4-0005d48305819742.journal (48.0M).
Deleted archived journal /run/log/journal/a8bc76da4b5142319bca52d40642c2d9/system@9a68db219b8243cc99f458b9bfa12f7f-000000000017529c-0005d5767228f287.journal (48.0M).
Deleted archived journal /run/log/journal/a8bc76da4b5142319bca52d40642c2d9/system@9a68db219b8243cc99f458b9bfa12f7f-000000000017e73b-0005d66904ae61af.journal (48.0M).
Deleted archived journal /run/log/journal/a8bc76da4b5142319bca52d40642c2d9/system@9a68db219b8243cc99f458b9bfa12f7f-0000000000187b25-0005d75c74df454b.journal (48.0M).
Deleted archived journal /run/log/journal/a8bc76da4b5142319bca52d40642c2d9/system@9a68db219b8243cc99f458b9bfa12f7f-0000000000190cbc-0005d852b3f59b3a.journal (48.0M).
Deleted archived journal /run/log/journal/a8bc76da4b5142319bca52d40642c2d9/system@9a68db219b8243cc99f458b9bfa12f7f-0000000000199fb3-0005d9494ffbfdb5.journal (48.0M).
Deleted archived journal /run/log/journal/a8bc76da4b5142319bca52d40642c2d9/system@9a68db219b8243cc99f458b9bfa12f7f-00000000001a3312-0005da3f596be200.journal (48.0M).
Vacuuming done, freed 768.0M of archived journals on disk.
[root@abc ~]# free -m
total used free shared buff/cache available
Mem: 32006 2007 8865 41 21133 29499
Swap: 1907 474 1433