Blob Blame History Raw
.TH NTPSTAT 1 "" "ntpstat"
ntpstat \- Print NTP synchronisation status

\fBntpstat\fR [\fB-m\fR \fIMAXERROR\fR]

\fBntpstat\fR is a script which prints a brief summary of the system clock's
synchronisation status when the \fBntpd\fR or \fBchronyd\fR daemon is running.
It prints the time source (NTP server or reference clock) to which the system
clock is currently synchronised, its stratum, how often is the server polled,
and the maximum estimated error of the clock. The script uses the \fBntpq\fR or
\fBchronyc\fR program to obtain the information from the daemon.

Following the NTPv4 specification (RFC 5905), if the time source becomes
unreachable and there are no other sources that could be selected, the status
of the clock will still be \*(lqsynchronised\*(rq, but the maximum error will
be slowly increasing.

\fBntpstat\fR exits with a status of 0 if the clock is synchronised, 1 if the
clock is not synchronised, 2 if the status could not be determined, e.g.
when the daemon is not running, or 3 if an invalid command-line option was

.TP 8
Specify a maximum acceptable error of the clock in milliseconds. If the
clock is synchronised, but its maximum estimated error is larger than
\fIMAXERROR\fR, or is unknown, \fBntpstat\fR will exit with a status of 1.
.TP 8
Print a help message.

.BR ntpd (8),
.BR ntpq (8),
.BR chronyd (8),
.BR chronyc (1)