[ntp:hackers] Modern FreeBSD NTP Stratum 1 server?

François Meyer fmeyer at obs-besancon.fr
Thu Dec 17 09:05:20 UTC 2015


Yes they both run ATOM driver, kernel was compiled on both. 
Here is a first set of some ntpd related info on one of them:

#########################################################

lrwxr-xr-x  1 root  wheel  5 Aug 17 09:23 /dev/pps0 -> cuau0
crw-rw----  1 uucp  dialer  0x2c Dec 17 08:41 /dev/cuau0

#########################################################

# cat /usr/src/sys/i386/conf/PPS
#
# PPS -- Generic kernel configuration file for FreeBSD/i386 PPS
#
include GENERIC
ident PPS-GENERIC
options PPS_SYNC

#########################################################

# cat  /etc/rc.conf 
hostname="kronos"
nisdomainname="xx"              # Set to NIS domain if using NIS (or NO)
nis_client_enable="YES"
keymap="fr.iso.kbd"
ifconfig_bge0="DHCP"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
hald_enable="YES"
dbus_enable="YES"
#
#
ntpd_enable="YES"
ntpd_program="/usr/local/sbin/ntpd"     # path to ntpd, if you want a different one.
ntpd_config="/etc/ntp.conf"     # ntpd(8) configuration file
ntpd_sync_on_start="NO"         # Sync time on ntpd startup, even if offset is high
ntpd_flags="-p /var/run/ntpd.pid -f /etc/ntpd.drift" # Flags to ntpd (if enabled).

#########################################################

root at kronos:~ # ntpd --version
ntpd 4.2.8p1 at 1.3265-o Thu Apr  2 15:26:50 UTC 2015 (5)

#########################################################

root at kronos:/home/fmeyer # grep -v '^#' /etc/ntp.conf
tos minsane 1 minclock 2
logconfig =syncevents +peerevents +sysevents +allclock

leapfile /etc/ntp/leap-seconds

server 127.127.22.0 # ATOM(PPS)
fudge 127.127.22.0 stratum 0 time1 0 flag2 1 flag3 1 flag4 1

server 127.127.47.0 # hp5071a
fudge 127.127.47.0 stratum 0            #
fudge 127.127.47.0 time1 0.534  # correct for the delay in receiving the answer from HP5071
                                 # estimated from a set of 'assert' timestamps (see /home/fmeyer/ntp/assert_ltfb
                                 # FM 20140725


peer saturne.obs-besancon.fr    prefer #autokey # strate 1
peer ntp-p1.obspm.fr    #autokey # strate 1

driftfile /etc/ntp.drift        # remember the drift of the local clock

statistics loopstats clockstats
statsdir /var/xntpd/
filegen peerstats file peers type day link enable
filegen loopstats file loops type day link enable
filegen clockstats file clocks type day link enable

keysdir /etc/ntp


restrict default limited kod nomodify notrap nopeer noquery
restrict -6 default limited kod nomodify notrap nopeer noquery
restrict 127.127.0.0 mask 255.255.0.0 noquery # allow referenc clocks
restrict 10.10.1.7
restrict 127.0.0.1
restrict ::1


On Thu, 17 Dec 2015, Terje Mathisen wrote:

> François Meyer wrote:
>> Hi Terje,
>> 
>> I have 2 of them running freebsd :
>
> Thanks, both of these seems to be using the ATOM driver, right?
>
> Did you compile a custom kernel or just kldload?
>
> Can you send me the relevant config files? (kldload or 'options PPS_SYNC', 
> ./configure options, rc.conf, soft links in /dev, ntp.conf...)
>
> Thanks,
> Terje
>> 
>> FreeBSD 10.1-RELEASE (PPS) #0: Thu Jan 29 09:23:25 UTC 2015
>>
>>      remote           refid      st t when poll reach   delay offset 
>> jitter
>> ============================================================================== 
>> oPPS(0)          .PPS.            0 l   52   64  377    0.000 0.000 
>> 0.002
>>  Cs5071A(0)      .5071.           0 l  20d   64    0    0.000 14.308 
>> 0.000
>> *saturne.obs-bes .PPS.            1 s   46   64  377    0.282 0.083 
>> 0.040
>>  ntp-p1.obspm.fr .XFAC.          16 s    - 1024    0    0.000 0.000 
>> 0.000
>> 
>> That one also implements a tailored Cs5071A driver reading TOD and leap 
>> info directly out of the 5071A serial line ; as you can see
>> it is currently (physically) disconnected from the Cs but was doing well 
>> with an offset averaging around 0 and a jitter around 20 ms if I remember 
>> well (polls to the Cs serial line are buffered and sync-ed with the PPS 
>> before being sent to ensure consistency).
>> 
>> The other one :
>> 
>> FreeBSD 10.1-C3 (PPS) #0: Thu Jan  8 13:25:54 UTC 2015
>> 
>> remote           refid      st t when poll reach   delay   offset jitter
>> ============================================================================== 
>> oPPS(0)          .PPS.            0 l   23   64  377    0.000 0.017 
>> 0.002
>> *ntp-p1.obspm.fr .MRS.            1 s   23   64  377   11.243 -0.043 
>> 0.255
>> 
>> I run freebsd only on those machines so I am far from a freebsd specialist 
>> but I may be able to answer/check some of the questions you might have.
>> 
>> 
>> Oe Wed, 16 Dece2015, Terje Mathsen wrote:
>> 
>>> I have been trying, unsuccessfully, for a couple of days now to replace 
>>> my old S1 server (ntp1.tmsw.no) which was entered in the pool with an 
>>> IPv6 address only:
>>> 
>>> The new server was based on PC-BSD 10.1, then I downloaded all the ports 
>>> and all the kernel source code in order to build a custom kernel.
>>> 
>>> (I first tried to simply use kldload to load the PPS modulu which seemed 
>>> to work but when configuring ntpd (latest ntp-dev code) it didn't seem 
>>> like pps was located so the ntpd binary was built without PPS support.)
>>> 
>>> Anyway, after the custom kernel was installed I did get one YES for pps 
>>> during configure, but that didn't seem to be enough, because when I load 
>>> ntpd I get messages in /var/log/messages stating that the ppsapi is 
>>> unusable. :-(
>>> 
>>> So my question to the list is: Does anyone have recent experience in 
>>> making ntpd + pps work on FreeBSD?
>>> 
>>> Terje
>>> PS. The reason I'm doing this is because the old server crashed, so I 
>>> can't simply copy all the conf files from that one. :-(
>>> 
>>> -- 
>>> - <Terje at tmsw.no>
>>> "almost all programming can be viewed as an exercise in caching"
>>> 
>>> _______________________________________________
>>> hackers mailing list
>>> hackers at lists.ntp.org
>>> http://lists.ntp.org/listinfo/hackers
>>> 
>> 
>
>
> -- 
> - <Terje at tmsw.no>
> "almost all programming can be viewed as an exercise in caching"
>
>

-- 
François Meyer    Tel : (+33) 3 81 66 69 27   Mob : 6 27 28 56 83
Observatoire de Besancon - BP1615 - 25010 Besancon cedex - FRANCE
Institut UTINAM * Universite de Franche-Comte * CNRS UMR 6213 ***


More information about the hackers mailing list