Re: [chrony-users] Discover when a time sync has been performed

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


On Thu, 4 Jul 2013, Ignacio Verona R� wrote:

Hi all!

First of all, say hello and thanks to the team for developing great
software like Chrony :)

My question is about checking when a time sync has been performed. I'm
developing an application where time sync is important. It's running on a
Raspberry Pi, so time is not very good kept. When the net connection is
started I notify chrony about the sources being online, and the config is
set to execute a "makestep" if more than 10secs deviation is found.

But, how may I check if the sycn (makestep) is already done? I've been
searching the logs (syslog, tracking, measurements) but don't know what may
trigger my "Sync ok!" event.

It should not ever do a makestep after the first little while. If it is,
something is badly wrong. makestep can be bad in that the file system can
become confused when it finds files that have been changed in the future. ( change the file, just then the system does a step backwards in time. Now
that file's change is in the future of the present time). What are you using
as the time server for it.

Maybe looking at the offset value and setting some threshold, so if it's
lower it's ok for the app to continue?

AGain, after the first while it should be fine. But you could always have the
app to chronyc and run the "tracking" command to see how far our chrony thinks
the time is on your system.
Script
chronyyc <<EOF
tracking
EOF
will tell you how far off chrony thinks the time is.



thanks in advance.

BR,
Ignacio.


--
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/


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