all i'm trying to do is to keep my machine synced with an ntp server.
apparently just enabling ntp service is not good enough/not right/not modern/not prestige/not something else.
And i should be using the timedatectl with systemd-timesyncd.
i read the manual and a few articles and clearly i'm not understanding how it should work.
My understanding:
instead of ntp i should use systemd-timesyncd together with timedatectl. To get time/date sync with network ntp service, i need to (remove ntp package first) enable systemd-timesyncd service and enable syncing of the date/time in the timedatectl.
Question:
and why once i do the above systemd-timesync is dead? isn't it suppose to run and keep the time in sync ??
and why do i get :
Network time on: yes
NTP synchronized: yes
even-though the systemd service is dead/idle ?
Code:
[root@server ~]# systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; disabled; vendor preset: disabled)
Active: active (running) since Sun 2017-11-12 21:33:18 EST; 22s ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 14304 (systemd-timesyn)
Status: "Synchronized to time server 204.2.134.164:123 (0.fedora.pool.ntp.org)."
Tasks: 2 (limit: 4915)
CGroup: /system.slice/systemd-timesyncd.service
└─14304 /usr/lib/systemd/systemd-timesyncd
Nov 12 21:33:18 server.home systemd[1]: Starting Network Time Synchronization...
Nov 12 21:33:18 server.home systemd[1]: Started Network Time Synchronization.
Nov 12 21:33:19 server.home systemd-timesyncd[14304]: Synchronized to time server 204.2.134.164:123 (0.fedora.pool.ntp.org).
[root@server ~]# timedatectl set-ntp true
[root@server ~]#
[root@server ~]#
[root@server ~]#
[root@server ~]# systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; disabled; vendor preset: disabled)
Active: inactive (dead) since Sun 2017-11-12 21:33:53 EST; 4s ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 14304 (code=exited, status=0/SUCCESS)
Status: "Idle."
Nov 12 21:33:18 server.home systemd[1]: Starting Network Time Synchronization...
Nov 12 21:33:18 server.home systemd[1]: Started Network Time Synchronization.
Nov 12 21:33:19 server.home systemd-timesyncd[14304]: Synchronized to time server 204.2.134.164:123 (0.fedora.pool.ntp.org).
Nov 12 21:33:53 server.home systemd[1]: Stopping Network Time Synchronization...
Nov 12 21:33:53 server.home systemd[1]: Stopped Network Time Synchronization.
[root@server ~]# timedatectl status
Local time: Sun 2017-11-12 21:34:04 EST
Universal time: Mon 2017-11-13 02:34:04 UTC
RTC time: Mon 2017-11-13 02:33:44
Time zone: America/New_York (EST, -0500)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no