[ntp:questions] Linux NTP Kernel unsync flag remains long after NTP&Kernel have PPL sync

Steve Kostecke kostecke at ntp.org
Thu Aug 28 19:27:54 UTC 2008

On 2008-08-28, Dave Holland <dh3 at sanger.ac.uk> wrote:

> Darryl Miles <darryl-mailinglists at netbauds.net> wrote:
>>I guess an offset of 0.0000 is perfect ?
> Yes.

Remember that these stats are just a snapshot. The real indicator of
clock stability is to summarize the stats over a long period of time.

The peer.awk utility in the scripts directory may be used for this
purpose. For example, the system at my desk shows:

$ awk -f peer.awk /var/log/ntpstats/peerstats

       ident  cnt    mean   rms    max   delay    dist    disp
==============================================================   66  -1.412  1.410  3.703  1.339  21.965  17.137

>>Now how do I tell the difference between an offset being reported as 
>>0.0000 due to no sync and an offset being reported as 0.0000 due to a 
>>perfect sync ?
> Look at the output of that command while (say) NTP is starting up and
> not yet synchronised:
> assID=0 status=c011 sync_alarm, sync_unspec, 1 event, event_restart,
> offset=0.000
> compared to normal running:
> assID=0 status=0644 leap_none, sync_ntp, 4 events, event_peer/strat_chg,

The status bits are decoded on that line:

0xxx == leap_none
x6xx == sync_ntp
xx4x == 4 events
xxx4 == event_peer/strat_chg

Steve Kostecke <kostecke at ntp.org>
NTP Public Services Project - http://support.ntp.org/

More information about the questions mailing list