cancel
Showing results for 
Search instead for 
Did you mean: 
fmiranda
Flight Engineer Flight Engineer
Flight Engineer
  • 42.8K Views

timedatectl: NTP enabled = yes but not ntpd service running ?

Jump to solution

Hello everyone,

Very basic question, but it can be tricky sometimes, so whay not share with a broader audience for discussion right?

So on RHEL7.x if you type the command line:

#timedatectl

You will notice on the output:

NTP enabled: yes

NTP syncronized: yes

 

Then you think, wow cool, ntp is already set so let me check it:

#systemctl status ntpd

And you will see that its not even running.

All the other ntp commmands like ntpq -p or ntpstat all will fail

 

That means - well - if I need ntpd to be running I will have to install the package and setup the ntp service properly.

 

So the question is: Why does the timedatectl shows you that NTP is enabled and syncronized in the first place iv ntpd is not even installed or running ?

Just curious.

Anyone?

Labels (1)
Tags (1)
1 Solution

Accepted Solutions
ricardodacosta
Moderator
Moderator
  • 42.8K Views

ntp as a protocol was provided by ntpd in RHEL6, but in RHEL7 it is provided by another daemon called chronyd.

The configuration file for chronyd is /etc/chrony.conf, and the client side tool is chronyc.

Once you've defined your NTP servers in /etc/chrony.conf, and have restarted the chronyd, you can query your timesync using chronyc sources

Make sure that timedatectl reports that NTP is being used, if not use the command:

timedatectl set-ntp on

If you want to still use the old ntp daemon, ntpd, you need to install it, enable & start it, and also disable chronyd:

yum install -y ntp
<edit /etc/ntp.conf>
systemctl start ntpd
systemctl enable ntpd
systemctl disable chronyd

----------------------------------------------------------------------------------


If you're satisfied with the solutions provided please mark the solution as ACCEPTED.

Don't forget to thank those who helped you out with kudos!

View solution in original post

2 Replies
ricardodacosta
Moderator
Moderator
  • 42.8K Views

ntp as a protocol was provided by ntpd in RHEL6, but in RHEL7 it is provided by another daemon called chronyd.

The configuration file for chronyd is /etc/chrony.conf, and the client side tool is chronyc.

Once you've defined your NTP servers in /etc/chrony.conf, and have restarted the chronyd, you can query your timesync using chronyc sources

Make sure that timedatectl reports that NTP is being used, if not use the command:

timedatectl set-ntp on

If you want to still use the old ntp daemon, ntpd, you need to install it, enable & start it, and also disable chronyd:

yum install -y ntp
<edit /etc/ntp.conf>
systemctl start ntpd
systemctl enable ntpd
systemctl disable chronyd

----------------------------------------------------------------------------------


If you're satisfied with the solutions provided please mark the solution as ACCEPTED.

Don't forget to thank those who helped you out with kudos!

Gary
Cadet
Cadet
  • 42.7K Views
Good answers
0 Kudos
Join the discussion
You must log in to join this conversation.