0

Its 2025 and I'm happily using systemd-timesyncd for NTP and time management on Ubuntu. However an embedded device on my network is failing time-synchronisation so I want to test my NTP server is actually responding.

Requirements:

  • I don't want to set the time
  • I don't want to install a service that will compete or conflict with systemd-timesyncd
  • I just want to prove that the server is sending sensible responses

Searching for how to do this gives the following suggestions:

  1. use ntpq
  2. use chronyc
  3. use ntpdate -qu
  4. as always - some unhinged rant about how systemd is the root of all problems

All of them fail on my criteria:

  1. ntpq is in the package ntp (or ntpsec) which installs ntpd conflicting with systemd
  2. chronyc is in the package chrony which installs the chronyd daemon conflicting with systemd
  3. ntpdate is in the package ntpdate (or ntpsec-ntpdate) which registers itself to hook into network-hooks/dhcp-hooks etc,...

In each case if I know enough I can disarm the conflict or disable the service I'm forced to install because I want a client, but surely that isn't where we find ourselves in 2025.

2 Answers 2

3

Today I Learned: there is just such a query tool - ntpdig

$ sudo apt install ntpsec-ntpdig
$ ntpdig my-timeserver.example.com
2025-11-08 14:52:31.401421 (+1100) +0.010677 +/- 0.000447 192.168.1.1 s2 no-leap

This is exactly what is needed, with no extraneous "services".

I eventually found the answer by giving up and diving into the "least-impactful" approach. While installing ntpsec-ntpdate I saw it hauled in ntpsec-ntpdig as a dependency.

Hoping this is helpful to future searchers, and can prime the Google search pump.

1

I use

ntpdate -q debian.pool.ntp.org

on all my Debian systems. Been using it for years. It works very reliably. The "-q" prevents ntpdate from setting the clock. With the "-q" option specified, it can even be used without root access.

I am not specifically familiar with Ubuntu, but since it is derived from Debian it should be quite similar and my answer should apply.

1
  • Thanks for your response - i knew I could install ntpdate but I was avoiding it because it installs network hooks network-interfaces/dhcp-hooks. Take a look at dpkg -L ntpdate. In the end installing ntpdate on debian (trixie) installs ntpsec-ntpdig as a dependency. ntpsec-ntpdig is the simpler, smaller answer. Commented Nov 12 at 1:08

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.