Questions tagged [ntp]

Questions about the NTP protocol and applications that use it. NTP is an acronym for Network Time Protocol, a protocol for synchronizing clocks.

The Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks.1

The reference implementation of the NTP protocol is the ntpd daemon, available in Ubuntu as the package ntp. Alternative implementations include OpenNTPd, chrony, and systemd-timesyncd.

254 questions
476
votes
18 answers

How to force a clock update using ntp?

I am running Ubuntu on an ARM based embedded system that lacks a battery backed RTC. The wake-up time is somewhere during 1970. Thus, I use the NTP service to update the time to the current time. I added the following line to /etc/rc.local…
ysap
  • 7,191
110
votes
5 answers

ntpdate: no server suitable for synchronization found

My clock is off, so I would like to synchronize it using ntpdate. I tried several different NTP servers, but for some reason I always get the following error message: $ sudo ntpdate ntp.ubuntu.com 4 Mar 12:27:35 ntpdate[1258]: no server suitable for…
Malte Skoruppa
  • 13,846
  • 5
  • 58
  • 65
43
votes
7 answers

How does Ubuntu synchronize time without ntp?

By clicking "System settings -> Time & Date -> Automatically from the Internet" I can synchronize time from the Internet. However, I find that I don't have a ntpd daemon (It's not even installed). So how does the synchronization work?
Nevermoe
  • 541
  • 1
  • 4
  • 5
35
votes
2 answers

NTP not supported

In Ubuntu 20.04, I see that I can not change the set-ntp due to the following error. # timedatectl set-ntp true Failed to set ntp: NTP not supported Any way to fix that? UPDATE: It seems that systemd-timesyncd fails with the start command. $…
mahmood
  • 1,905
33
votes
2 answers

How to configure NTP time synchronization on a server?

I would like to configure my Ubuntu 12.04 server to synchronize its clock with a specific NTP server. Where to set this up?
Ivan
  • 58,745
27
votes
4 answers

How to set Ubuntu to synchronize my clock with a time server?

I would like Ubuntu to automatically synchronize my system clock with a timeserver at startup. However, my PC isn't connected to the Internet until after I've logged in (plus 5 - 10 seconds for good measure). How can I set it to do this?
Nathan Osman
  • 32,495
25
votes
2 answers

ntpd vs ntpdate: pros and cons

In order to keep the time accurate on a Ubuntu system one can either: Run the ntpd (network time protocol daemon) which will run all the time and continuously adjust the system time when clocks drift. or alternatively: Call ntpdate periodically…
arielf
  • 2,883
24
votes
2 answers

Where does ntpdate get its settings from and what is the "no servers can be used" error about?

When I run ntpdate on its own, I get the following output: 8 Jun 15:47:46 ntpdate[31251]: no servers can be used, exiting If I run it with the -q ntp.ubuntu.com switch, it seems to query just fine. I have been hunting through many files and the…
wilhil
  • 1,795
22
votes
4 answers

Unable to synchronize time using NTP

When I try to synchronize time using NTP. Using the below command sudo ntpdate -b pool.ntp.org I get this error saying NTP socket is in use. How to fix this? 18 Jan 05:53:49 ntpdate[21340]: the NTP socket is in use, exiting
Joe
  • 417
22
votes
3 answers

How do I setup a local NTP server?

I installed NTP server on Ubuntu Server 10.04 using: sudo apt-get install ntp The NTP daemon seems working and listening on the 123 port. However, I was not able to get the time from another machine: sudo ntpdate -u my_ntp_server 23 Nov 18:48:41…
Khaled
  • 1,682
21
votes
2 answers

What units does the ntp drift file use?

When the ntpd daemon is running, the file: /var/lib/ntp/ntp.drift gets updated periodically. Example: 17:20 hostname 118 ~> ls -l /var/lib/ntp/ntp.drift -rw-r--r-- 1 ntp ntp 7 May 20 16:46 /var/lib/ntp/ntp.drift # So it looks like it was last…
arielf
  • 2,883
18
votes
9 answers

How do I customize the NTP poll rate?

I'm setting up Ubuntu on an embedded machine that runs over a cellular connection, where we pay per byte. The machine also has no RTC battery, so it starts from a random time every boot. I'd like to ensure that the time gets synced up when the…
17
votes
3 answers

How do I disable ntpd?

I'm running Ubuntu in a VM. How do I disable ntpd?
user12075
16
votes
7 answers

Unable to sync time using `ntpdate`, error: "no server suitable for synchronization found"

My ntp.conf file: user@pc[0][07:37:40]:/etc$ cat /etc/ntp.conf idriftfile /var/lib/ntp/ntp.drift server 0.pool.ntp.org server 1.pool.ntp.org server 2.pool.ntp.org server pool.ntp.org Command output: user@pc[0][07:37:24]:/etc$ sudo ntpdate -dv…
wting
  • 394
16
votes
4 answers

Why is Ubuntu's clock getting slower or faster?

Ubuntu's clock is off by about a half hour: Where do I even start troubleshooting this? It's allegedly being set "automatically from the Internet". How can I verify that "the Internet" knows what time it is? Details Ubuntu has had plenty of time to…
ændrük
  • 78,496
1
2 3
16 17