[ntp:questions] No PPSAPI WinNT with NMEA flag1 1 ntpd 4.2.7p238-o

Mark C. Stephens marks at non-stop.com.au
Tue Feb 7 01:11:57 UTC 2012


Hi Dave, Apologies, I should refrain from doing email at 4am after being up all night. Things are a bit fuzzy by then..


Okay, I didn't make a clear picture did I..

The Windows guy is actually performing really well on the booby prize ;)

ntpq> peer
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*GPS_NMEA(1)     .GPS.            0 l    -   16  377    0.000   -0.145   0.006
+ntp             .GPS.            1 s   44   64  376    0.285    0.624   0.051

ntpq> rv 28263
associd=28263 status=964a conf, reach, sel_sys.peer, 4 events, sys_peer,
srcadr=GPS_NMEA(1), srcport=123, dstadr=127.0.0.1, dstport=123, leap=00,
stratum=0, precision=-9, rootdelay=0.000, rootdisp=0.000, refid=GPS,
reftime=d2daf4bf.814fa2d5  Tue, Feb  7 2012 11:54:23.505,
rec=d2daf4c0.1efe3f37  Tue, Feb  7 2012 11:54:24.121, reach=377,
unreach=0, hmode=3, pmode=4, hpoll=4, ppoll=4, headway=0, flash=00 ok,
keyid=0, ttl=159, offset=-0.124, delay=0.000, dispersion=0.233,
jitter=0.006,
filtdelay=     0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00,
filtoffset=   -0.12   -0.13   -0.13   -0.13   -0.13   -0.13   -0.13   -0.13,
filtdisp=      0.00    0.24    0.48    0.72    0.96    1.20    1.44    1.68
ntpq> cv 28263
associd=28263 status=0011 1 event, clk_no_reply,
device="NMEA GPS Clock", timecode="$GPZDA,005440,07,02,2012,+00,00",
poll=1732, noreply=1, badformat=0, baddata=0, fudgetime2=-495.000,
stratum=0, refid=GPS, flags=1

ppsapi in use:

C:\Program Files\NTP\bin>ntpd.exe -n  -M -N -c "C:\Program Files\NTP\etc\ntp.conf"
 7 Feb 11:57:06 ntpd[2748]: ntpd 4.2.7p238-o Dec 10 4:46:28.43 (UTC-00:00) 2011  (1)
 7 Feb 11:57:06 ntpd[2748]: Raised to realtime priority class
 7 Feb 11:57:06 ntpd[2748]: MM timer resolution: 1..1000000 msec, set to 1 msec
 7 Feb 11:57:06 ntpd[2748]: Performance counter frequency 1263.430 MHz
 7 Feb 11:57:06 ntpd[2748]: Clock interrupt period 15.625 msec (startup slew 0.2 usec/period)
 7 Feb 11:57:06 ntpd[2748]: Windows clock precision 15.625 msec, min. slew 6.400 ppm/s
 7 Feb 11:57:06 ntpd[2748]: HZ 64.000 using 43 msec timer 23.256 Hz 64 deep
 7 Feb 11:57:08 ntpd[2748]: proto: precision = 0.800 usec
 7 Feb 11:57:08 ntpd[2748]: Listen and drop on 0 v4wildcard 0.0.0.0:123
 7 Feb 11:57:09 ntpd[2748]: Listen normally on 1 NIC1 192.168.5.8:123
 7 Feb 11:57:09 ntpd[2748]: Listen normally on 2 MS TCP Loopback interface 127.0.0.1:123
 7 Feb 11:57:09 ntpd[2748]: peers refreshed
 7 Feb 11:57:09 ntpd[2748]: GPS_NMEA(1) serial /dev/gps1 open at 9600 bps
time_pps_create(4) got winhandle 00000620
getenv(PPSAPI_DLLS) gives c:\serialpps\serialpps-ppsapi-provider\x86\serialpps-ppsapi-provider.dll
loaded PPSAPI provider serialpps.sys, serial.sys with CD timestamping added caps 0x3011 provider 00B6F710
serialpps prov_time_pps_create(00000620) returned 0
 7 Feb 11:57:09 ntpd[2748]: 0.0.0.0 c012 02 freq_set ntpd 12.854 PPM
 7 Feb 11:57:09 ntpd[2748]: 0.0.0.0 c016 06 restart
 7 Feb 11:57:09 ntpd[2748]: DNS ntp.non-stop.com.au -> 192.168.5.112
 7 Feb 11:57:09 ntpd[2748]: Using user-mode PPS timestamp for GPS_NMEA(1)
 7 Feb 11:57:18 ntpd[2748]: 0.0.0.0 c61c 0c clock_step +0.171031 s
 7 Feb 11:57:34 ntpd[2748]: HZ 64.000 using 43 msec timer 23.256 Hz 64 deep
 7 Feb 11:57:36 ntpd[2748]: 0.0.0.0 c615 05 clock_sync
 7 Feb 11:57:36 ntpd[2748]: 0.0.0.0 c618 08 no_sys_peer
 7 Feb 11:58:24 ntpd[2748]: 0.0.0.0 0613 03 spike_detect -0.193186 s

Config:
keys "C:\Program Files\NTP\etc\ntp.key"
trustedkey  <removed> 
requestkey <removed>
controlkey <removed>
driftfile "D:\NTP\ntp.drift"
#
# enable calibrate
#
#server 127.127.22.1 minpoll 4 maxpoll 4 
#fudge 127.127.22.1 time1 -0.525 flag3 1
server 127.127.20.1 mode 24 minpoll 4 maxpoll 4 # prefer # noselect  # NMEA serial port, 16 = 9600 baud, 8 = $GPZDA
fudge 127.127.20.1 flag1 1 time2 -0.495
peer ntp.non-stop.com.au
# Aussie time servers
<removed> 
<removed> 
<removed> 
<removed> 
logconfig =clockevents +syncevents +sysevents +clockstatus +syncstatus +sysstatus +clockinfo +syncinfo +sysinfo +clockall +syncall +sysall
enable stats
statsdir D:\ntp\stats
statistics loopstats peerstats clockstats

Dave, does compiling in debug code affect performance and accuracy?


Many thanks,
Mark



-----Original Message-----
From: Dave Hart [mailto:hart at ntp.org] 
Sent: Tuesday, 7 February 2012 7:54 AM
To: Mark C. Stephens
Cc: questions at lists.ntp.org
Subject: Re: [ntp:questions] timing issue with a HP 58534A

On Mon, Feb 6, 2012 at 16:58, Mark C. Stephens <marks at non-stop.com.au> wrote:
> Concentrating on the freebsd box:
>
>  7 Feb 00:22:51 ntpd[5091]: ntpd exiting on signal 15
>  7 Feb 00:22:52 ntpd[5117]: proto: precision = 2.236 usec
>  7 Feb 00:22:52 ntpd[5117]: ntp_io: estimated max descriptors: 11095, 
> initial socket boundary: 20
>  7 Feb 00:22:52 ntpd[5117]: Listen and drop on 0 v4wildcard 0.0.0.0 
> UDP 123
>  7 Feb 00:22:52 ntpd[5117]: Listen and drop on 1 v6wildcard :: UDP 123
>  7 Feb 00:22:52 ntpd[5117]: Listen normally on 2 em0 192.168.5.112 UDP 
> 123
>  7 Feb 00:22:52 ntpd[5117]: Listen normally on 3 lo0 fe80::1 UDP 123
>  7 Feb 00:22:52 ntpd[5117]: Listen normally on 4 lo0 ::1 UDP 123
>  7 Feb 00:22:52 ntpd[5117]: Listen normally on 5 lo0 127.0.0.1 UDP 123
>  7 Feb 00:22:52 ntpd[5117]: peers refreshed
>  7 Feb 00:22:52 ntpd[5117]: Listening on routing socket on fd #26 for 
> interface updates
>  7 Feb 00:22:52 ntpd[5117]: GPS_NMEA(0) serial /dev/gps0 open at 9600 
> bps
>  7 Feb 00:22:52 ntpd[5117]: GPS_NMEA(0) 8011 81 mobilize assoc 60778
>  7 Feb 00:22:52 ntpd[5117]: 192.168.5.8 8011 81 mobilize assoc 60779
>  7 Feb 00:22:52 ntpd[5117]: 0.0.0.0 c016 06 restart
>  7 Feb 00:22:52 ntpd[5117]: 0.0.0.0 c012 02 freq_set kernel 119.785 
> PPM
>  7 Feb 00:22:53 ntpd[5117]: GPS_NMEA(0) 8024 84 reachable
>  7 Feb 00:22:53 ntpd[5117]: GPS_NMEA(0) 903a 8a sys_peer
>  7 Feb 00:22:53 ntpd[5117]: 0.0.0.0 c415 05 clock_sync
>  7 Feb 00:23:19 ntpd[5117]: 192.168.5.8 8024 84 reachable
>  7 Feb 00:24:13 ntpd[5117]: GPS_NMEA(0) 931a 8a sys_peer
>
> I can't see any sign of a whinge?

Assuming I remember correctly that you're using 4.2.6p5 on the freebsd box (I'm sorry, with multiple issues bouncing back and forth at the same time, it would help to keep reminding of details like which ntpd version on which OS with which ntp.conf), the code in 4.2.6p5 is:

	NLOG(NLOG_CLOCKINFO)
		msyslog(LOG_WARNING, "%s flag1 1 but PPSAPI fails",
			refnumtoa(&peer->srcadr));

This means the whinging is conditional on your logconfig -- with logconfig =allall (or =clockall or =clockinfo) and fudge flag1 1 you should see a message logged if PPSAPI fails.  On the latest ntp-dev 4.2.7, the same message is logged, but it's not conditionalized under clockinfo (no NLOG).

On Windows PPSAPI will not work unless you install the separately-distributed serialpps package, but as a booby prize you have the nonstandard. low-performance, and finicky user-mode PPS timestamping available on the first NMEA sentence after each PPS event.

Cheers,
Dave Hart




More information about the questions mailing list