This site is multilanguage:
4 minute(s) to read
This article has 728 words.
RAW source of the article: MD
OpenNTPD is a service that can be used to synchronize the system clock to the time servers using the NTP .
OpenNTPD is a part the OpenBSD base system. It was ported to others OSes, as Devuan.
apt install openntpd
- The file config is:
By default, it runs without no needed modification.
server: to target on time server, in particular.
servers: to targer a pool of time servers - prefer this
sensor: to use local timedelta sensor
To check the file config, use the option
# openntpd -n
If not good, you need to review the file config.
ntpctl is the tool to control the time informations.
- the option
-s all- or
-sa- is to display availables informations.
# ntpctl -sa 4/4 peers valid, clock unsynced, clock offset is -552.476ms peer wt tl st next poll offset delay jitter 220.127.116.11 from pool 0.debian.pool.ntp.org 1 10 2 6s 32s 0.203ms 60.784ms 31.533ms 18.104.22.168 from pool 0.debian.pool.ntp.org 1 10 3 9s 32s 2.000ms 54.595ms 17.411ms 22.214.171.124 from pool 0.debian.pool.ntp.org 1 10 2 9s 33s 5.552ms 51.518ms 4.078ms 126.96.36.199 from pool 0.debian.pool.ntp.org 1 10 3 7s 33s -0.176ms 55.383ms 17.593ms
The service name is openntpd, to manage with the
service openntpd command
commandis one of possibles actions on a service, as
It can happen at startup that there is a time lag. Using the option
# openntpd -s -d adjtimex returns frequency of 0.000000ppm /var/lib/openntpd/db/ntpd.drift is empty ntp engine ready reply from 188.8.131.52: offset -522.890034 delay 0.054365, next query 7s set local clock to Sat Apr 25 12:09:03 CEST 2020 (offset -522.890034s) reply from 184.108.40.206: negative delay -522.825725s, next query 3203s reply from 220.127.116.11: negative delay -522.823915s, next query 3197s reply from 18.104.22.168: negative delay -522.821620s, next query 3012s reply from 22.214.171.124: negative delay -522.821769s, next query 3010s reply from 126.96.36.199: negative delay -522.820949s, next query 3031s reply from 188.8.131.52: negative delay -522.816360s, next query 3274s reply from 184.108.40.206: negative delay -522.816819s, next query 3030s reply from 220.127.116.11: negative delay -522.816297s, next query 3254s reply from 18.104.22.168: negative delay -522.812132s, next query 3176s reply from 22.214.171.124: negative delay -522.810759s, next query 3017s reply from 126.96.36.199: negative delay -522.809750s, next query 3082s reply from 188.8.131.52: negative delay -522.805041s, next query 3250s reply from 184.108.40.206: negative delay -522.800165s, next query 3041s reply from 220.127.116.11: negative delay -522.784156s, next query 3179s reply from 18.104.22.168: negative delay -522.657588s, next query 3023s reply from 22.214.171.124: offset -0.004612 delay 0.049539, next query 7s reply from 126.96.36.199: offset -0.007646 delay 0.049241, next query 9s peer 188.8.131.52 now valid
It seems the constraint option is not available!
constraintensures that time queries are made on the protocol HTTPS , via TLS .
peer not valid
You have this message:
wt tl st next poll offset delay jitter 184.108.40.206 from pool 0.debian.pool.ntp.org 1 4 2 8s 9s ---- peer not valid ----
Wait a little for the ntp queries to be returned.
Normally at the next query, this should no longer be the case.
Otherwise, check that the NTP servers registered in the file config are well written, reachable and functional.
The NTP protocol is defined in:
Please, read the manpages: