Code review comment for lp://qastaging/~michael.iatrou/maas/fix-1673378

Revision history for this message
Gavin Panella (allenap) wrote :

The ntpstat command (from the ntpstat) package might do what you need.
From ntpstat(1):

  DESCRIPTION
       ntpstat will report the synchronisation state of the NTP daemon
       running on the local machine. If the local system is found to be
       synchronised to a reference time source, ntpstat will report the
       approximate time accuracy.

  RETURNS
       ntpstat returns 0 if clock is synchronised. ntpstat returns 1 if
       clock is not synchronised. ntpstat returns 2 if clock state is
       indeterminant, for example if ntpd is not contactable.

The only downsides are that it's not installed by default and it's in
universe.

Running locally:

  $ ntpstat
  synchronised to NTP server (192.168.178.1) at stratum 4
     time correct to within 78 ms
     polling server every 1024 s

« Back to merge proposal