Differences between revisions 10 and 12 (spanning 2 versions)
Revision 10 as of 2010-01-27 20:23:43
Size: 2254
Editor: PaulBrossier
Comment: update crontab entry to use ntpdate-debian
Revision 12 as of 2010-11-16 12:21:31
Size: 2423
Comment: ntp-simple is no longer in lenny + new Public Time Servers Pool
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
||<tablewidth="100%" tablestyle=""style="border: 0px hidden ;">~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: none-~ ||<style="border: 0px hidden ; text-align: right;"> (!) [[/Discussion]] || ||<tablewidth="100%" tablestyle=""style="border: 0px hidden ;">~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[it/NTP|Italiano]] -~ ||<style="border: 0px hidden ; text-align: right;"> (!) [[/Discussion]] ||
Line 15: Line 15:
aptitude install ntp-simple aptitude install ntp
Line 24: Line 24:
 * [Troubleshooting] If you run '''ntpq -p''' and you get  * If you run '''ntpq -p''' and you get
Line 54: Line 54:
To configure the system to synchronize the clock with an Internet Time Server every morning, add the following entry to the /etc/crontab configuration file: To configure the system to synchronize the clock with an Internet Time Server every morning, add the following entry to the {{{/etc/crontab}}} configuration file:
Line 62: Line 62:
uk.pool.ntp.org (This points to a random United Kingdom based time server)  * {{{pool.ntp.org}}} - This points to a random worldwide time server.
 * {{{europe.pool.ntp.org}}} - This points to a random European time server.
 * {{{uk.pool.ntp.org}}} - This points to a random United Kingdom based time server.

Translation(s): English - Italiano

(!) ?/Discussion


  • Network Time Protocol, This will keep you system date with exact match to actual date.

Install and Configure

  • Type date to see current date and time

date
  • Install NTP

aptitude install ntp
aptitude install ntpdate
  • Done.
  • Type ntpq -p to see servers you are syncing with.

  • Type date again to see if the time changed. You time should be synced in a next minute.

  • Done.

Troubleshooting

  • If you run ntpq -p and you get

No association ID's returned
  • Run

dpkg-reconfigure ntp
  • And then again:

ntpq -p

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 ntp.pbx.org     xx.xxx.xxx.xxx   2 u    -   64    1   33.763  1799619   1.054
 xray.metadom.co xx.xxx.xxx.xxx   2 u    1   64    1   40.367  1799619   0.001
 hydrogen.cert.u xx.xxx.xxx.xxx   2 u    -   64    1   64.740  1799619   0.001
 mirror          .INIT.          16 u    -   64    0    0.000    0.000   0.001

Add your time server

  • [Optional] If you would like to add a server that is closer to you and you know its address. You could type:

/etc/init.d/ntp-server stop
ntpdate clock.fmt.he.net
ntpdate ntp1.tummy.com
/etc/init.d/ntp-server start

Using The Cron

To configure the system to synchronize the clock with an Internet Time Server every morning, add the following entry to the /etc/crontab configuration file:

#m h dom mon dow user  command
57 5 *   *   *  root   /usr/sbin/ntpdate-debian > /dev/null

Public Internet Time Servers

  • pool.ntp.org - This points to a random worldwide time server.

  • europe.pool.ntp.org - This points to a random European time server.

  • uk.pool.ntp.org - This points to a random United Kingdom based time server.