systemd-timesyncd
/etc/systemd/timesyncd.conf
주석 처리를 해제하고 systemd-timesyncd 서비스를 실행하고 시작프로그램으로 등록하면 끝이다.
$ sudo systemctl start systemd-timesyncd
$ sudo systemctl enable systemd-timesyncd
동작 확인
timedatectl
NTP service: active
라고 나오면 잘 작동하고 있음$ timedatectl
Local time: 목 2021-05-06 22:11:03 KST
Universal time: 목 2021-05-06 13:11:03 UTC
RTC time: 목 2021-05-06 13:11:03
Time zone: Asia/Seoul (KST, +0900)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
$
추가적으로 얻어오는 NTP 서버 주기 확인
$ timedatectl timesync-status
$ timedatectl timesync-status
Server: (null) (ntp.ubuntu.com)
Poll interval: 34min 8s (min: 32s; max 34min 8s)
Leap: normal
Version: 4
Stratum: 2
Reference: 5EC69F0A
Precision: 1us (-23)
Root distance: 32.005ms (max: 5s)
Offset: +387us
Delay: 277.114ms
Jitter: 12.749ms
Packet count: 109
Frequency: -13.972ppm