[ntp:questions] enable pps not working from ntp.conf
Brian Inglis
Brian.Inglis at SystematicSw.ab.ca
Wed Jan 8 15:24:05 UTC 2014
On 2014-01-07 19:40, Dennis Golden wrote:
> On Wed, 08 Jan 2014 01:46:55 +0000, William Unruh wrote:
>
>> On 2014-01-07, Dennis Golden <dgolden at golden-consulting.invalid> wrote:
>>> I have searched to find an answer to this problem with no success. I am
>>> using the oncore clock (127.127.30.0) and have included "enable pps" in
>>> ntp.conf, but I get the following in /var/log messages:
>>>
>>> line 59 column 8 syntax error, unexpected T_String syntax error in
>>> /etc/ntp.conf line 59, column 8
>>>
>>> I can use ntpdc to set this option with no problem.
Remove the no longer supported "enable pps" line from ntp.conf;
for diagnostic info, change logconfig to:
logconfig =allall
and after filegen lines, add:
enable stats
statistics clockstats loopstats peerstats protostats
as protostats will show you ntpd's view of driver or server issues.
Depending on your OS and Oncore model there may be some setup required, see:
https://web.archive.org/web/19991005234036/http://phk.freebsd.dk/ntp, as the
link on the Oncore driver 30 web page is to a lost PHK web page, or check the
source for ntpd/refclock_oncore.c:
* This code uses the two devices
* /dev/oncore.serial.N
* /dev/oncore.pps.N
* which may be linked to the same device.
e.g. cd /dev ; ln -s ttySN oncore.serial.N ; ln -s ttySN oncore.pps.N
or cd /dev ; ln -s cuaXN oncore.serial.N ; ln -s cuaXN oncore.pps.N
where N is the serial device unit number also used in 127.127.30.N;
if you have a kernel PPS driver installed, symlink that as the pps device:
see current BSD or Linux kernel PPS instructions;
at startup you may need to set the serial device to the equivalent of:
stty speed 9600 -parenb cs8 -cstopb raw
or ppsldisc on Linux.
driver 30 requires Oncore binary data and you may need a PPS pulse stretcher
to allow the serial port sufficient time to detect the signal, see:
http://www.tapr.org/kits_fatpps.html
if you do not have PPS available you will have to run the Oncore in NMEA mode
with NMEA driver 20.
> line 59 was in quotes in the initial post
>
> Here it is:
> ==Start==
> ################################################################################
> ## /etc/ntp.conf
> ##
> ## Sample NTP configuration file.
> ## See package 'xntp-doc' for documentation, Mini-HOWTO and FAQ.
> ## Copyright (c) 1998 S.u.S.E. GmbH Fuerth, Germany.
> ##
> ## Author: Michael Andres, <ma at suse.de>
> ##
> ################################################################################
>
> ##
> ## Radio and modem clocks by convention have addresses in the
> ## form 127.127.t.u, where t is the clock type and u is a unit
> ## number in the range 0-3.
> ##
> ## Most of these clocks require support in the form of a
> ## serial port or special bus peripheral. The particular
> ## device is normally specified by adding a soft link
> ## /dev/device-u to the particular hardware device involved,
> ## where u correspond to the unit number above.
> ##
> ## Generic DCF77 clock on serial port (Conrad DCF77)
> ## Address: 127.127.8.u
> ## Serial Port: /dev/refclock-u
> ##
> ## (create soft link /dev/refclock-0 to the particular ttyS?)
> ##
> # server 127.127.8.0 mode 5 prefer
> server 127.127.30.0
> #server 127.127.20.0 mode 2 prefer
> #fudge 127.127.20.0 flag1 1 flag2 0 flag3 1 time1 0.0
> #fudge 127.127.20.0 time2 0.22
>
> ##
> ## Undisciplined Local Clock. This is a fake driver intended for backup
> ## and when no outside source of synchronized time is available.
> ##
> server 127.127.1.0 # local clock (LCL)
> fudge 127.127.1.0 stratum 10 # LCL is unsynchronized
>
> ##
> ## Outside source of synchronized time
> ##
> peer 192.168.1.2 # Local network peer
>
> # External puplic access servers
> # server time.nist.gov # NCAR Boulder, Colorado
> server ntppub.tamu.edu # Texas A&M
> server nist.time.nosc.us # NIST Carrollton, Texas
> server navobs1.wustl.edu # Washington University, St.
> Louis, Missouri
> server ntp-1.ece.cmu.edu # Carnegie Mellon Electrical and
> Computer Engineering
> server ntp.tmc.edu # Baylor College of Medicine,
> Houston, TX
>
> ##
> ## Miscellaneous stuff
> ##
>
> enable pps
>
> driftfile /var/lib/ntp/drift/ntp.drift # path for drift file
>
> logfile /var/log/ntp # alternate log file
> # logconfig =syncstatus + sysevents
> logconfig =all
>
> statsdir /var/lib/ntp/tmp/ # directory for statistics files
> filegen peerstats file peerstats type day enable
> filegen loopstats file loopstats type day enable
> filegen clockstats file clockstats type day enable
>
> #
> # Authentication stuff
> #
>
> keys /etc/ntp.keys # path for keys file
> trustedkey 1 2 3 4 5 6 14 15 # define trusted keys
> requestkey 15 # key (7) for accessing server variables
> controlkey 15 # key (6) for accessing server variables
>
> #
> # Access Control
> #
>
> restrict default noquery nomodify notrap nopeer # IPv4
> restrict -6 default noquery nomodify notrap nopeer # IPv6
> restrict 192.168.1.0 # allow local domain
> restrict 127.0.0.1 # allow local host
> ==end==
>
> I'm using 4.2.6p5.
>
> TIA,
>
> Dennis
>
--
Take care. Thanks, Brian Inglis
More information about the questions
mailing list