sntpclock — check a system's clock through NTP


sntpclock {host}


sntpclock connects to an NTP server on host. host must be a dotted-decimal IP address.

sntpclock prints to its standard output a 16-byte TAI64NA adjustment that, when added to the local UNIX clock, will produce the TAI clock on host. This is suitable for input to programs such as clockadd(1) and clockview(1).

sntpclock limits the adjustment to 2 days.

sntpclock does not bind to port 123; this means that it does not need to run as root. Note that some firewalls will not permit sntpclock requests.


An NTP timestamp is a count of non-leap seconds. sntpclock uses a local leap-second table to convert the NTP timestamp to TAI with an epoch of 1970-01-01 00:00:10 TAI. For a discussion of the difference between UTC and TAI see UTC and TAI.

The current NTP time scale will break down in 2036.


sntpclock was originally part of Daniel J. Bernstein's clockspeed toolset in 1998.


Original code and documentation by Daniel J. Bernstein. Documentation modernizations by Jonathan de Boyne Pollard.