[systemd-devel] Questions about timedatectl and NTP

Lennart Poettering lennart at poettering.net
Wed Apr 8 04:18:42 PDT 2015


On Tue, 07.04.15 19:26, Jakub Klinkovský (j.l.k at gmx.com) wrote:

> On 07.04.15 at 16:40, Lennart Poettering wrote:
> > On Sun, 05.04.15 13:25, Jakub Klinkovský (j.l.k at gmx.com) wrote:
> > 
> > > As per systemd 216 NEWS [1], alternative NTP implementations should add
> > > Conflicts=systemd-timesyncd.service to be recognized by systemd, which
> > > ntpd.service on Arch Linux does. But still, active ntpd.service does not seem
> > > to be recognized by timedatectl:
> > 
> > Correct, timedatectl only shows systemd-timesyncd's status now. I have
> > now updated the man page to clarify this.
> 
> After looking at the code more thoroughly, I must say that this commit [1] is
> not entirely correct and might bring some more confusion. There are two
> different states being reported. The (former) "NTP enabled" field refers to, as
> you say, only the systemd-timesyncd's status, but the "NTP synchronized" field
> is general, glibc's adjtimex is used to report the status [2].
> 
> [1]: http://cgit.freedesktop.org/systemd/systemd/commit/?id=ff5921bae27b4f3fedb339a3a32dc527c9b3a88c
> [2]:
> http://cgit.freedesktop.org/systemd/systemd/tree/src/shared/time-util.c#n864

adjtimex is mostly only useful for the NTP sync loop, hence I figured
we should continue to call this field NTP.

> > Hmm, I have now renamed this in the man page and the output to
> > "network time synchronization", to disconnect this a bit from the
> > low-level technology, and as a side-effect hopefully removing the
> > confusion with the classic ntp package.
> 
> I agree with using "network time synchronization" in the man page, but can we
> make it "timesyncd enabled" (or similar) instead of "Network Time on" in the
> timedatectl's output? The idea is to refer explicitly to systemd-timesyncd in
> order to avoid confusion with every other network time syncing tool, not only
> ntpd.

I'd like to leave this as a documentation detail. If people run more
complex NTP implementations they should really know what they are
doing anyway...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list