Re: [chrony-users] Getting time synchronization offset from chronyd |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
- To: chrony-users@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-users] Getting time synchronization offset from chronyd
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Wed, 15 Jul 2020 14:35:36 +0200
- Authentication-results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mlichvar@xxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594816580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pLscGxVZgvPCoiObkI88SNEBcakpGZ5si7QMLS9MW7Q=; b=H3AjZtBaHmvuzYMhnYQqeEcDzteObItuIbzkKXPhtBSH+fHBefsR8jxbLi86h4yke0Bf+0 Pd+3qix3AjwlYm4G3NfHtLI30Kxprb2TUfKQj9PAucb+3hiidyo6qApNnMyfCpJyLAQZII 5LafjE+xjenClSZllfYhaTQXui2x7GM=
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.