Show Time drift relative to a time Server

18,108

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.

Share:
18,108
Peter Hoffmann
Author by

Peter Hoffmann

python hacker Follow me on twitter/peterhoffmann

Updated on September 18, 2022

Comments

  • Peter Hoffmann
    Peter Hoffmann over 1 year

    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?

  • Roger Dueck
    Roger Dueck over 6 years
    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?
  • jwernerny
    jwernerny over 6 years
    @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.
  • Roger Dueck
    Roger Dueck over 6 years
    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.