[systemd-devel] Questions about timedatectl and NTP

Jakub Klinkovský j.l.k at gmx.com
Wed Apr 8 07:11:41 PDT 2015


On 08.04.15 at 13:18, Lennart Poettering wrote:
> On Tue, 07.04.15 19:26, Jakub Klinkovský (j.l.k at gmx.com) wrote:
> > 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.

That's not what I meant. The man page for 'timedatectl status' currently says:

    Show current settings of the system clock and RTC, including whether
    network time synchronization is enabled. Note that the network time
    synchronization state simply reflects whether the systemd-timesyncd.service
    unit is enabled. ...

The "time synchronization state" in this context refers to both fields reported
by timedatectl status, "Network Time on" and "NTP synchronized". I think there
is more disambiguation needed.

As a nitpick, the example in the man page still shows "NTP enabled" instead of
"Network Time on" in the timedatectl's output:
http://cgit.freedesktop.org/systemd/systemd/tree/man/timedatectl.xml#n198

-- 
Jakub Klinkovský
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150408/e25094fc/attachment.sig>


More information about the systemd-devel mailing list