ntpstat Show network time synchronisation status
pi@Pi3-01:~ $ ntpstat
synchronised to NTP server (220.127.116.11) at stratum 3
time correct to within 84 ms
polling server every 1024 s
And with pythons ntplib you can get the NTP status.
- The poll time (in seconds) is shown in the column poll when you type the command
pi@Pi3-01:~ $ ntpq -p
remote refid st t when poll reach delay offset jitter
*ntp8.flashdance 18.104.22.168 2 u 162 1024 373 28.540 0.994 4.545
+22.214.171.124 126.96.36.199 2 u 106 1024 375 87.132 -1.339 5.561
+tethys.hot-chil 188.8.131.52 2 u 759 1024 377 58.820 -1.213 3.116
+sundown.speedwe 184.108.40.206 2 u 59 1024 377 59.788 0.605 3.521
- How often does it sync the time?
Initially every 64th second, if the time is stable, the poll time will increase, and vice versa if it differ to much.
How NTP Operates
The ntpd program operates by exchanging messages with one or more configured servers at designated poll intervals. When started, whether for the first or subsequent times, the program requires several exahanges from the majority of these servers so the signal processing and mitigation algorithms can accumulate and groom the data and set the clock. In order to protect the network from bursts, the initial poll interval for each server is delayed an interval randomized over 0-16s. At the default initial poll interval of 64s, several minutes can elapse before the clock is set. The initial delay to set the clock can be reduced using the iburst keyword with the server configuration command, as described on the Configuration Options page.