|Re: [chrony-users] Getting chrony status|
[ Thread Index |
| More chrony.tuxfamily.org/chrony-users Archives
On Tue, Aug 09, 2016 at 09:47:28AM +0200, Mauro Condarelli wrote:
> Il 08/08/2016 10:34, Miroslav Lichvar ha scritto:
> > "time has settled down", you might need to check also the "System
> Problem is on target I have unreliable Internet connection.
> This means i might not have connection at all at boot-time.
> In this condition it's ok to rely on RTC alone.
> What I need is to be sure chronyc did require initializations (e.g.: it did set system clock from RTC) even if not fully synchronized.
If you need to wait for "chronyd -s" to set the system clock from the
RTC, just wait until the foreground chronyd process exits. If it's
started from an init script (or systemd service with Type=Forking),
the clock will be already set when the service is ready. It takes
> > http://chrony.tuxfamily.org/doc/2.4/chronyc.html#waitsync
> How does that behave in case of disconnected target?
The leap status, which waitsync checks, is set only when synchronized
to a real time source (NTP or refclock), so it will wait forever or
timeout if the maximum number of tries is set.
> I also have a very strange and annoying behavior I need to debug, somehow:
> It happens (rarely, about once in a few days) system time, as seen using either "date" or "time(null)", "jumps around" for a short while and then resets to normal.
> I mean I have record of time going in the past (two days), then in the future (> one month) then in the past again (>one week) and finally going back to "right" time.
> I spotted this because my target (embedded ARM) has a display that, when idle, just displays system time&date (fetched using "time(null)"), I casually spotted the bogus time and confirmed this was not a problem with my application by connecting to console and issuing several "date" commands.
> Real question is:
> How do I debug such situation?
> Should I see something on log? (I didn't spot anything suspicious)
> How can I tell chrony to log any correction done to sysclock?
If you enable the "tracking" log, it will contain all corrections from
NTP sources and reference clocks. The initial correction from the RTC
with the -s option is only logged to the system log and there should
be at most one step and one slew per start. If you see more steps when
no NTP sources are available, it's probably something else messing
with the clock.
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.