Skip to content

Instantly share code, notes, and snippets.

@metajiji
Created June 1, 2017 06:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save metajiji/a98f98f5ffbdb03c6d663621a42dffcb to your computer and use it in GitHub Desktop.
Save metajiji/a98f98f5ffbdb03c6d663621a42dffcb to your computer and use it in GitHub Desktop.
Get local time difference with ntp server
ntpdate -q pool.ntp.org | awk 'ENDFILE{print $(NF-1)}'
chronyd -Q 'pidfile /tmp/chronyd.q' 'pool pool.ntp.org iburst' 2>&1 | awk '/wrong by/{print $(NF-2)}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment