[systemd-devel] timesyncd: Frequent polling when no server could be reached

Florian Lindner mailinglists at xgm.de
Tue Aug 26 10:26:38 PDT 2014


>>> > Another question I have is about the NTP status output of timedatectl.
>>> >
>>> > Right now (with ntpd running) it says:
>>> >
>>> > NTP enabled: yes
>>> > NTP synchronized: no
>>> >
>>> > I suppose it need some more uptime than the 11 minutes I have
>>> > currently?
>>>
>>> Possibly, ntpd needs to clear the STA_UNSYNC flag in adjtimex to mark
>>> the clock as synchronized.
>>
>> Kay, can you comment?
> 
> If ntpd is running, timedatectl should not show "enabled: yes", we
> only look for timesyncd. Please check that again, there seems
> something wrong in the setup.
> 
> The "synchronized" flag comes straigt from the kernel like mentioned
> above, there is no other setting involved, seems like a ntpd problem.

NTP synchronized is now yes, but ntp enabled also, though timesyncd is not 
running.

Some console output:


florian at horus ~ % timedatectl 
      Local time: Di 2014-08-26 19:22:58 CEST
  Universal time: Di 2014-08-26 17:22:58 UTC
        RTC time: Di 2014-08-26 17:22:58
       Time zone: Europe/Berlin (CEST, +0200)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: yes
 Last DST change: DST began at
                  So 2014-03-30 01:59:59 CET
                  So 2014-03-30 03:00:00 CEST
 Next DST change: DST ends (the clock jumps one hour backwards) at
                  So 2014-10-26 02:59:59 CEST
                  So 2014-10-26 02:00:00 CET
florian at horus ~ % systemctl status systemd-timesyncd.service 
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; 
disabled)
   Active: inactive (dead)
     Docs: man:systemd-timesyncd.service(8)
3 florian at horus ~ % systemctl status ntpd.service                                                                                                                                                                                         
:(
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
   Active: active (running) since Di 2014-08-26 19:09:20 CEST; 15min ago
  Process: 318 ExecStart=/usr/bin/ntpd -g -u ntp:ntp -p /run/ntpd.pid 
(code=exited, status=0/SUCCESS)
 Main PID: 329 (ntpd)
   CGroup: /system.slice/ntpd.service
           └─329 /usr/bin/ntpd -g -u ntp:ntp -p /run/ntpd.pid

Aug 26 19:09:20 horus ntpd[329]: proto: precision = 0.093 usec (-23)
Aug 26 19:09:20 horus ntpd[329]: Listen and drop on 0 v6wildcard [::]:123
Aug 26 19:09:20 horus ntpd[329]: Listen and drop on 1 v4wildcard 0.0.0.0:123
Aug 26 19:09:20 horus ntpd[329]: Listen normally on 2 lo 127.0.0.1:123
Aug 26 19:09:20 horus ntpd[329]: Listen normally on 3 lo [::1]:123
Aug 26 19:09:20 horus ntpd[329]: Listening on routing socket on fd #20 for 
interface updates
Aug 26 19:09:20 horus systemd[1]: Started Network Time Service.
Aug 26 19:09:25 horus ntpd[329]: Listen normally on 4 enp4s0 
[fe80::224:1dff:fed7:99b%2]:123
Aug 26 19:09:25 horus ntpd[329]: new interface(s) found: waking up resolver
Aug 26 19:09:31 horus ntpd[329]: Listen normally on 5 enp4s0 
192.168.178.22:123
Aug 26 19:09:31 horus ntpd[329]: new interface(s) found: waking up resolver
florian at horus ~ % ls /usr/lib/systemd/ntp-units.d 
50-ntp.list  90-systemd.list
florian at horus ~ % cat /usr/lib/systemd/ntp-units.d/50-ntp.list 
ntpd.service
florian at horus ~ % cat /usr/lib/systemd/ntp-units.d/90-systemd.list 
systemd-timesyncd.service
florian at horus ~ % systemctl --version
systemd 215
+PAM -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ +SECCOMP 
-APPARMOR




More information about the systemd-devel mailing list