[ntp:questions] Help needed getting refclock to work

Roger Wiechman Roger at HMC.Edu
Thu Oct 16 17:22:10 UTC 2003


Hi all,

 We are having trouble getting a reference clock to work.
 Students are in need of it for a research project.

 Any help would be appreciated, and if more data is needed
 I certainly can supply.

 Thanks in advance,

         Roger, Harvey Mudd College, Claremont, CA  (roger (at) hmc.edu)

 Please respond via email as well as usenet.  Our newsserver is
 known to miss messages.  Tnx.

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

 Refclock is a Motorola Oncore which is known to be working
 correctly using WinOncore program.

 System is x86 FreeBSD version 4.8 with the following:

 ntpd ver 4.1.0-a

 in /dev:
 oncore.pps.0 -> cuaa0
 oncore.serial.0 -> cuaa0

 /etc/ntp.conf contains:
----
server 127.127.30.0 prefer
server n.n.n.n  #local stratum 2 clock
logfile /var/ntp/ntp.log
driftfile /var/ntp.drift
logconfig =all
#Stats
statsdir /var/ntp/
 statistics clockstats loopstats peerstats
 filegen clockstats file clockstats type day enable
 filegen loopstats file loopstats type day disable
 filegen peerstats file peerstats type day disable
----

 Doing "cat /dev/oncore.serial.0" I can see the Motorola binary data.

However, ntpq -c peer shows:

     remote           refid      st t when poll reach   delay   offset 
jitter
==============================================================================
*[local seconday] timekeeper.isi  2 u  845 1024  377    0.675   -1.955  
0.166

>From /var/log/message

Oct  9 18:14:36 chronos ntpd[4826]: ntpd 4.1.0-a Thu Apr  3 08:26:24 GMT
2003 (1
)
Oct  9 18:14:36 chronos ntpd[4826]: kernel time discipline status 2040
Oct  9 18:14:36 chronos ntpd[4826]: internal error: refclockio structure
not fou
nd
Oct  9 18:14:36 chronos ntpd[4826]: configuration of 127.127.30.0 failed
Oct  9 18:14:52 chronos /kernel: sio0: 25 more tty-level buffer
overflows (total
[buffer overflows are repeatedly logged, forever]

The console debug output:

chronos# ntpd -D 31
Debug1: 31 -> 1f = 31
Debug1: 31 -> 1f = 31
adding new filegen
adding new filegen
adding new filegen
adding new filegen
create_sockets(123)
interface <xl0> OK
ignoring xl0 - not AF_INET
interface <xl0> OK
interface <xl0> OK
ignoring xl0 - not AF_INET
interface <lp0> OK
ignoring lp0 - not AF_INET
interface <faith0> OK
ignoring faith0 - not AF_INET
interface <lo0> OK
ignoring lo0 - not AF_INET
interface <lo0> OK
ignoring lo0 - not AF_INET
interface <lo0> OK
ignoring lo0 - not AF_INET
interface <lo0> OK
interface <ppp0> OK
ignoring ppp0 - not AF_INET
interface <sl0> OK
ignoring sl0 - not AF_INET
bind() fd 4, family 2, port 123, addr 0.0.0.0, flags=1
flags for fd 4: 06
bind() fd 5, family 2, port 123, addr [network address], flags=1
flags for fd 5: 06
bind() fd 6, family 2, port 123, addr 127.0.0.1, flags=0
flags for fd 6: 06
create_sockets: ninterfaces=3
interface 0:  fd=4,  bfd=0,  name=wildcard,  flags=0x1
              sin=0.0.0.0  bcast=0.0.0.0,  mask=255.255.255.255
interface 1:  fd=5,  bfd=0,  name=xl0,  flags=0x1
              sin=[netork address]  bcast=n.n.n.255,  mask=255.255.255.0
interface 2:  fd=6,  bfd=0,  name=lo0,  flags=0x4
              sin=127.0.0.1  mask=255.0.0.0
init_io: maxactivefd 6
Debug2: 31 -> 1f = 31
getnetnum 127.127.30.0 step 0 buf 127 temp 127 netnum 127
getnetnum 127.127.30.0 step 1 buf 127 temp 127 netnum 32639
getnetnum 127.127.30.0 step 2 buf 30 temp 30 netnum 8355614
getnetnum 127.127.30.0 step 3 buf 0 temp 0 netnum 2139037184
getnetnum given 127.127.30.0, got 127.127.30.0 (7f7f1e00)
peer_clear: at 0 assoc ID 0
key_expire: at 0
refclock_open: fd 8 modem status 0x7
refclock_ioctl: fd 8 flags 0x20
ONCORE: stat pps_device: No such file or directory

[correct data about secondary peer]
peer_clear: at 0 assoc ID 0
key_expire: at 0
newpeer: [our address]->[seconday peer] mode 3 vers 4 poll 6 10 flags 1
1 ttl 0
k
ey 00000000
ntp_syslogmask = 0x0000ffff (=all)
enabling filegen for clockstats statistics "/var/ntp/clockstats"
enabling filegen for loopstats statistics "/var/ntp/loopstats"
enabling filegen for peerstats statistics "/var/ntp/peerstats"
configuring filegen:
        prefix: /var/ntp/
        basename:       loopstats -> loopstats
        type:   2 -> 2
        flag: 81 -> 1
configuring filegen:
        prefix: /var/ntp/
        basename:       peerstats -> peerstats
        type:   2 -> 2
        flag: 81 -> 1
authtrust: keyid 0000ffff life 1
report_event: system event 'event_restart' (0x01) status 'sync_alarm,
sync_unspe
c, 1 event, event_unspec' (0xc010)
getrecvbufs called, no action here
getrecvbufs called, no action here
auth_agekeys: at 1 keys 1 expired 0
key_expire: at 1
expire_all: at 1
key expire: at 1 next 65536
getrecvbufs called, no action here
getrecvbufs called, no action here
[this message appears repeatedly]

poll_update: at 6 [secondary peer] flags 0001 poll 6 burst 0 last 6 next
72
        MCAST   *****sendpkt(fd=5 dst=[secondary peer], src=[our
address], ttl=0
,
len=48)

[additional logged data about properly peering with the seconday]
peer [local stratum 2 address] event 'event_reach' (0x84) status
'unreach, conf,
 1 event, ev
ent_reach' (0x8014)
poll_update: at 6 [secondary address] flags 0001 poll 6 burst 0 last 6
next 72

getrecvbufs called, no action here
getrecvbufs called, no action here
[these appear every second, ad infinitum]

=== End for now ===



More information about the questions mailing list