[ntp:questions] NTP rejects refclock

Martin Burnicki martin.burnicki at meinberg.de
Tue Jan 31 08:46:17 UTC 2012


Paul,

pc wrote:
> Martin,
>
> Many thanks for your invaluable help/vielen Dank fuer Ihre sehr
> wertvolle Hilfe!

Gern! Great it did indeed help al little bit to get this working.

> I was unaware of cu,

You could use any terminal program, or even run "cat /dev/ttyS0", but 
the advantage of cu is IMO that you can simply specify baud rate, 
parity, etc. on the command line.

> but I was able to use to to verify that /dev/
> ttyS0 was in fact
> showing the correct ASCII strings. From there it was relatively easy
> to get
> everything up&  running.

Fine!

> Now there are two remaining issues:
>
>   - Why did 'ntpq -c clockvar' show refclock_states="*NOMINAL" and
> incrementing every second
>     even when there was no cable plugged into the serial port?
>     I'm tempted to regard this as a violation of the Principle of Least
> Astonishment.

Hm, I agree but I must admit I'm not too familiar with the details how 
ntpd interacts with the refclock drivers.

>   - The OS (CentOS, which is a close relative of RedHat) deletes
> everything in /dev
>     each time it is booted. Is there some recommended way of setting up
> the link
>     /dev/refclock-0 ->  /dev/ttyS0?

This is intentional to reduce the number of device nodes to those which 
are actually used, and is handled by the udev system which comes with 
Linux kernels 2.6.x and newer.

Beside the way unruh has already mentioned to add an udev rule which 
creates the symlink there may be other possibilities as well. For 
example, on openSUSE Linux you can also use the configuration tool 
"yast" to configure a refclock to be used with ntpd, and in this case 
the startup script creates the symlink if required for the configuration.

I'm not sure if RedHat/CentOS provide something like this.


Regards,

Martin
-- 
Martin Burnicki

Meinberg Funkuhren
Bad Pyrmont
Germany



More information about the questions mailing list