2

Using Ubuntu 18.04.3 I am unable to get information about the NTP offset using timedatectl timesync-status as I get a Unknown operation timesync-status prompt. Checking the service state with timedatectl and systemctl status systemd-timesyncd.service works just fine. Is there another way to check the offset?

  • Not really helpful remark: on my 19.04 system timedatectl timesync-status does work although the autocompletion doesn't show the command. – guntbert Sep 1 at 19:44
0

Although it may not be exactly what you have asked for, you can use the following method (no sudo is required):

$ /bin/journalctl --unit=systemd-timesyncd -n 1  | tail -1
Aug 16 15:57:13 xxxxxx systemd-timesyncd[958]: Synchronized to time server 169.254.169.254:123 (169.254.169.254).

With the command above, you determine the time server timesyncd is synchronized to. In this example, it is 169.254.169.254.

Then you can use the command ntpdate -q with this server like this:

$ ntpdate -q 169.254.169.254
server 169.254.169.254, stratum 2, offset -0.000081, delay 0.02580
 1 Sep 12:20:24 ntpdate[3978]: adjust time server 169.254.169.254 offset -0.000081 sec

Note: You can install the ntpdate command, using apt install ntpdate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.