본문 바로가기
공부/Linux

[Linux] dnf -makecache log관련

by CITTA 2023. 3. 15.
728x90
반응형

linux 8.x 에서 주기적으로 dnf-makecache.service가 실행되어 dnf의 최신 메타데이터를 유지한다.

# /var/log/message를 확인해보면 주기적으로 dnf-makecache 로그 기록 확인
...
Mar 14 06:06:00 test-server dnf[5812]: Updating Subscription Management repositories.
Mar 14 06:06:00 test-server dnf[5812]: Unable to read consumer identity
Mar 14 06:06:00 test-server dnf[5812]: This system is not registered with an entitlement server. You can use subscription-manager to register.
Mar 14 06:06:00 test-server dnf[5812]: Failed determining last makecache time.
Mar 14 06:06:00 test-server dnf[5812]: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".
Mar 14 06:06:00 test-server systemd[1]: dnf-makecache.service: Succeeded.
Mar 14 06:06:00 test-server systemd[1]: Started dnf makecache.
Mar 14 07:06:59 test-server systemd[1]: Starting dnf makecache...
Mar 14 07:07:00 test-server dnf[5842]: Updating Subscription Management repositories.
Mar 14 07:07:00 test-server dnf[5842]: Unable to read consumer identity
Mar 14 07:07:00 test-server dnf[5842]: This system is not registered with an entitlement server. You can use subscription-manager to register.
Mar 14 07:07:00 test-server dnf[5842]: Failed determining last makecache time.
Mar 14 07:07:00 test-server dnf[5842]: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".
Mar 14 07:07:00 test-server systemd[1]: dnf-makecache.service: Succeeded.
Mar 14 07:07:00 test-server systemd[1]: Started dnf makecache.
...

최신 메타데이터를 중지하기 위해서는 dnf-makecache.timer를 중지하면 된다.

systemd timer : systemd(system daemon)의 실행주기를 지정하는 기능

# systemctl status dnf-makecache.timer
● dnf-makecache.timer - dnf makecache --timer
   Loaded: loaded (/usr/lib/systemd/system/dnf-makecache.timer; enabled; vendor preset: enabled)
   Active: active (waiting) since Mon 2023-03-13 12:48:56 KST; 24h ago
  Trigger: Tue 2023-03-14 13:57:24 KST; 56min left

Mar 13 12:48:56 test-server systemd[1]: Started dnf makecache --timer.
# systemctl disable --now dnf-makecache.timer
Removed /etc/systemd/system/timers.target.wants/dnf-makecache.timer.
728x90
반응형

댓글