[ntp:questions] Re: ppstime.h missing on Debian?

Guess Next persevering_fury at hotmail.com
Wed Nov 24 22:46:04 UTC 2004


>>>The doc, ntp-4.2.0/html/pps.html refers to timepps.h
I believe you're correct. The pps.html was MUCH more recent than 
documentation I read online.

>>Just for kicks I tried installing ntp anyway to see what would happen. 
>>Nothing good. ntptime yields the following, error ridden, expected output:
>>
>>ntp_gettime() returns code 5 (ERROR)
>>    time c54b42dd.ad529fa0  Sun, Nov 21 2004  8:37:49.677, (.677042912),
>>    maximum error 2000000 us, estimated error 16 us, TAI offset 1073835988
>>ntp_adjtime() returns code 5 (ERROR)
>>    modes 0x0 (),
>>    offset 0.000 us, frequency 0.000 ppm, interval 4 s,
>>    maximum error 2000000 us, estimated error 16 us,
>>    status 0x2041 (PLL,UNSYNC,NANO),
>>    time constant 0, precision 55.136 us, tolerance 496 ppm,
>>    pps frequency 0.000 ppm, stability 0.000 ppm, jitter 0.000 us,
>>    intervals 0, jitter exceeded 0, stability exceeded 0, errors 0.

>>>How long had you been running ntpd when you got this output?
>>>What does ntpq show for peers and cl?

I realized that my ntp.conf file had some incorrect syntax so the above 
ouput is not useful. With an updated (but possible not correct) ntp.conf, 
ntptime yields the following output (ntpd has been running for 20 minutes). 
As you can see, pps is still not working.

ntp_gettime() returns code 0 (OK)
  time c54f7278.23a05138  Wed, Nov 24 2004 12:50:00.139, (.139165344),
  maximum error 571016 us, estimated error 16 us, TAI offset 1073835988
ntp_adjtime() returns code 0 (OK)
  modes 0x0 (),
  offset 0.000 us, frequency 0.000 ppm, interval 4 s,
  maximum error 571016 us, estimated error 16 us,
  status 0x2001 (PLL,NANO),
  time constant 0, precision 38.144 us, tolerance 496 ppm,
  pps frequency 0.000 ppm, stability 0.000 ppm, jitter 0.000 us,
  intervals 0, jitter exceeded 0, stability exceeded 0, errors 0.

>>>What does ntpq show for peers and cl?

Using ntpq, peer and cl produce the folowing:
ntpq> peer
     remote           refid      st t when poll reach   delay   offset  
jitter
==========================================================
ULINK_M320(0)   .WWVB.           0 l    -   64    0    0.000    0.000 
4000.00
ntpq> cl
status=0101 clk_noreply, last_clk_noreply,
device="Ultralink WWVB Receiver", timecode=, poll=25, noreply=20,
badformat=0, baddata=0, fudgetime1=0.000, stratum=0, refid=WWVB,
flags=0

Looking at this output as well as debug output produced by ntpd -dd, it 
appears that the clock is not responding to requests for data. I double 
checked that the correct serial port was used by connecting to the clock 
with minicom. By entering 'T' in the minicom console, which sends a request 
to the Ultralink 325 for information, the expected data was displayed.

In the ntpd debug output, note the "addto_syslog: configure: keyword "pps" 
unknown, line ignored" line. Is this a problem? I would think so. 
Additionally, I don't see anything about pps support. I'm going to review 
the docs for ntp compilation with pps support a few more times. Perhaps I'll 
discover something that I missed on the first several reads and compilation 
attempts.

ntpd debug output:
addto_syslog: ntpd 4.2.0 at 1.1161-r Fri Nov 19 05:38:01 PST 2004 (2)
addto_syslog: signal_no_reset: signal 13 had flags 4000000
addto_syslog: set_process_priority: Leave priority alone: priority_done is 
<2>
addto_syslog: precision = 3.000 usec
create_sockets(123)
addto_syslog: no IPv6 interfaces found
bind() fd 4, family 2, port 123, addr 0.0.0.0, flags=8
flags for fd 4: 04002
bind() fd 5, family 2, port 123, addr 127.0.0.1, flags=0
flags for fd 5: 04002
bind() fd 6, family 2, port 123, addr XXX.XXX.X.XXX, flags=8
flags for fd 6: 04002
create_sockets: ninterfaces=3
interface 0:  fd=4,  bfd=-1,  name=wildcard,  flags=0x8
              sin=0.0.0.0  bcast=0.0.0.0,  mask=255.255.255.255
interface 1:  fd=5,  bfd=-1,  name=lo,  flags=0x5
              sin=127.0.0.1  mask=255.0.0.0
interface 2:  fd=6,  bfd=-1,  name=eth0,  flags=0x9
              sin=XXX.XXX.X.XXX  bcast=XXX.XXX.X.255,  mask=255.255.255.0
init_io: maxactivefd 6
local_clock: at 0 state 0
ntp_syslogmask = 0x00002000 (=syncevents)
ntp_syslogmask = 0x00002020 (+peerevents)
ntp_syslogmask = 0x00002022 (+sysevents)
ntp_syslogmask = 0x00002f22 (+allclock)
addto_syslog: configure: keyword "pps" unknown, line ignored
getnetnum given 127.127.34.0, got 127.127.34.0
peer_clear: at 0 assoc ID 8180 refid INIT
refclock_open: fd 8 modem status 0x4166
refclock_ioctl: fd 8 flags 0x1
newpeer: 127.0.0.1->127.127.34.0 mode 3 vers 4 poll 6 6 flags 0x21 0x1 ttl 
135 key 00000000
getnetnum given 127.127.8.1, got 127.127.8.1
addto_syslog: frequency initialized 0.000 PPM from /etc/ntp.drift
local_clock: at 0 state 1
addto_syslog: system event 'event_restart' (0x01) status 'sync_alarm, 
sync_unspec, 1 event, event_unspec' (0xc010)
report_event: system event 'event_restart' (0x01) status 'sync_alarm, 
sync_unspec, 1 event, event_unspec' (0xc010)
poll_update: at 1 127.127.34.0 flags 0021 poll 6 burst 4 last 0 next 2
auth_agekeys: at 1 keys 1 expired 0
poll_update: at 2 127.127.34.0 flags 0021 poll 6 burst 3 last 0 next 3
poll_update: at 3 127.127.34.0 flags 0021 poll 6 burst 2 last 0 next 4
poll_update: at 4 127.127.34.0 flags 0021 poll 6 burst 1 last 0 next 5
poll_update: at 5 127.127.34.0 flags 0021 poll 6 burst 0 last 0 next 64
auth_agekeys: at 60 keys 1 expired 0
refclock_transmit: at 64 127.127.34.0
addto_syslog: clock ULINK_M320(0) event 'clk_noreply' (0x01)
clock ULINK_M320(0) event 'clk_noreply' (0x01)
poll_update: at 64 127.127.34.0 flags 0021 poll 6 burst 0 last 64 next 127
auth_agekeys: at 120 keys 1 expired 0





More information about the questions mailing list