mounty1 l33t


Joined: 06 Jul 2006 Posts: 793 Location: Queensland
|
Posted: Sat Dec 20, 2014 10:42 am Post subject: Configuration of systemd's NTP client [SOLVED] |
|
|
I'm encountering some difficulty in setting up time synchronisation and would appreciate some assistance. My local network has an NTP server, cortex, IP=192.168.1.1 and various Gentoo machines in the 192.168.1.xx range. I think the server (running OmniOS, not Gentoo) is configured correctly because the Gentoo machines can interrogate it successfully. That is, on the server: cat /etc/inet/ntp.conf: | driftfile /var/ntp/ntp.drift
statsdir /var/ntp/ntpstats/
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
restrict default ignore # Deny everyone by default
restrict 127.0.0.1 # Allow localhost full access
restrict 192.168.1.0 mask 255.255.255.0 kod nomodify notrap nopeer
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server 3.pool.ntp.org
restrict 0.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 1.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 2.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 3.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery | then if I run ntpclient as a normal user (so it doesn't actually try to set the clock): ntpclient -l -h cortex -i 10 -d: | Configuration:
-c probe_count 1
-d (debug) 1
-g goodness 0
-h hostname cortex
-i interval 10
-l live 1
-p local_port 0
-q min_delay 800.000000
-s set_clock 0
-x cross_check 1
Listening...
Sending ...
packet of length 48 received
Source: INET Port 123 host 192.168.1.1
LI=0 VN=3 Mode=4 Stratum=3 Poll=4 Precision=-22
Delay=83236.7 Dispersion=29220.6 Refid=192.189.54.17
Reference 3628060208.560218
(sent) 3628060299.527782
Originate 3628060299.527782
Receive 3628060299.771943
Transmit 3628060299.772053
Our recv 3628060299.528188
Total elapsed: 387.00
Server stall: 104.56
Slop: 282.44
Skew: 243567.00
Frequency: -958791
day second elapsed stall skew dispersion freq
xontemplate 3628060299 243567.0 29607.6 -958791
41991 37899.528 387.0 104.6 243567.0 29220.6 -958791 | and that skew figure grows about 50 (μs) per iteration. (Notice the stratum=3 which is expected, since my server is interrogating stratum 2 servers.) This is despite that systemd's NTP is enabled: # timedatectl status: | Local time: Sat 2014-12-20 20:21:17 AEST
Universal time: Sat 2014-12-20 10:21:17 UTC
RTC time: n/a
Time zone: Australia/Brisbane (AEST, +1000)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a | and apparently synchronised according to systemd. There are no other ntp clients running: ps -ef | grep ntp: | mounty 1686 1671 0 20:21 pts/5 00:00:00 ntpclient -l -h cortex -i 10 -d
root 1702 1373 0 20:24 pts/3 00:00:00 grep --colour=auto ntp | I think systemd's NTP is configured correctly: grep -v '^#' /etc/systemd/timesyncd.conf: | [Time]
NTP=cortex | so why is the clock drifting?
Another very similar machine has a skew of 8246600 μs, growing about 250 μs per 15 s, although in that case timedatectl reports (correctly) that the time is not synchronised. _________________ Michael Mounteney
Last edited by mounty1 on Tue Jan 06, 2015 8:51 pm; edited 1 time in total |
|