[ntp:questions] Re: synch on the local clock

Jan Ceuleers janspam.ceuleers at computer.org
Thu Oct 23 18:47:59 UTC 2003


On Thu, 23 Oct 2003 09:07:47 +0200, "Alexandre Bossot"
<Alexandre-Bossot at cartes-bancaires.com> wrote:

>I have a DC77 clock reciever whitch seems to be up and ok, but ntpq seems
>to synch on the local clock of my AIX box.
>
>I've tried a lot of different ntp.conf, but it didn't worked

A few things to check:

1. Some serially-connected DCF77 receivers need to be powered by the
serial port. This is achieved by setting e.g. DTR and RTS to
particular levels. Unlike you I am using the PARSE driver for my DCF77
receiver. The various ways of powering receivers are selected by the
mode keyword on the server configuration line in ntp.conf:

server 127.127.8.0 mode 16

You should check the docs for your receiver and those for the driver
that you are using to make sure that the receiver is being powered
correctly.


2. Make sure that ntp is looking for the receiver on the correct port.
For example, I've created the following symlink:

lrwxrwxrwx    1 root     root            5 Sep 27 21:03
/dev/refclock-0 -> ttyS0

The above is for the PARSE driver and the first serial port ("COM1").
Check the docs for your driver.


3. If your receiver is supported by the PARSE driver (no. 8), then you
should be able to use the testdcf program included in the parseutil
directory of the ntpd distribution to check that the receiver is
indeed working.


4. Another way to monitor the status is to use the "cv" command in
ntpq, as follows:

[root at penta ntp-4.2.0]# ntpq
ntpq> la
ind assID status  conf reach auth condition  last_event cnt
===========================================================
  1 10212  9014   yes   yes  none    reject   reachable  1
  2 10213  96f5   yes   yes  none  sys.peer  clock expt 15
  3 10234  b414   yes   yes  none  candidat   reachable  1
  4 10235  b414   yes   yes  none  candidat   reachable  1
  5 10236  b314   yes   yes  none   outlyer   reachable  1
  6 10237  b314   yes   yes  none   outlyer   reachable  1
  7 10238  b314   yes   yes  none   outlyer   reachable  1
  8 10239  b414   yes   yes  none  candidat   reachable  1
  9 10240  b314   yes   yes  none   outlyer   reachable  1
ntpq> cv 10213
status=0001 clk_okay, last_clk_noreply,
device="RAW DCF77 CODE (DTR CLR/RTS SET)",
timecode="-----------#-----D--S1-4---4P-----2P12---2--4----112------P",
poll=5618, noreply=177, badformat=2688, baddata=0, fudgetime1=241.690,
fudgetime2=0.000, stratum=0, refid=DCFa, flags=0,
refclock_time="c342a04a.00000000  Thu, Oct 23 2003 18:45:30.000 UTC",
refclock_status="DST; TIME CODE; (LEAP INDICATION; ANTENNA)",
refclock_format="RAW DCF77 Timecode",
refclock_states="*NOMINAL: 3d+17:14:00 (88.64%); NO RESPONSE: 01:04:29
(1.06%); FAULT: 00:00:01 (0.00%); ILLEGAL DATE: 10:21:34 (10.29%);
ILLEGAL TIME: 00:00:02 (0.00%); running time: 4d+04:40:06"

So: start ntpq and execute the "la" command to list the existing
associations. Locate the association corresponding with your DCF
clock. In my case that is the 2nd one, with association ID 10213. Then
run the "cv" command on that association ID. This will display a load
of status info as shown above.

Hope this helps.

Jan





More information about the questions mailing list