Different offset in “ntpq -p” and “ntpdate -q”

ntpntpdntpdate

I'm sometimes notified by our system monitoring about too high offsets in
ntpd. When issuing ntpdate, it shows none. As ntpd adjusts time slowly, it seems to "think" there is an offset which needs to be adapted. But shouldn't ntpdate show this offset then, too? What am I misunderstanding?

offset determined by ntpq -p

This happened after an NTP-server was shortly not available and seemingly restarted, the offset when it came back was nearly 20 seconds and NTP adjusted slowly, so basically it just did what it is designed for. But why did ntpdate -q say there is no offset all the time?

# ntpq -p && echo '###' && ntpdate -q 123.123.123.123
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*nt0            10.123.123.123   2 u   48   64  377    0.181  209.956   8.334
###
server 10.123.123.123, stratum 1, offset 0.207451, delay 0.04231
 1 Dec 10:45:28 ntpdate[19895]: adjust time server 10.123.123.123 offset 0.207451 sec

When I compare the output of two different systems, one with offset, one without, issuing echo +%H:%M:%S-%N shows that ntpd is correct and not ntpdate. But why?

Best Answer

ntpq outputs offset in milliseconds. ntpdate offset is in seconds. Your offset is therefore 209.956 ms vs. 0.207451 sec which is pretty close (209ms vs. 207ms)