Skip navigation

This post can be used in conjunction with the VMware Server post. I wanted my Linux host to have the clock synchronised with an NTP server so doing propagating it onto the VM Machines.

These are the steps required.

  1. run: sudo aptitude install ntpd
  2. run: vi /etc/ntp.conf (assuming you have vim tools installed)
  3. locate “server” and added the address of the NTP server instead of
  4. run: cp /usr/share/zoneinfo/Europe/Malta /etc/localtime (amend this according to your timezone)
  5. run: /etc/init.d/ntp restart (to restart the service)
  6. Next we have to check if the NTP server was picked up and the status of the synchronization, run: ntpq
  7. run: peers (see first screenshot)
  8. Check that the Peer Remote has been populated with the NTP server address inserted in the ntp.conf previously , ref id: is the high order stratum NTP server. What is most important here is the reach, since this increments accornding to how reliable the NTP (local) server is, and the poll, which will increase polling time if servers is reliable.
  9. run: association, and check the status. If you just restarted the NTP service, and the polling and reach values are low, than the condition would be rejected.
  10. After some time, when the reach values increase (meaning server is reliable and therefore also the poll interval increases) running once again the command association will return a different output. (see second screenshot). The condition will change to sys.peer
  11. Running peers once again will now output  reach 377 which means the data connection is good and an * which means preferred server. The Poll interval will also increase from 64 to any larger number over time.

Further details can be found here:

“To watch the status of the ntpd process, run:

"ntpq -p"

Press Ctrl-c to stop watching the process.

Note the information in the following columns:

  • The character in the first column indicates the quality of the source.
  • The asterisk ( * ) indicates the source is the current reference.
  • remote lists the IP address or host name of the source.
  • when indicates how many seconds have passed since the source was polled.
  • poll indicates the polling interval. This value increases depending on the accuracy of the local clock.
  • reach is an octal number that indicates reachability of the source. A value of 377 indicates the source has answered the last eight consecutive polls.
  • offset is the time difference between the source and the local clock in milliseconds”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: