Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 9 down vote accepted
.INIT.          16 u

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 the refid column, and values like 2 or 3 in the st column.

The output of a working ntpd should look like this:

iserv ~ # ntpq -p     
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*char-ntp-pool.c .shm0.           1 u  162 1024  377   33.332   -5.160   1.225
+node3.mneisen.o 192.53.103.108   2 u  145 1024  377   30.391   -0.756   1.122
+38.101.77.21    64.113.32.5      2 u 1673 1024  336  184.925   20.728  18.911
-ntp0.sanctioned 131.188.3.221    2 u  563 1024  377   30.445  -50.495  18.027
share|improve this answer
    
Haha, good to know. Having not seen valid results on that screen before, it would have been nice if ntp was a bit more explicit in saying that something was wrong. –  Cory Klein Sep 23 '13 at 22:02
    
Yeah, you're right. Try ntpdate -d 0.debian.pool.ntp.org, that should help you figure out if it's a firewall issue. –  Martin von Wittich Sep 23 '13 at 22:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.