Re: [chrony-users] Getting time synchronization offset from chronyd

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


On Wed, Jul 15, 2020 at 01:53:37PM +0200, Guy Morand wrote:
> I use *Leap status* to make sure that the time is in sync and *Last
> offset* to read the time correction.
> 
> However, after changing the system time to few hours ago and rebooting,
> I got a time correction of few milliseconds. My assumption is due to the
> "iburst" parameter, the time got corrected more than once and missed the
> biggest correction that was of few hours. Is that plausible?

Yes, it's possible to miss a clock update if you poll the daemon using
chronyc.

> * Am I reading the right field?
> * Is there a way to get events directly from the chrony daemon when a
>   time correction was done (UNIX socket) to not misse any time
>   correction?
> * Is there a better approach to achieve this?

Depends on what exactly you need. If you just need to wait for the
clock to be synchronized, maybe the chronyc waitsync command would
help?

If you really need to know about each clock update, you could enable
the tracking log. If you don't want it to be saved to disk, you could
create a named pipe and let chronyd write to that. You could also use
the mailonchange directive with your own sendmail binary and a small
threshold (e.g. 1 nanosecond), which chronyd would call on each
update.

-- 
Miroslav Lichvar


-- 
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+ http://listengine.tuxfamily.org/