%

Devuan: use the OpenNTPD time synchronization client

Article published the ; modified the
2 minutes to read

This article has 320 words.
RAW source of the article:
Commit version: 54af6be

Description

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.

Installation

With the apt tool: apt install openntpd

Configuration

  • The file config is: /etc/opennptd/ntpd.conf

By default, it runs without no needed modification.

File: /etc/opennptd/ntpd.conf

Explanations

About options:

  • server: to target on time server, in particular.
  • servers: to targer a pool of time servers - prefer this
  • sensor: to use local timedelta sensor

Utilisation

Checks

To check the file config, use the option -n, as-is:
# openntpd -n
configuration OK

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.

Code: shell

Info

Service

The service name is openntpd, to manage with the service.

service openntpd command

  • command is one of possibles actions on a service, as start, stop, restart.

Troubleshooting

It can happen at startup that there is a time lag. Using the option -s solve:

Code: shell

Constraint

It seems the constraint option is not available!

Info

peer not valid

You have this message:

Code: shell

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.

Documentation

The NTP protocol is defined in:

RFC 1305

IETF Tools
HTML, PDF, TXT
RFC Editor
HTML, PDF, TXT

RFC 5905

IETF Tools
HTML, PDF, TXT
RFC Editor
HTML, PDF, TXT

Manpages

Please, read the manpages: