List the NTP sources used by a running chronyd and their selection state.
Which command is appropriate?
chronyc sources displays chronyd's sources, reachability, and selection state. chronyc is the client for chronyd.
Detailed explanation
chronyd sourcesIncorrect. chronyd is the daemon; state queries normally use chronyc.
Incorrect. chronyd is the daemon; state queries normally use chronyc.
chronyc trackingIncorrect. tracking summarizes clock tracking rather than listing sources.
Incorrect. tracking summarizes clock tracking rather than listing sources.
chronyc sourcesCorrect. sources lists chronyd's time sources and status.
Correct. sources lists chronyd's time sources and status.
ntpq sourcesIncorrect. ntpq is for ntpd, not chronyc's source subcommand.
Incorrect. ntpq is for ntpd, not chronyc's source subcommand.
Try it yourself
An example you can run in a temporary verification environment.
chronyc help 2>&1 | grep -E 'sources' | head -n 1Expected result
sources commandの説明行Key points
- chronyd is the daemon
- chronyc is the client
- sources lists time sources
Notes
- Environment: chronyc 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
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.