Red Hat Bugzilla – Bug 986098
RFE: one-time "check server" mode
Last modified: 2014-06-09 09:50:07 EDT
Currently, Anaconda uses ntpdate to check whether a given ntpserver is available (without setting the time).
proposes to deprecate ntpdate. It would be nice if chrony had an equivalent command or mode, so that chrony can completely replace the ntp package (from which ntpdate is built).
That would be a nice feature, I'll see if we can get it included.
In the meantime you can use sntp, which is the replacement for ntpdate recommended by the NTP upstream.
This is now implemented in upstream git and it will be in chrony-1.30. It can be used like this:
# ./chronyd -Q "server 0.pool.ntp.org iburst"
2014-04-09T15:00:53Z chronyd version DEVELOPMENT starting
2014-04-09T15:00:53Z Initial frequency -13.273 ppm
2014-04-09T15:00:58Z System clock wrong by -0.013297 seconds (ignored)
2014-04-09T15:00:58Z chronyd exiting
A non-zero exit code indicates that no suitable servers could be reached.