Ubuntu Server Guide Changes, errors and bugs
Serve the Network Time Protocol
Download 1.27 Mb. Pdf ko'rish
|
ubuntu-server-guide
- Bu sahifa navigatsiya:
- Installation
- Chronyd Configuration
Serve the Network Time Protocol
If in addition to synchronizing your system you also want to serve NTP information you need an NTP server. There are several options with chrony, ntpd and open-ntp. The recommended solution is chrony. chrony(d) The NTP daemon chronyd calculates the drift and offset of your system clock and continuously adjusts it, so there are no large corrections that could lead to inconsistent logs for instance. The cost is a little processing power and memory, but for a modern server this is usually negligible. Installation To install chrony, from a terminal prompt enter: sudo apt i n s t a l l chrony This will provide two binaries: 60 • chronyd - the actual daemon to sync and serve via the NTP protocol • chronyc - command-line interface for chrony daemon Chronyd Configuration Edit /etc/chrony/chrony.conf to add/remove server lines. By default these servers are configured: # Use s e r v e r s from t h e NTP Pool P r o j e c t . Approved by Ubuntu T e c h n i c a l Board # on 2011−02−08 (LP : #104525) . See h t t p : / /www. p o o l . ntp . o r g / j o i n . html f o r # more i n f o r m a t i o n . p o o l 0 . ubuntu . p o o l . ntp . o r g i b u r s t p o o l 1 . ubuntu . p o o l . ntp . o r g i b u r s t p o o l 2 . ubuntu . p o o l . ntp . o r g i b u r s t p o o l 3 . ubuntu . p o o l . ntp . o r g i b u r s t See man chrony.conf for more details on the configuration options. After changing the any of the config file you have to restart chrony: sudo s y s t e m c t l r e s t a r t chrony . s e r v i c e Of the pool 2.ubuntu.pool.ntp.org as well as ntp.ubuntu.com also support ipv6 if needed. If one needs to force ipv6 there also is ipv6.ntp.ubuntu.com which is not configured by default. View status Use chronyc to see query the status of the chrony daemon. For example to get an overview of the currently available and selected time sources. chronyc s o u r c e s MS Name/ IP a d d r e s s Stratum P o l l Reach LastRx Last sample =============================================================================== ^+ gamma . r u e c k g r . a t 2 8 377 135 −1048 us [ −1048 us ] +/− 29 ms ^− 2b . ncomputers . o r g 2 8 377 204 −1141 us [ −1124 us ] +/− 50 ms ^+ www. k a s h r a . com 2 8 377 139 +3483 us [+3483 us ] +/− 18 ms ^+ stratum2 −4.NTP. TechFak . U> 2 8 377 143 −2090 us [ −2073 us ] +/− 19 ms ^− z e p t o . mcl . gg 2 7 377 9 −774 us [ −774 us ] +/− 29 ms ^− m i r r o r h o s t . pw 2 7 377 78 −660 us [ −660 us ] +/− 53 ms ^− a t t o . mcl . gg 2 7 377 8 −823 us [ −823 us ] +/− 50 ms ^− s t a t i c . 1 4 0 . 1 0 7 . 4 6 . 7 8 . c l i > 2 8 377 9 −1503 us [ −1503 us ] +/− 45 ms ^− 4 . 5 3 . 1 6 0 . 7 5 2 8 377 137 −11ms [ −11ms ] +/− 117 ms ^− 3 7 . 4 4 . 1 8 5 . 4 2 3 7 377 10 −3274 us [ −3274 us ] +/− 70 ms 61 ^− b a g n i k i t a . com 2 7 377 74 +3131 us [+3131 us ] +/− 71 ms ^− europa . e l l i p s e . n e t 2 8 377 204 −790 us [ −773 us ] +/− 97 ms ^− t e t h y s . hot− c h i l l i . n e t 2 8 377 141 −797 us [ −797 us ] +/− 59 ms ^− 66−232−97−8. s t a t i c . hvvc .> 2 7 377 206 +1669 us [+1686 us ] +/− 133 ms ^+ 8 5 . 1 9 9 . 2 1 4 . 1 0 2 1 8 377 205 +175 us [ +192 us ] +/− 12 ms ^* 46−243−26−34. t a n g o s . n l 1 8 377 141 −123 us [ −106 us ] +/− 10 ms ^− pugot . c a n o n i c a l . com 2 8 377 21 −95us [ −95us ] +/− 57 ms ^− alphyn . c a n o n i c a l . com 2 6 377 23 −1569 us [ −1569 us ] +/− 79 ms ^− golem . c a n o n i c a l . com 2 7 377 92 −1018 us [ −1018 us ] +/− 31 ms ^− c h i l i p e p p e r . c a n o n i c a l . com 2 8 377 21 −1106 us [ −1106 us ] +/− 27 ms chronyc s o u r c e s t a t s 210 Number o f s o u r c e s = 20 Name/ IP Address NP NR Span Frequency Freq Skew O f f s e t Std Dev ============================================================================== gamma . r u e c k g r . a t 25 15 32m −0.007 0 . 1 4 2 −878 us 106 us 2b . ncomputers . o r g 26 16 35m −0.132 0 . 2 8 3 −1169 us 256 us www. k a s h r a . com 25 15 32m −0.092 0 . 2 5 9 +3426 us 195 us stratum2 −4.NTP. TechFak . U> 25 14 32m −0.018 0 . 1 3 0 −2056 us 96 us z e p t o . mcl . gg 13 11 21m +0.148 0 . 1 9 6 −683 us 66 us m i r r o r h o s t . pw 6 5 645 +0.117 0 . 4 4 5 −591 us 19 us a t t o . mcl . gg 21 13 25m −0.069 0 . 1 9 9 −904 us 103 us s t a t i c . 1 4 0 . 1 0 7 . 4 6 . 7 8 . c l i > 25 18 34m −0.005 0 . 0 9 4 −1526 us 78 us 4 . 5 3 . 1 6 0 . 7 5 25 10 32m +0.412 0 . 1 1 0 −11ms 84 us 3 7 . 4 4 . 1 8 5 . 4 2 24 12 30m −0.983 0 . 1 7 3 −3718 us 122 us b a g n i k i t a . com 17 7 31m −0.132 0 . 2 1 7 +3527 us 139 us europa . e l l i p s e . n e t 26 15 35m +0.038 0 . 5 5 3 −473 us 424 us t e t h y s . hot− c h i l l i . n e t 25 11 32m −0.094 0 . 1 1 0 −864 us 88 us 66−232−97−8. s t a t i c . hvvc .> 20 11 35m −0.116 0 . 1 6 5 +1561 us 109 us 8 5 . 1 9 9 . 2 1 4 . 1 0 2 26 11 35m −0.054 0 . 3 9 0 +129 us 343 us 46−243−26−34. t a n g o s . n l 25 16 32m +0.129 0 . 2 9 7 −307 us 198 us pugot . c a n o n i c a l . com 25 14 34m −0.271 0 . 1 7 6 −143 us 135 us alphyn . c a n o n i c a l . com 17 11 1100 −0.087 0 . 3 6 0 −1749 us 114 us golem . c a n o n i c a l . com 23 12 30m +0.057 0 . 3 7 0 −988 us 229 us c h i l i p e p p e r . c a n o n i c a l . com 25 18 34m −0.084 0 . 2 2 4 −1116 us 169 us Certain chronyc commands are privileged and can not be run via the network without explicitly allowing them. See section Command and monitoring access in man chrony.conf for more details. A local admin can use sudo as usually as this will grant him access to the local admin socket /var/run/chrony/chronyd.sock. 62 |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling