1

How can it be synchronized but not enabled? Redhat 7.4 Date and time are right. ntpq -p shows it's connected to a remote ntp server. Systemctl status ntp shows its enabled. Nothing in /var/log/messages indicates any errors. Is this some normal state that I just don't understand?

timedatectl
      Local time: Thu 2020-10-01 14:24:30 UTC
  Universal time: Thu 2020-10-01 14:24:30 UTC
        RTC time: Thu 2020-10-01 14:24:30
       Time zone: UTC (UTC, +0000)
     NTP enabled: no
NTP synchronized: yes
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled;

1 Answer 1

1

The timedatectl command reports that NTP is in use when either chronyd or systemd-timesyncd is enabled and running. Chronyd is a lightweight NTP client and systemd-timesyncd is a lightweight SNTP client. Both are suitable for most servers and workstations.

Timedatectl looks for an NTP/SNTP server via D-Bus, so it does not recognize the ntpd service, which is designed to be both an NTP client and server, and now that we have dedicated NTP client software, is no longer favored for systems that don't need to serve NTP to other systems or use specialized hardware such as GPS to obtain the time.

3
  • More succinctly, yum remove chrony and timedatectl set-ntp true and it should work. unix.stackexchange.com/questions/317346/… Oct 1, 2020 at 18:33
  • I thought timedatectl checked the adjtimex system call and checked the return for if it had ever been synced to NTP. ntpd still functions to sync clocks on client devices. But Red Hat recommends chrony, which also works fine. Oct 1, 2020 at 21:31
  • @JohnMahowald I took a quick look at the timedatectl source. It looks for an NTP server by sending out a D-Bus query. AFAIK ntpd doesn't respond to such queries, while systemd-timesyncd and chronyd do. Oct 2, 2020 at 0:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .