Re: [chrony-users] Newbie Help Needed

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


On 01/03/2018 05:48 PM, Stuart Maclean wrote:
As you can imagine, I want to keep my Linux system time in line with,
i.e. disciplined from. my reference clock C.

Can chronyc do this?  Do I have the appropriate set up for this to work?
  I must admit that all the talk of 'ref clocks' and 'locking' confuses
me no end.  I have NO idea what my .conf file would look like.

I'm somewhat new to the chrony-users list, but let's look at your request.

1) "I also have a cheap timer crystal, 32Khz, that serves as the default 'Linux system clock'. It is wildly inaccurate..."

There's a major part of your problem.

Chronyd, and ntpd for that matter, assume that the local clock has poor absolute regulation, but good relative regulation -- that translates to "the local clock is predictably bad." Yours has drift over temperature, so any solution with chronyd or ntpd is bad news.

2) "Clock C outputs a 'seconds-since-the-epoch string', call it S, if/when I send it a 'request for time'...C is temperature compensated."

So I come away with the impression that your Clock C can be depended on for hours/days, far more so than your local clock.

Do I have that right, in a nutshell?

So the "correct" answer is to forget about using NTP protocol, and make use of the seconds-since-epoch to correct your system clock. If you do this frequently enough, you should avoid step issues. I would write my own daemon that squats on the serial port. Assuming that the time is transmitted once a second, you can then convert that string appropriately, and use date(1) to set the system time. The last digit of the time send should be useful as a "downbeat" for setting the local clock. Python or Perl would be up to this task -- you don't have to write it in C.

Does your embedded system have any applications that would be affected by stepping time?

--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject. For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/