2

I'm behind a firewall, so I can't access pool.ntp.org or Ubuntu's own time servers directly, and I'd like to change the time servers for my system. When googling, I find references to missing manpages like ntpd.conf(5) and ntpd(8), to a missing GUI for setting the time servers, and to a cron script (/etc/cron.daily/ntpdate) that doesn't seem to exist on my system. I've also found a reference to there being changes to ntpd.conf, so I'm hesitant to just create that file in /etc. How is one supposed to change the time servers in 11.10?

slikts
  • 91

2 Answers2

4

I don't know of the GUI you mention, but all the missing files sound like they're part of the ntp package.

sudo apt-get install ntp

should install them, then you'll have /etc/ntp.conf which you can edit. Once done, do:

service ntp restart

to reload your new config. The command

ntpq -pn

will show you the list of servers it's using (and various stats).

jdthood
  • 12,467
Caesium
  • 15,807
  • Using Ubuntu 12, I had to use sudo service ntp restart http://askubuntu.com/questions/178968/how-to-configure-ntp-time-synchronization-on-a-server – Snekse Dec 17 '12 at 22:14
-1

Most pools are set up to maintain time at the Stratum-12 to Stratum 16 level. You will get best time when the system is set to use use the Master Clock in Boulder, Colorado, which will give either Stratum-1 or 2.

NTP Server – Stratum Levels Explained

Excerpt:

Network Time Protocol is a hierarchical protocol and is divided into stratum which define the distance from the reference clock. A reference clock source that relays UTC (Coordinated Universal Time) time and has little or no delay is known as a stratum-0 device. Stratum-0 servers cannot be used on the network, instead, they are directly connected to computers which then operate as primary time servers.

A primary server that receives a time signal from a stratum 0 device either through the GPS network or national time and frequency transmission is known as a stratum-1 device. On a network a stratum 1 time server supplies the time to other devices on the network which are known as stratum-2 devices. These also can be used as a time source and equipment that connects to a stratum-2 device to receive it become stratum-3 and so on.

NTP can handle up to 16 different stratum levels, although the lower down the hierarchy you go the less accurate the devices become.


Here is a Q&A that describes how to set it up:

How do I set Ubuntu to use the primary time server time.nist.gov?

The settings are in /etc/ntp.conf and there is only a few changes that need to be made.

First is to comment out the lines that specify the pools.

Then add this line instead:

enter image description here

SDsolar
  • 3,169
  • What makes you say pools are terrible? I did a quick test now with ntpd -d pool.ntp.org, on a machine that has GPS clock. Result? offset 0.000452 sec Over a hundred queries, there was always three leading zeroes... That's pretty damn close to true time. And more than enough for any regular use! – vidarlo Nov 04 '17 at 09:27
  • I see consistently good times from those pools as well. That the pools is set up to provide stratum 12 to 16 is patently false. I use various pools as source, and it's rare to see a stratum three. And anyway - a stratum 3 should provide sub-second time. time.windows.com for instance is stratum 2. 0.debian.pool.ntp.org returns a stratum 2. Ubuntu pool returns a stratum 2... – vidarlo Nov 04 '17 at 17:22
  • I'll have to take your word on that. For me, it fixed my machine-synchronization problems. I did the same to all my Raspberry Pi-based data loggers so all the systems had the same source. Now Filezilla just zips along, updating only the proper files. – SDsolar Nov 04 '17 at 20:30