6

I want to monitor the time drift on my workstation. How can I compare my local time to a timeserver like pool.ntp.org and show the difference?

1 Answers1

8

Old, Outdated Answer

If you run ntpdate -q pool.ntp.org, it will show you the difference between your time and the time server.

strong text

ntpdate has been deprecated for quite some time, and as of this edit (2017) it may no longer be available on new distributions.

clockdiff _server_ will show the clock difference and has been available since 12.04 LTS. See the man page for clockdiff.

jwernerny
  • 1,818
  • This doesn't work on all Linux systems - I have an embedded computer running Debian GNU/Linux 3.1, kernel 2.6.21-ts for which ntpdate is a shell script that gives the following for the above command: Usage: /etc/init.d/ntpdate {start|stop|restart|reload|force-reload}. Any alternatives? – Roger Dueck Aug 15 '17 at 20:57
  • 2
    @RogerDueck According to the question ntpd vs nptdate - pros and cons, ntpdate has been deprecated for quite a while. The suggestion is to use ntpd instead. – jwernerny Aug 17 '17 at 15:32
  • My system doesn't have clockdiff either, and I don't see any way to make ntpd give the one-time clock difference that the deprecated ntpdate did. – Roger Dueck Aug 17 '17 at 16:52