Re: [chrony-users] Large corrections with no network connectivity

[ Thread Index | Date Index | More Archives ]

William G. Unruh   |  Canadian Institute for|     Tel: +1(604)822-3273
Physics&Astronomy  |     Advanced Research  |     Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology |     unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1     |      and Gravity       |

On Tue, 22 Apr 2014, slippyr4 wrote:

Hi All,
I'm using chrony on a raspberry pi based datalogger, which has no internet access, period. I have an I2C RTC
attached to the pi to maintain time when it's powered down.

I am using gpsd and linuxpps for my time source. To that end, i have this in chrony.conf:-

refclock PPS /dev/pps0 lock SHM0 poll 1 prefer
refclock SHM 0 offset 0.125 delay 0.2 refid SHM0 poll 2 noselect

It works well. However. a few days ago I managed to drop the box with my pi in and the battery fell out of the RTC.
Next boot, it's 1970,

I'd like to find a way for chrony to correct that time rapidly.

Well, you could do it with chronyc and ask it to set the rtc. Of course I do
not know if chrony can actually access and control the add on rtc you have.
hwclock should be able to do it. You can also tell chrony to jump the system
clock if the time is out by more than say 100 sec. That way the system clock would be on time, and then you could use hwclock to set the rtc. This sounds like a one-off event, so any of those should work. initstepslew in
te config file is for problems each time the system is brought up (eg for a
RPi without an rtc).

It looks like initstepslew is almost what I want, but not quite - because it wants to operate with ntp servers on
the network, which are not available?

Can chrony do this, or am I going to need to write some sort of script to set the hardware clock manually if it's
wildy out? It'd be a shame if chrony couldn't do this for me.



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+