Activating Clock/Time Sync

I’ve been searching how to manually sync the clock to Internet Time in Linux. It appears that some sort of automatic synchronization is done as in indicated by this screenshot:

But how to access it, trigger it manually, or change the settings (what sever it connects to, etc.) remains hidden. Any help?

1 Like

It may be using the systemd-timesyncd.service in which case /etc/systemd/timesyncd.conf controls (in part) what server it connects to. On the other hand, it appears to be saying that you don’t have an NTP service.

timedatectl timesync-status

systemctl status systemd-timesyncd

I don’t know whether that is a thing or even desirable. Why would you want to do that?

You can control how frequently it uses NTP to synch the time, if that is sufficient. It is doubtful that you would need to increase the frequency of updates over the default. I’ve actually decreased the frequency.

Why wouldn’t you want to do that? It’s a common function found in most operating systems:

Also, according to Google searches, the NTP function has been depreciated in modern Debian based operating systems starting with Ubuntu 16-something and newer. So I’m guessing that’s why my OS doesn’t have an NTP service.

1 Like

Because it encourages users to abuse something that is a free service.

Obviously in an open source / non-proprietary world there is no way of preventing someone updating on demand (manually) rather than updating periodically (as is the norm) but not exposing it on the GUI at least discourages it i.e. encourages everyone to use the protocol and the server as it is intended.

The only time I would ever want to update manually is when updating automatically has failed, and it may be better in most cases just to fix the automatic update.

But OK all of that is just my opinion and not central to your problem.

I think you may be misinterpreting that.

The ntp package and executable and the related service is deprecated - superseded by systemd-timesyncd.

NTP the protocol (or the function) is still very much alive. systemd-timesyncd doesn’t reinvent the wheel in that sense. It still uses NTP and provides that function.

OK, but when I do timedatectl

I get

NTP service: active

and when I do systemctl status systemd-timesyncd

I get active (running) in beautiful, healthy green.

FWIW, aside from systemd-timesyncd.service there is a package called “chrony” which many folks like.

 It consists of a pair of programs:
 chronyd:  This is a daemon which runs in background on the system.
 It obtains measurements (e.g. via the network) of the system's offset
 relative to other systems and adjusts the system time accordingly. For
 isolated systems, the user can periodically enter the correct time by
 hand (using 'chronyc'). In either case 'chronyd' determines the rate
 at which the computer gains or loses time, and compensates for this.
 Chronyd implements the NTP protocol and can act as either a client or
 a server.
 chronyc: This is a command-line driven control and monitoring program.
 An administrator can use this to fine-tune various parameters within
 the daemon, add or delete servers etc whilst the daemon is running.

@jeremiah Now we’re getting somewhere! Thank you for the recommendation. It appears that no chrony exists in the PureOS repositories, but I did find the latest version in Debian Stable, so I think I’ll install it from there.

Thanks again!

1 Like