ntpctl
Query and control the NTP daemon
TLDR
Show all data
Show information about each peer
Show the status of peers and sensors, and whether the system clock is synced
Show information about each sensor
SYNOPSIS
ntpctl [-s] [-v] command [argument ...]
PARAMETERS
-s
Display a short, important summary of the synchronization status. This option is useful for quick checks and scripting.
-v
Produce verbose output. This provides more detailed information about the daemon's operation and status, aiding in debugging.
status
Show the current synchronization status, including peer information, stratum, clock offset, and polling intervals.
monitor
Provide a continuous, real-time update of the synchronization status, typically refreshing every few seconds. Similar to running 'ntpctl -s' repeatedly in a loop.
set hipe (on|off)
Enable or disable High Precision Event Timer (HIPE) support. HIPE leverages high-resolution timers in modern hardware for more precise timekeeping. This can improve time synchronization accuracy.
set rts (on|off)
Enable or disable Real-Time Scheduling (RTS) support. RTS can provide more consistent time synchronization by giving OpenNTPD higher scheduling priority, reducing latency and jitter.
DESCRIPTION
ntpctl is a utility designed to query and control the OpenNTPD daemon, which is OpenBSD's secure and lightweight Network Time Protocol implementation. It allows administrators to check the current synchronization status of the system clock, including which remote peer the daemon is currently synchronized with, the stratum level, the clock's estimated offset from the peer, and details about the clock's accuracy and adjustments. Beyond status monitoring, ntpctl can also be used to modify certain operational parameters of OpenNTPD, such as enabling or disabling High Precision Event Timer (HIPE) and Real-Time Scheduling (RTS) features, which can significantly impact time synchronization performance and precision. It provides both a static, point-in-time status report and a dynamic, real-time monitoring view, making it an indispensable tool for managing time synchronization on systems running OpenNTPD.
CAVEATS
ntpctl is specifically designed for and works only with the OpenNTPD daemon. It is not compatible with the ntpd daemon from the NTPsec or legacy NTP project, which uses ntpq for control and querying. Users should ensure they are running OpenNTPD if they intend to use ntpctl.
HIPE AND RTS FEATURES
HIPE (High Precision Event Timer) and RTS (Real-Time Scheduling) are advanced features that can be enabled or disabled via ntpctl.
HIPE leverages high-resolution timers in modern hardware for more precise timekeeping. It is crucial for achieving optimal synchronization accuracy, especially on systems with suitable hardware.
RTS allows the OpenNTPD process to run with elevated priority, reducing latency and jitter in time synchronization updates, especially on busy systems where other processes might compete for CPU time. Enabling these features typically requires appropriate system capabilities and root privileges for ntpctl to modify the daemon's runtime configuration.
HISTORY
ntpctl was developed as part of the OpenNTPD project, which originated from OpenBSD. OpenNTPD aims to provide a simpler, more secure, and robust NTP implementation compared to the traditional NTP daemon. ntpctl was created to be the dedicated command-line interface for OpenNTPD, providing a straightforward way to manage its operation and observe its synchronization state. Its development parallels the evolution of OpenNTPD itself, with a focus on clarity and essential functionality.