timeembedded-linuxyoctosystemdntp

Embedded Linux distribution executes a NTP client not intentionally installed. But which?


I'm trying to manage the system time of an yocto-base Linux distribution (zeus release) by NTP (Network Time protocol).

I know that an available NTP client is ntpdate, bu without installing ntpdate, the system time synchronizes itself with a not known NTP server.
The system is connected to Internet by a WiFi network and if I disconnect it from Internet the date synchronization stops. This proofs that there is a process running on my distribution which set the system date by a connection to a not known NTP Server.

Because the distribution comes from the yocto core image core-image-minimal.bb, it is one of the packages installed by it which adds a NTP client to the distribution.
But which is this client?

I hope I was clear! Don't hesitate to ask for more details.


Solution

  • By default (and so without that I know it) in my Linux distribution has been installed the systemd service: systemd-timesyncd.

    This service starts automatically at boot and, by default, try to connect to one of the following public NTP Server:

    time1.google.com time2.google.com time3.google.com time4.google.com
    

    So it is systemd-timesyncd that gets the UTC date and time from one of the previous servers.

    About the list of default NTP servers it is useful read the following info from the timesyncd.conf man page:

    CONFIGURATION DIRECTORIES AND PRECEDENCE
    The default configuration is defined during COMPILATION, so a configuration file is only needed when it is necessary to deviate from those defaults. By default, the configuration file in /etc/systemd/ contains commented out entries showing the defaults as a guide to the administrator. This file can be edited to create local overrides.