Query time.example.test once and show offset information.
Do not change the system clock.
Which command is appropriate?
ntpdate -q SERVER performs a query-only request and reports results without setting the system clock.
Detailed explanation
ntpdate time.example.testIncorrect. Plain ntpdate may attempt to adjust the system clock.
ntpdate -q time.example.testCorrect. -q reports the query without changing the clock.
ntpq -w time.example.testIncorrect. This is not the ntpq form for a one-shot query.
date -q time.example.testIncorrect. date does not query NTP servers.
Try it yourself
An example you can run in a temporary verification environment.
ntpdate --help 2>&1 | grep -E -- '-q' | head -n 1Expected result
query onlyを示すhelp行Key points
- -q means query only
- One-shot query
- No clock change
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
System clock
The kernel-maintained time used by applications and timestamps.
RTC
The battery-backed hardware clock used to seed time during boot.
NTP synchronization
A process that compares a clock with remote time sources and corrects drift.