RE: [chrony-dev] makestep command sometimes makes chrony stop reading its sources

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


On Wed, 20 Jan 2010, Hattink, Tjalling (FINT) wrote:


From: Bill Unruh
Sent: Wednesday, January 20, 2010 16:11

On Wed, 20 Jan 2010, Hattink, Tjalling (FINT) wrote:


The tricky part ofcourse is handling the situations where the GPS
time
is not synchronised or when the RTC is way off. So far I've found
two
issues with Chrony regarding these border cases. In this mail I'll
describe my first issue. The second one will be in the next mail to
properly separate the discussion of both issues.

What I'm testing is how chrony recovers when the RTC is way off
during
boot. In the bios I adjust the RTC clock with one year. Because
Chrony
is only slewing the clock it would take ages to recover from this
situation, so I made a script that checks if the offset is too large

chrony already handles this, with the configuration command
initstepslew
30 124.45.6.7 means when chrony starts up, it sends a number of ntp
packets to the location 123.45.6.7 and it steps the clock to put the
chrony time into sync with that clock if chrony finds that the system
clock ( after being set with rtc) is out by more than 30 sec.

  You can adjust that 30 to anything you want.

So no need for you to make your own script.


I've looked into the initstepslew command but I think it only works for
NTP
sources, and I only have a reference clock available (SHM, PPS). Also

I am not sure about that-- ie that the initstepslew is only available for
network sources. I will have to look at the source code.

the
reference clock is not immediately available after chronyd is started.

Why not. The clock should deliver nmea time sentences almost immediately. Just make
sure that the gps clock is switched on before the machine is. (Use an external
gps like the Garmin 18).

It
takes a minute before the SHM interface starts providing time samples,
as
GPS needs to lock in. It can even take much longer, for example when the
GPS antenna is not connected during start-up, but is attached an hour
later. So even if initstepslew is able to handle reference clocks I'm
not
sure if it will work when the reference clock is not immediately
available.

So, you want to ask what to do if a) the RTC is way out, b) and all of your
external sources are non-existant. There is of course nothing that can be
done. Now an external source turns on. You can now restart chrony after those
sources turn on. One of the features of chrony is that it allows you to enter
the time by hand. Ie, if your server comes up in that situation, you can use
chronyc to have you look at your calendar and your wristwatch and set the time.

(Of course in that case, just using "date" would work as well.)

What would you imagine that chrony could do in such a situation?


Of course all of this off the main point, that doing a makestep can cause
chrony to stop working altogether (at least with refclocks), which is a very valid bug if true.




Best regards,

Tjalling Hattink


--
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       |  www.theory.physics.ubc.ca/

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


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