For Centos/Fedora I would be looking at the systemd service file for
chronyd (along with the /etc/system file I mentioned), but I do not know
how Debian flavors manage services.
On 1/4/19 2:00 PM, Catherine Newman wrote:
Thanks very much Miroslav & Robert - I find the little things just
help so much!
A few follow ups:
- I'm running: Raspbian Stretch Lite 4.14 (based on Debian
Stretch) and Chrony 3.4-1 with the Adafruit PiRTC - PCF8523
- Yes, the RPI & RTC dates are way off ... so,
- How do I ensure that '*chronyd is started with the -s
option' programmatically? *(my RPI will just reboot when power
is restored and I am not around for that)
Catherine
On Fri, Jan 4, 2019 at 1:23 AM Miroslav Lichvar <[email protected]
<mailto:[email protected]>> wrote:
On Thu, Jan 03, 2019 at 05:56:36PM -0800, Catherine Newman wrote:
> I have enabled chrony and disabled systemd-timesyncd.service.
Using rtcfile
> works well when I reboot the RPI from the command line but when
I do a hard
> powercycle (abruptly unplug it and then plug it back in) both
the system
> time and the RTC time are funky (and not the same).
Are they completely different, or just off by a whole number of hours?
The former would indicate the kernel is not setting the system time
from the RTC. chronyd -s should take care of that.
> What directives can I play with / what chrony.conf might you
recommend for
> me to take my timekeeping to the next level? and hopefully give
me the
> robust timekeeping I so desire out in the field.
I think a recommended configuration would look something like this:
1) chronyd started with the -s option
2) rtcfile and driftfile specified in chrony.conf
3) rtcdevice specified in chrony.conf if /dev/rtc doesn't point to the
right RTC
4) "chronyc writertc" called few minutes after chronyd is started and
has synchronized the clock (e.g. using chronyc waitsync) and then
called periodically using a cron job (e.g. few times per day) to
keep the rtcfile up to date in case the power is lost
If that doesn't work well, it would help to see your config files,
chronyd messages in the system log, and the chronyd's tracking and rtc
logs.
--
Miroslav Lichvar
--
To unsubscribe email [email protected]
<mailto:[email protected]>
with "unsubscribe" in the subject.
For help email [email protected]
<mailto:[email protected]>
with "help" in the subject.
Trouble? Email [email protected]
<mailto:[email protected]>.