Re: [chrony-users] Getting chrony status

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


Thanks Steve.
I know about "chronyc tracking", but that is human-readable info.
I need to parse it (in a shell script) to delay starting of my app until time has settled down.
Is it enough to wait for "Leap status" to go to "Normal"?
.... or should I take into consideration other values?.

typical output at startup is:

/ # chronyc tracking

Reference ID    : 0.0.0.0 ()

Stratum         : 0

Ref time (UTC)  : Thu Jan  1 00:00:00 1970

System time     : 0.010319719 seconds fast of NTP time

Last offset     : +0.000000000 seconds

RMS offset      : 0.000000000 seconds

Frequency       : 6.202 ppm slow

Residual freq   : +0.000 ppm

Skew            : 0.000 ppm

Root delay      : 0.000000 seconds

Root dispersion : 0.000000 seconds

Update interval : 0.0 seconds

Leap status     : Not synchronised


while a "well behaved" entry looks like:

/ # chronyc tracking

Reference ID    : 212.45.144.16 (saguaro.bilink.it)

Stratum         : 3

Ref time (UTC)  : Sun Aug  7 02:57:32 2016

System time     : 0.000008512 seconds fast of NTP time

Last offset     : -0.000437271 seconds

RMS offset      : 0.000437271 seconds

Frequency       : 6.202 ppm slow

Residual freq   : -7.681 ppm

Skew            : 0.040 ppm

Root delay      : 0.024563 seconds

Root dispersion : 0.047727 seconds

Update interval : 1.9 seconds

Leap status     : Normal



Il 07/08/2016 01:07, Steve Horton ha scritto:

Chronyc tracking -will show how "off" you are from the time of your servers UTC. I usually set my clocks in the bios to utc, or very close and chrony will use this as a starting point after boot.


On Aug 6, 2016 12:11 PM, "Mauro Condarelli" <mc5686@xxxxxxxxx <mailto:mc5686@xxxxxxxxx>> wrote:

    Hi,
    I need to start an application with stable and confirmed date&time, i.e.: after chrony has started, initialized and set the system clock to some presumably valid value.
    Since I am using clock skewing if system time is in the future (need strictly monotonic time), internet connection may be missing at startup and several other mishaps, it may take a somewhat long time for chrony to stabilize (even several minutes).

    How can I test (from shell script) if and when system time is (supposed to be) stable?

    TiA
    Mauro

-- To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx <mailto:chrony-users-request@xxxxxxxxxxxxxxxxxxxx> with "unsubscribe" in the subject.
    For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx <mailto:chrony-users-request@xxxxxxxxxxxxxxxxxxxx> with "help" in the subject.
    Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx <mailto:listmaster@xxxxxxxxxxxxxxxxxxxx>.



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