I wanted to test if ntp
was working on my machine, so I set the time back 5 minutes and restarted ntp
$ sudo service ntp stop
$ sudo date -s "9:40 AM" # This time was 5 minutes ago
$ sudo service ntp start
$ ntpq -c lpeer # Check if sync to servers is working
remote refid st t when poll reach delay offset jitter
==============================================================================
hachi.paina.jp .INIT. 16 u - 64 0 0.000 0.000 0.000
ts0.itsc.cuhk.e .INIT. 16 u - 64 0 0.000 0.000 0.000
ns.tx.primate.n .INIT. 16 u - 64 0 0.000 0.000 0.000
vpn.ipv4.cz .INIT. 16 u - 64 0 0.000 0.000 0.000
europium.canoni .INIT. 16 u - 64 0 0.000 0.000 0.000
$ date
Mon Sep 23 09:40:50 MDT 2013
It appears that the ntp
service can connect to its ntp
servers just fine, but the clock on my machine still isn't updated – even after waiting 5 more minutes.
How do I get ntp
to actually update my system clock?
Best Answer
That's not fine. You either queried the state to soon, or your
ntpd
can't connect to those servers at all. When it is synced, it should display IP addresses or host names in therefid
column, and values like2
or3
in thest
column.The output of a working
ntpd
should look like this: