Using NTP without a server, just for the Control System

87 views Asked by At

edit: I am essentially attempting to utilize the NTP code from section 5 of RFC 1129 from the command-line. Simply setting the clock, or even making an adjtime call is insufficient. I'd like to utilize the pre-existing NTP code for properly synchronizing clocks, but without the network part.

I have a system that cannot reach the internet, but has access to a high-precision clock. I would like to periodically poll that high precision clock for the time, and utilize the control system in NTP to synchronize the system clock.

Does anyone know how to feed input to NTP without faking an NTP server?

Ideally, I would be able to feed it the current time on the command-line, and have it use that as another point for synchronizing the clock.

bash ~ $ something 1416899507
1

There are 1 answers

0
hypersphere On

Looking into refclock_nmea.c it appears as though a simple mechanism would be to feed ntpd time values from GPS NMEA sentences. Alternatively, it doesn't appear to be that difficult to just implement a custom refclock driver. David Mills has a tutorial available: http://www.eecis.udel.edu/~mills/ntp/html/howto.html