Query pool.ntp.org with the legacy ntpdate tool.
Display offset and delay without changing system time.
Which command is appropriate?
ntpdate -q is query-only and reports measurements without setting the system clock.
Detailed explanation
ntpdate pool.ntp.orgIncorrect. ntpdate without -q normally adjusts the system clock.
Incorrect. ntpdate without -q normally adjusts the system clock.
ntpdate -q pool.ntp.orgCorrect. -q queries the server and prints measurements.
Correct. -q queries the server and prints measurements.
ntpd -q pool.ntp.orgIncorrect. This is not the ntpdate query syntax.
Incorrect. This is not the ntpdate query syntax.
date -q pool.ntp.orgIncorrect. date has no NTP-server query option.
Incorrect. date has no NTP-server query option.
Try it yourself
An example you can run in a temporary verification environment.
ntpdate --help 2>&1 | grep -E -- '(^|[ ,])-q([, ]|$)|query' | head -n 1Expected result
-qまたはquery onlyのhelp行(ntpdate導入環境)Key points
- -q query only
- No clock change
- Daemon for continuous sync
Notes
- Environment: ntpdate helpの読取のみ・外部通信なし
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.