0

I need a stable configuration, presumably using ntpd, to keep system clock as precise as possible.

Background: I have several embedded devices (arm9) running linux (currently: 3.16.1 / debian 7.2) that are powered up at random intervals (some may be up 24/7, but others may be up only a few hours/week); they may or may not be connected to the Internet (each station is likely to have an intermittent connection). Hardware includes a passable RTC (drifts a few sec/week), while system clock seems much worse (at least one order of magnitude).

Constraint (IMPORTANT): System time should be strictly monotonic (i.e.: adjustments may slow the clock but should never jump back).

What I would like to do is to use the RTC to keep SystemClock stable and, if connection is available, some external NTP server to correct RTC drift.

Can this be done with stock software? What's the "best practice" in this situation?

I am aware of clock, hwclock, adjtimex, chrony and a few other programs, but they do not seem to do what I need. Did I miss something?

ZioByte
  • 296
  • 4
  • 17
  • Eh? chrony seems ideal for this. – Michael Hampton Jan 30 '15 at 17:12
  • @MichaelHampton: IIRC chrony does not use the RTC; it tries to compensate drift of sysclock. Did I miss something? – ZioByte Jan 30 '15 at 17:18
  • It's plainly documented in the chrony manual! See [how the software works](http://chrony.tuxfamily.org/manual.html#Dial_002dup-overview) and [rtcautotrim](http://chrony.tuxfamily.org/manual.html#rtcautotrim-directive) among others... – Michael Hampton Jan 30 '15 at 17:32
  • @MichaelHampton: I'll give it a try. I misread the rtcautotrim part and it seemed to me chrony only updated RTC from SysClock and not viceversa. I stand corrected. Thanks. – ZioByte Jan 30 '15 at 18:05

0 Answers0