Created
June 1, 2017 06:30
-
-
Save metajiji/a98f98f5ffbdb03c6d663621a42dffcb to your computer and use it in GitHub Desktop.
Get local time difference with ntp server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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