CentOS 7 And Ntp
I’ve curious about where and how CentOS 7 gets its ntp configuration from.
When I installed the operating system, I went through this page and told it to use “network time”, as shown:
http://media.if-not-true-then-false.com/2014/07/06-CentOS-7-date-and-time-748×560.png
I just discovered that i don’t actually have ntp installed on this computer, though the rpm does exist when I search for it with yum.
I do have ntpdate installed, but can’t find any configuration files that specify the timeservers that it’s supposed to be using.
I don’t have a /etc/ntp.conf file, and a grep of /var/log/messages doesn’t yield any lines containing the string ntp either.
My computer’s clock is not inaccurate, so I guess that ntp is working somewhere behind the scenes here, but it sure is well hidden.
Where is ntp and its configuration hiding? Why isn’t it logging what it’s doing?
3 thoughts on - CentOS 7 And Ntp
Frank Cox wrote:
Maybe You have installed chrony instead of ntp.
Apparently so. I see that /var/lib/chrony/drift is dated just a few minutes ago, so that must be the answer.
I have a line in /etc/chrony.conf that’s commented out as follows:
#log measurements statistics tracking
The commenting-out on that line likely accounts for the fact that there are no log entries, either.
Thanks for solving the mystery!
I have the idea, from,… somewhere,… that chrony may now be the default ntp agent in Fedora/RHEL and by extension, CentOS.
I used to use it years ago when I was still stuck on dialup, because it works well with systems that do not have persistent network access, and I found it to work quite well.