Differences between revisions 2 and 27 (spanning 25 versions)
Revision 2 as of 2008-03-02 08:27:50
Size: 1743
Editor: MarkHobley
Comment: Additional content imported from markhobley.yi.org
Revision 27 as of 2020-03-17 08:36:42
Size: 2769
Comment: create parent section otherwise links to info are subsection of totally unrelated one
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
||<tablestyle="width: 100%;" style="border: 0px hidden">~-[:DebianWiki/EditorGuide#translation:Translation(s)]: [:fr/NTP:Français]-~||<style="text-align: right;border: 0px hidden"> (!) [:/Discussion:Discussion]|| ~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[es/NTP|Español]] - [[it/NTP|Italiano]] - [[pt_BR/NTP|Português Brasileiro]]-~
Line 4: Line 4:
Describe in one or two lines what your page is about. = NTP =
Network Time Protocol. This will make your system date match actual date, by synchronizing with network time servers.
Line 6: Line 7:
## If your page gets really long, uncomment this Table of Contents
 [[TableOfContents(2)]]
{i} systemd-timesyncd acts as a NTP client even when no network is available. This is enough to synchronize a system. NTP deamon is required only when a NTP '''server''' is required. See [[https://www.freedesktop.org/software/systemd/man/systemd-timesyncd.service.html| Freedesktop.org's page on timesyncd]] for more details
Line 9: Line 9:
#language en
||<tablestyle="width: 100%;" style="border: 0px hidden">~-[:DebianWiki/EditorGuide#translation:Translation(s)]: none-~||<style="text-align: right;border: 0px hidden"> (!) [:/Discussion:Discussion]||
----
Network Time Protocol, This will keep you system date with exact match to actual date.
## If your page gets really long, uncomment this Table of Contents
## [[TableOfContents(2)]]
== Install and Configure ==
 * Type date to see current date and time. (Use -R to get a standard unambiguous format. Locale specific timezones are ambiguous.)
{{{
date -R
}}}
 * Install NTP
{{{
aptitude install ntp
}}}
 * Done.
Line 14: Line 22:
## If your page gets really long, uncomment this Table of Contents
 [[TableOfContents(2)]]
 * 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
Line 17: Line 38:
 *Type date to see current date and time
{{{
date
}}}
 *Install NTP
{{{
apt-get install ntpdate
}}}
 *Done.
 *Type '''date''' again to see if the time changed.
 *[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
     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
Line 35: Line 46:
=== Using The Cron === == Public Internet Time Servers ==
Line 37: Line 48:
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: The Debian package will install a default set of time servers which should be good for most typical client installations. However you may customize this for your network location. A good source of NTP pool information is the NTP Pool Project.
Line 39: Line 50:
#m h dom mon dow user command
57 5 * * * root /usr/sbin/ntpdate ntp.blueyonder.co.uk
 * https://www.pool.ntp.org/
Line 42: Line 52:
=== Public Internet Time Servers === == See also ==
Line 44: Line 54:
uk.pool.ntp.org (This points to a random United Kingdom based time server) === Debian-specific information ===

 [[DebianPkg:ntp|ntp]]

 [[DebianBug:ntp|Bugs]]

 [[DebianMan:ntpd|Manual page]]

 [[https://security-tracker.debian.org/tracker/source-package/ntp|Security Bug Tracker]]

=== Upstream specific information ===

  [[https://support.ntp.org/bin/view/Main/WebHome|Homepage]]

  [[https://bugs.ntp.org/index.cgi|Bugs & Issues]]

  [[https://support.ntp.org/bin/view/Main/DocumentationIndex|Documentation Index]]

=== Other information ===

  [[WikiPedia:Network Time Protocol|NTP on wikipedia]]
Line 46: Line 77:
## You can add other _helpful_ links here.
##See also:
## If this page belongs to an existing Category, add it below.
 CategoryNetwork

CategoryNetwork CategorySoftware CategorySystemAdministration CatgeoryTime

Translation(s): English - Español - Italiano - Português Brasileiro


NTP

Network Time Protocol. This will make your system date match actual date, by synchronizing with network time servers.

{i} systemd-timesyncd acts as a NTP client even when no network is available. This is enough to synchronize a system. NTP deamon is required only when a NTP server is required. See Freedesktop.org's page on timesyncd for more details

Install and Configure

  • Type date to see current date and time. (Use -R to get a standard unambiguous format. Locale specific timezones are ambiguous.)

date -R
  • Install NTP

aptitude install ntp
  • 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

Public Internet Time Servers

The Debian package will install a default set of time servers which should be good for most typical client installations. However you may customize this for your network location. A good source of NTP pool information is the NTP Pool Project.

See also

Debian-specific information

Upstream specific information

Other information


CategoryNetwork CategorySoftware CategorySystemAdministration ?CatgeoryTime