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: Guy Morand <g.morand@xxxxxxxx>
- Date: Wed, 15 Jul 2020 15:14:32 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scewo-ch.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=T1vAgOjhIB0khxnBdxD5V17xHnVJlJ9UZ3ySsvInPEo=; b=mGtKcesLH//u6KjjAgwWInX6L0xmQuMuMF5ijuC0+PPgFfMY96X+Scz1v3MNLYCmUy 2BI8AQWdwx85MUrEkbIfI5MjnKgQFOYWj9eoU0y1UMOq8A9HlNaHf00JHEyb7lJ3oaMq gAN1cVlraWZ3iURZfB2IegOPOrHfRz2Iw5UetvnTqIoU3r0D1uGmHKo9vl+2l4fLYgXo tB0TbLTL1BKwa4WQW3NOfQL5XfH5xyLrYFz3l5BXpH39HYnTe+Y/RIzBlFy+ajEaCxvL 1p7rmNgGMjnTTbX0+Cwyre7dd4tW6OhiMCsWqLqgizLoAFZP7j4abXEtZRaIupUBYs+L gzXg==
Hi Miroslav!
Thanks for your quick answer and proposal for another solution to my problem.
Yes, waitsync works to make sure that the system date is in sync but I
also need to get the correction offset so that I can drop events that
are too much out of sync.
Your proposal seems more an elegant workaround than a real solution...
But at the moment, my choice would be using a named pipe log and parse
it from my application.
In the longer term, do you think it would be possible to send such of
tracking logs over the UNIX sockets as "unsollicted" event? That looks
the cleanest to me ... Any opinion against this? If not, do you think
such feature requests would be welcome?
Best regards,
Guy
On Wed, Jul 15, 2020 at 2:36 PM Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
>
> 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.
>
--
Guy Morand
Software Engineer
–
Scewo AG, Technoparkstrasse 7, 8406 Winterthur
Office +41 (0)44 500 86 03
www.scewo.ch
www.facebook.com/scewo
www.instagram.com/scewo_official
--
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.