Display ntpd's time-source associations, selected peer, reachability, and offset in a table.
Which command is appropriate?
ntpq -p queries ntpd and displays its peer association table. A star commonly marks the selected peer.
Detailed explanation
ntpd -pIncorrect. ntpd is the daemon, not the peer-query command.
ntpdate -pIncorrect. ntpdate is for one-shot synchronization.
chronyc -pIncorrect. chronyc uses commands such as sources rather than ntpq syntax.
ntpq -pCorrect. ntpq -p displays ntpd peers.
Try it yourself
An example you can run in a temporary verification environment.
ntpq --help 2>&1 | grep -E -- '-p' | head -n 1Expected result
peers表示に関するhelp行Key points
- ntpq is the query client
- -p lists peers
- Selected peer is marked
Notes
- Environment: ntpq help / daemonへの問い合わせなし
- 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.