0

I'm working on ubuntu where i want see which NTP is used as default, ex. chrony! and if its even configured for the purpose of correct time synchronisation in a cluster of another app. So How can i know which NTP is configured on a linux-ubuntu OS?

Thanks in advance

6
  • 2
    Mind that you are mixing up 2 things: chrony is an deamon that uses NTP. Ubuntu uses timesyncd. There is only 1 NTP. That is the PROTOCOL used by all of these daemons.
    – Rinzwind
    Mar 22, 2021 at 10:15
  • 2
    Since the introduction of systemd, Ubuntu has been using timesyncd as default. Mar 22, 2021 at 10:15
  • @Rinzwind. thanks for the comment. do you mean that both chrony and timesyncd are daemons, however chrony uses NTP and timesynchd uses SNTP?. if my interpretation is right. How can i see which NTP-server the client is synchd to ?
    – k.jbaili
    Mar 22, 2021 at 10:31
  • @ArturMeinild. Thanks for the comment
    – k.jbaili
    Mar 22, 2021 at 10:31
  • @guiverc would you mind if I remove the version tag? Looks pretty generic this :)
    – Rinzwind
    Mar 22, 2021 at 10:41

1 Answer 1

3

This will list all running deamons:

systemctl | grep daemon

Look for "time" in the results as we nowadays use timesyncd:

systemd-timesyncd is a system service that may be used to synchronize the local system clock with a remote Network Time Protocol server. It also saves the local time to disk every time the clock has been synchronized and uses this to possibly advance the system realtime clock on subsequent reboots to ensure it monotonically advances even if the system lacks a battery-buffered RTC chip.

The systemd-timesyncd service specifically implements only SNTP. This minimalistic service will set the system clock for large offsets or slowly adjust it for smaller deltas. More complex use cases are not covered by systemd-timesyncd.

The NTP servers contacted are determined from the global settings in timesyncd.conf(5), the per-link static settings in .network files, and the per-link dynamic settings received over DHCP. See systemd.network(5) for more details.

timedatectl(1)'s set-ntp command may be used to enable and start, or disable and stop this service.

1
  • 5
    On my system, timesyncd actually does not show under daemon - grep for time instead: systemctl | grep time Mar 22, 2021 at 10:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .