Managing Accurate Date and Time

Avi Alkalay

IBM Linux Impact Team :: ibm.com/linux <http://ibm.com/linux>
Linux, Open Standards consultant :: Senior IT and Software Architect

avi at unix.sh
avi at br.ibm.com

Brad Knowles - pool.ntp.org 偲 NTP stratum 2 岞奐僞僀儉僒乕僶偺棙梡偵娭
偡傞帵嵈

Kent Borg - ntpdc 偺戙傢傝偵 ntpq 傪棙梡偣傛偲偺帵嵈

Yura Moron - ntpq 偲 ntpdc 偺忣曬偵娭偡傞椙偄椺

拞栰晲梇 - 擔杮岅栿

nakano at apm.seikei.ac.jp
 

SHAKI - 儘僔傾岅栿

sha-ki at narod.ru

Copyright (C) 2002,2003 by Avi Alkalay

1.0.6 :: 2004-02-25

Revision History                                                       
Revision 1.0.6           25 Feb 2004         Revised by: avi           
Included credits and link to russian translation.                      
Revision 1.0.5           05 Jul 2003         Revised by: avi           
Changed public time servers list URL. Added pool.ntp.org.              
Revision 1.0.4           21 Dec 2002         Revised by: avi           
Added japanese translation link and credits.                           
Revision 1.0.3           24 Aug 2002         Revised by: avi           
Fixed wrong screen and programlisting widths.                          
Revision 1.0.2           04 Aug 2002         Revised by: avi           
Link to public time servers page.                                      
Revision 1.0.1           07 May 2002         Revised by: avi           
Final XML conversion. Files reorganization.                            
Revision 1.0             28 Apr 2002         Revised by: avi           
Finalized image.                                                       
Revision 0.8             27 Apr 2002         Revised by: avi           
Switched from ntpdc example to ntpq, based on contributions.           
Revision 0.8.1           20 Apr 2002         Revised by: avi           
Improved graphic. Links to other doc locations.                        
Revision 0.8             14 Apr 2002         Revised by: avi           
Beter tunning of NTP graphic.                                          
Revision 0.76            13 Apr 2002         Revised by: avi           
Inclusion of architecture graphic.                                     
Revision 0.75            10 Apr 2002         Revised by: avi           
Spell checked. Using DocBook XSLT 1.50.                                
Revision 0.65            31 Mar 2002         Revised by: avi           
Upgraded to XML 4.1.2 DocBook format                                   
Revision 0.6             29 Mar 2002         Revised by: avi           
Finished timezone mechanism on Linux. Created appendix. Now only       
drawings are needed.                                                   
Revision 0.4             24 Mar 2002         Revised by: avi           
All skeleton defined. All command examples written.                    
Revision 0.2             19 Mar 2002         Revised by: avi           
First DocBook version                                                  

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

Table of Contents
1. 僐儞僺儏乕僞偵偍偗傞抧媴忋偱偺擔晅丒帪娫偺埖偄
2. 僞僀儉僝乕儞偲偼
   
    2.1. 僒儅乕僞僀儉 (Daylight Savings Time, DST)
    2.2. 僞僀儉僝乕儞偺椺
    2.3. Linux 偵偍偗傞僞僀儉僝乕儞偺巇慻傒
   
3. Linux 儅僔儞傪惓偟偔愝掕偡傞
   
    3.1. 僞僀儉僝乕儞愝掕
    3.2. 僴乕僪僂僃傾僋儘僢僋傪愝掕偡傞
   
4. 惓妋側悽奅帪偵摨婜偡傞
   
    4.1. NTP: 僱僢僩儚乕僋僞僀儉僾儘僩僐儖
    4.2. 娙扨側帪崗摨婜峔憿傪峔抸偡傞
    4.3. NTP 偺愝掕
    4.4. 帪崗摨婜偺妋擣
    4.5. NTP 偑僽乕僩帪偵帺摦婲摦偡傞傛偆愝掕偡傞
   
A. 偙偺暥彂偵偮偄偰

1. 僐儞僺儏乕僞偵偍偗傞抧媴忋偱偺擔晅丒帪娫偺埖偄

  抧媴忋偺偁傞抧堟偵抲偐傟偨僐儞僺儏乕僞偑尰嵼帪崗傪寛掕偡傞偵偼丄師偺
擇偮偺忣曬傪惓妋偵抦傞昁梫偑偁傝傑偡丅

 1. 惓偟偄 UTC 帪崗 (僌儕僯僢僕偵偍偗傞悽奅帪丅偨偩偟 GMT 偱偼側偄)
   
 2. 偦偺抧堟偺尰嵼偺僞僀儉僝乕儞
   
  僐儞僺儏乕僞偵偼僴乕僪僂僃傾僋儘僢僋傕晅懏偟偰偍傝丄 OS 偼帺暘偺帪崗
傪愝掕偡傞偲偒偵偙傟傪婎弨偲偟偰梡偄傑偡丅

  OS 偺擔晅偲帪崗 (埲崀偱偼擔晅/帪崗偺偄偢傟偐偺傒傪彂偒傑偡) 偼婲摦帪
偵愝掕偝傟傑偡丅壗傜偐偺僗僋儕僾僩偑僴乕僪僂僃傾僋儘僢僋傪撉傒丄傑偨僞
僀儉僝乕儞傪寁嶼偟偰 OS 偵愝掕偟傑偡 (BIOS 偵偼僞僀儉僝乕儞偺僨乕僞偼曐
懚偝傟偰偄傑偣傫)丅偙偺摨婜偑側偝傟偰埲崀偼丄BIOS 偺帪崗偲 OS 偺帪崗偲
偼姰慡偵撈棫偟偨傕偺偲側傝傑偡丅偱偡偐傜偟偽傜偔宱偭偨屻偱偼丄椉幰偑悢
昩堎側傞偙偲傕偁傞偐傕偟傟傑偣傫丅偳偪傜偑惓偟偄偺偱偟傚偆偐丠壗傜偐偺
愝掕傪偟偰偄側偄尷傝丄偳偪傜傕惓偟偔偼偁傝傑偣傫丅

  偙偙偱偼丄偙偺椉幰傪抧媴忋偺偁傜備傞応強偱 100% 惓妋偵偡傞曽朄偵偮偄
偰媍榑偟偰偄偒傑偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

2. 僞僀儉僝乕儞偲偼

  僞僀儉僝乕儞偲偼丄抧媴傪抧棟妛揑偵丄僀僊儕僗偺僌儕僯僢僕傪婲揰偲偟偰
15o 偛偲偵暘妱偟偨傕偺偱偡丅悽奅偺暿偺応強偱偼崱壗帪側偺偐丄偲偄偆偙偲
傪傢偐傝傗偡偔偡傞偨傔偵嶌傜傟傑偟偨丅

  嬤擭偱偼僞僀儉僝乕儞偼丄抧棟妛揑偲偄偆傛傝偼丄偢偭偲惌帯揑側傕偺偵側
偭偰偄傑偡丅恖乆偼乽嬤偔偺恖偨偪乿偲帪崗傪嫟桳偟偨偄応崌偑偁傞偐傜偱偡
丅傑偨徣僄僱儖僊乕偺柺偐傜丄崱擔偱偼僒儅乕僞僀儉 (Daylight Savings
Time) 偑棙梡偝傟偰偍傝丄偙傟傕僞僀儉僝乕儞傪曄壔偝偣傑偡丅

  僞僀儉僝乕儞偼捠忢奺崙偺惌晎傗揤暥婡娭偵傛偭偰掕媊偝傟丄 3 暥帤傑偨偼
4 暥帤偱昞婰偝傟傑偡丅椺偼 Section 2.2 傪尒偰偔偩偝偄丅

  悽奅偺暿偺抧堟偱崱壗帪側偺偐傪抦傝偨偄応崌偵偼丄 
timezoneconverter.com <http://www.timezoneconverter.com/> 偺 web 僒僀僩
傪巊偆偲傢偐傝傑偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

2.1. 僒儅乕僞僀儉 (Daylight Savings Time, DST)

  僄僱儖僊乕愡栺偺偨傔丄奺崙偺惌晎偼僒儅乕僞僀儉傪愝偗傞偙偲偑偁傝傑偡
丅巹偨偪偺帪寁偼 1 帪娫恑傔傜傟丄偙傟偵傛偭偰拫娫偑挿偔側偭偨傛偆偵姶偠
傜傟傑偡丅幚嵺偵婲偒偰偄傞偺偼丄扨偵僞僀儉僝乕儞偺曄峏偵偡偓傑偣傫丅婎
弨偲側傞帪崗 (UTC) 偼晄曄偱丄忢偵摨偠偱偡丅

  Linux 偱僒儅乕僞僀儉傪帺摦揑偵桳岠丒柍岠偵偡傞曽朄偵偮偄偰偼丄屻傎偳
尒偰偄偔偙偲偵偟傑偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

2.2. 僞僀儉僝乕儞偺椺

  椺傪偍尒偣偡傞埲忋偵傢偐傝傗偡偄愢柧偼側偄偱偟傚偆丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

Table 1. 僽儔僕儖偺僞僀儉僝乕儞偲 UTC 偵懳偡傞帪嵎

劇劅劅劅劅劍劅劅劅劅劅劍劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆柤慜偲帪劆DST 偺柤慜劆応強                                        劆
劆嵎      劆偲帪嵎    劆                                            劆
劌劅劅劅劅劑劅劅劅劅劅劑劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劎
劆BREST   劆BREDT -1: 劆Fernando de Noronha                         劆
劆-2:00   劆00        劆                                            劆
劌劅劅劅劅劑劅劅劅劅劅劑劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劎
劆BRST -3:劆BRDT -2:00劆So Paulo, Rio, Brasilia, Minas Gerais, North劆
劆00      劆          劆East Region, South Region,etc               劆
劌劅劅劅劅劑劅劅劅劅劅劑劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劎
劆BRWST   劆BRWDT -3: 劆West Region                                 劆
劆-4:00   劆00        劆                                            劆
劌劅劅劅劅劑劅劅劅劅劅劑劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劎
劆BRAST   劆BRADT -4: 劆Acre                                        劆
劆-5:00   劆00        劆                                            劆
劋劅劅劅劅劏劅劅劅劅劅劏劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

  US 偺僞僀儉僝乕儞偵偮偄偰丄偙偺傛偆側昞傪偳側偨偐憲偭偰偄偨偩偗傑偣傫
偐丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

2.3. Linux 偵偍偗傞僞僀儉僝乕儞偺巇慻傒

  Linux 僔僗僥儉偼 GLIBC 偺摦揑側僞僀儉僝乕儞傪梡偄偰偍傝丄偙傟偼 /etc/
localtime 偱寛傑傝傑偡丅偙偺僼傽僀儖偼丄偁傞僝乕儞忣曬僼傽僀儖傊偺儕儞
僋 (傑偨偼偦偺僐僺乕) 偱偡丅僝乕儞忣曬僼傽僀儖偼捠忢 /usr/share/
zoneinfo 僨傿儗僋僩儕埲壓偵抲偐傟偰偄傑偡丅

  抧棟妛揑側娤揰偐傜偄偆偲丄悽奅偵偼 360o/15o=24 偺僞僀儉僝乕儞偩偗偁傟
偽椙偄偼偢偱偡丅偟偐偟暔帠傪傢偐傝傗偡偔偡傞偨傔丄傑偨惌帯揑側曄峏 (僒
儅乕僞僀儉側偳) 偵偁傢偣傗偡偔偡傞偨傔丄 /usr/share/zoneinfo 偵偼悢昐傕
偺 zoneinfo 僼傽僀儖偑抲偐傟偰偄傑偡丅偦傟偧傟偼悽奅拞偺偁傜備傞搒巗丒
崙側偳偵懳墳偟偰偄傑偡偑丄姰慡側傕偺偱偼偁傝傑偣傫 (偦傟偼柍棟偱偟傚偆)
丅

  崙偵傛偭偰偼 (僽儔僕儖傕偦偆偱偡偑)丄僒儅乕僞僀儉偺奐巒偡傞擔晅偑寛傑
偭偰偄側偄偙偲傕偁傝傑偡丅僽儔僕儖偱偼僒儅乕僞僀儉偼擭偛偲偵寛掕偝傟丄
壞偺 2乣3 偐寧慜偵巒傑傝傑偡丅偙偺忬嫷傪偆傑偔埖偆偵偼丄zoneinfo 僼傽僀
儖傪帺暘偱曄峏偟側偗傟偽側傝傑偣傫丅 zoneinfo 僼傽僀儖偼丄埲壓偺傛偆側
僥僉僗僩僼傽僀儖傪 zic 僐儅儞僪偱僐儞僷僀儖偡傞偙偲偵傛偭偰惗惉偝傟傑偡
丅

Example 1. 僽儔僕儖偺僝乕儞忣曬偺僥僉僗僩僼傽僀儖

# Brazil Time Zones                                                           
#                                                                             
# Brazilian Time Zones are:                                                   
# BREST: East of Brasilia. Fernando de Noronha.                               
# BRST:  Brasilia, So Paulo, Rio, Northeast, South etc                        
# BRWST: West of Brasilia. Mato Grosso, Manaus                                
# BRAST: Acre.                                                                
#                                                                             
# In daylight saving time, letter 'S' changes to 'D'.                         
#                                                                             
# To install, make:                                                           
#                                                                             
# # zic Brazil.txt                                                            
#                                                                             
# Zone files will be installed in /usr/share/zoneinfo (depends on your        
# distribution). Then, make a symbolic link from your zone to /etc/localtime: 
#                                                                             
# # ln -sf /usr/share/zoneinfo/Brazil/Brasilia /etc/localtime                 
#                                                                             
#                                                                             
# If you have updates and new standards to this file please send to           
#                                                                             
# Avi Alkalay <avi @ unix.sh>                                                 
#                                                                             
# Last update: 18 Nov 2000                                                    
# This file is available at http://avi.alkalay.net/linux/zoneinfo/            
#                                                                             
                                                                              
# Rule  NAME    FROM  TO    TYPE  IN    ON   AT    SAVE   LETTER/S            
Rule    Brazil  1931  1932  -     Oct   3    0:00  1:00   D                   
Rule    Brazil  1932  1933  -     Mar   31   0:00  0      S                   
Rule    Brazil  1949  only  -     Dec   1    0:00  1:00   D                   
Rule    Brazil  1950  only  -     Apr   30   0:00  0      S                   
Rule    Brazil  1950  1952  -     Dec   1    0:00  1:00   D                   
Rule    Brazil  1951  only  -     Apr   16   0:00  0      S                   
Rule    Brazil  1952  only  -     Mar   31   0:00  0      S                   
Rule    Brazil  1953  only  -     Feb   28   0:00  0      S                   
Rule    Brazil  1963  only  -     Oct   23   0:00  1:00   D                   
Rule    Brazil  1964  only  -     Mar   1    0:00  0      S                   
Rule    Brazil  1965  only  -     Jan   31   0:00  1:00   D                   
Rule    Brazil  1965  only  -     Mar   31   0:00  0      S                   
Rule    Brazil  1965  only  -     Dec   1    0:00  1:00   D                   
Rule    Brazil  1966  1968  -     Mar   1    0:00  0      S                   
Rule    Brazil  1966  1967  -     Nov   1    0:00  1:00   D                   
Rule    Brazil  1984  only  -     Nov   2    0:00  1:00   D                   
Rule    Brazil  1985  only  -     Mar   15   0:00  0      S                   
Rule    Brazil  1985  only  -     Nov   2    0:00  1:00   D                   
Rule    Brazil  1986  only  -     Mar   15   0:00  0      S                   
Rule    Brazil  1986  only  -     Oct   25   0:00  1:00   D                   
Rule    Brazil  1987  only  -     Feb   14   0:00  0      S                   
Rule    Brazil  1987  only  -     Oct   25   0:00  1:00   D                   
Rule    Brazil  1988  only  -     Feb   7    0:00  0      S                   
Rule    Brazil  1988  only  -     Oct   16   0:00  1:00   D                   
Rule    Brazil  1989  only  -     Jan   29   0:00  0      S                   
Rule    Brazil  1989  only  -     Oct   15   0:00  1:00   D                   
Rule    Brazil  1990  only  -     Feb   11   0:00  0      S                   
Rule    Brazil  1990  only  -     Oct   21   0:00  1:00   D                   
Rule    Brazil  1991  only  -     Feb   17   0:00  0      S                   
Rule    Brazil  1991  only  -     Oct   20   0:00  1:00   D                   
Rule    Brazil  1992  only  -     Feb   9    0:00  0      S                   
Rule    Brazil  1992  only  -     Oct   25   0:00  1:00   D                   
Rule    Brazil  1993  only  -     Jan   31   0:00  0      S                   
Rule    Brazil  1993  only  -     Oct   17   0:00  1:00   D                   
Rule    Brazil  1994  only  -     Feb   20   0:00  0      S                   
Rule    Brazil  1994  only  -     Oct   16   0:00  1:00   D                   
Rule    Brazil  1995  only  -     Feb   19   0:00  0      S                   
Rule    Brazil  1995  only  -     Oct   15   0:00  1:00   D                   
Rule    Brazil  1996  only  -     Feb   11   0:00  0      S                   
Rule    Brazil  1996  only  -     Oct   06   0:00  1:00   D                   
Rule    Brazil  1997  only  -     Feb   16   0:00  0      S                   
Rule    Brazil  1997  only  -     Oct   06   0:00  1:00   D                   
Rule    Brazil  1998  only  -     Mar   01   0:00  0      S                   
Rule    Brazil  1998  only  -     Oct   11   0:00  1:00   D                   
Rule    Brazil  1999  only  -     Feb   21   0:00  0      S                   
Rule    Brazil  1999  only  -     Oct   03   0:00  1:00   D                   
Rule    Brazil  2000  only  -     Feb   27   0:00  0      S                   
Rule    Brazil  2000  only  -     Oct   8    0:00  1:00   D                   
Rule    Brazil  2001  only  -     Feb   18   0:00  0      S                   
                                                                              
                                                                              
# Zone  NAME                          GMTOFF  RULES/SAVE    FORMAT  [UNTIL]   
Zone    Brazil/DeNoronha              -2:00   Brazil        BRE%sT            
Zone    posix/Brazil/DeNoronha        -2:00   Brazil        BRE%sT            
Zone    right/Brazil/DeNoronha        -2:00   Brazil        BRE%sT            
Zone    Brazil/East                   -2:00   Brazil        BRE%sT            
Zone    posix/Brazil/East             -2:00   Brazil        BRE%sT            
Zone    right/Brazil/East             -2:00   Brazil        BRE%sT            
                                                                              
Zone    America/Sao_Paulo             -3:00   Brazil        BR%sT             
Zone    America/Rio_de_Janeiro        -3:00   Brazil        BR%sT             
Zone    America/Brasilia              -3:00   Brazil        BR%sT             
Zone    posix/America/Sao_Paulo       -3:00   Brazil        BR%sT             
Zone    posix/America/Rio_de_Janeiro  -3:00   Brazil        BR%sT             
Zone    posix/America/Salvador        -3:00   Brazil        BR%sT             
Zone    posix/America/Brasilia        -3:00   Brazil        BR%sT             
Zone    posix/Brazil/Central          -3:00   Brazil        BR%sT             
Zone    posix/Brazil/Brasilia         -3:00   Brazil        BR%sT             
Zone    posix/Brazil/Sao_Paulo        -3:00   Brazil        BR%sT             
Zone    posix/Brazil/Salvador         -3:00   Brazil        BR%sT             
Zone    posix/Brazil/Rio_de_Janeiro   -3:00   Brazil        BR%sT             
Zone    right/America/Sao_Paulo       -3:00   Brazil        BR%sT             
Zone    right/America/Rio_de_Janeiro  -3:00   Brazil        BR%sT             
Zone    right/America/Salvador        -3:00   Brazil        BR%sT             
Zone    right/America/Brasilia        -3:00   Brazil        BR%sT             
Zone    right/Brazil/Central          -3:00   Brazil        BR%sT             
Zone    right/Brazil/Brasilia         -3:00   Brazil        BR%sT             
Zone    right/Brazil/Sao_Paulo        -3:00   Brazil        BR%sT             
Zone    right/Brazil/Salvador         -3:00   Brazil        BR%sT             
Zone    right/Brazil/Rio_de_Janeiro   -3:00   Brazil        BR%sT             
Zone    Brazil/Central                -3:00   Brazil        BR%sT             
Zone    Brazil/Brasilia               -3:00   Brazil        BR%sT             
Zone    Brazil/Sao_Paulo              -3:00   Brazil        BR%sT             
Zone    Brazil/Rio_de_Janeiro         -3:00   Brazil        BR%sT             
Zone    Brazil/Salvador               -3:00   Brazil        BR%sT             
                                                                              
Zone    Brazil/West                   -4:00   Brazil        BRW%sT            
Zone    Brazil/Manaus                 -4:00   Brazil        BRW%sT            
Zone    Brazil/Rondonia               -4:00   Brazil        BRW%sT            
Zone    Brazil/Roraima                -4:00   Brazil        BRW%sT            
Zone    Brazil/Mato_Grosso            -4:00   Brazil        BRW%sT            
Zone    posix/Brazil/Manaus           -4:00   Brazil        BRW%sT            
Zone    posix/Brazil/Mato_Grosso      -4:00   Brazil        BRW%sT            
Zone    right/Brazil/Manaus           -4:00   Brazil        BRW%sT            
Zone    right/Brazil/Mato_Grosso      -4:00   Brazil        BRW%sT            
Zone    posix/America/Manaus          -4:00   Brazil        BRW%sT            
Zone    right/America/Manaus          -4:00   Brazil        BRW%sT            
                                                                              
Zone    Brazil/Acre                   -5:00   Brazil        BRA%sT            
                                                                              

  Rule 僽儘僢僋偼僞僀儉僝乕儞傪曄峏偡傞擔晅偲帪崗傪掕媊偟偰偄傑偡丅堦曽
Zone 僽儘僢僋偱偼丄偦偺僝乕儞傪娗棟偡傞 Rule 傪嶲徠偟偰偄傑偡丅

  偙偺僼傽僀儖偺僐儊儞僩偱偼丄僝乕儞忣曬僐儞僷僀儔偱偁傞 zic 傪巊偭偰偙
傟傜偺僞僀儉僝乕儞傪僀儞僗僩乕儖偡傞曽朄偑愢柧偝傟偰偄傑偡 (婛偵僀儞僗
僩乕儖嵪傒偵側偭偰偄傞偲巚偄傑偡偑)丅僀儞僗僩乕儖偟偨傕偺傪桳岠偵偡傞偵
偼丄偦偺僝乕儞忣曬僼傽僀儖傪 /etc/localtime 僼傽僀儖偐傜儕儞僋 (偁傞偄
偼僐僺乕) 偡傞偩偗偱 OK 偱偡丅僨傿僗僩儕價儏乕僔儑儞偵傛偭偰偼丄傛傝崅
搙側 (偦偟偰偍偦傜偔傛傝朷傑偟偄) 僞僀儉僝乕儞偺愝掕曽朄偑懚嵼偟傑偡丅
偙傟傜偼 Section 3.1 偱愢柧偟傑偡丅

  /etc/localtime 偑惓偟偄 zoneinfo 僼傽僀儖傪巜偡傛偆偵偟偨傜丄婛偵偁側
偨偺僐儞僺儏乕僞偼偦偺僝乕儞偺婯懃偵廬偭偰偍傝丄僒儅乕僞僀儉偺曄峏傕帺
摦揑偵峴傢傟傑偡丅帪崗傪庤摦偱曄峏偡傞昁梫偼偁傝傑偣傫丅

  師偵帵偡堦楢偺僐儅儞僪偼丄 Linux 偺僞僀儉僝乕儞偵娭偡傞儊僇僯僘儉偺摦
嶌傪帵偡傕偺偱偡丅偙傟傜偼偡傋偰 1 暘埲撪偵幚峴偝傟偨傕偺偱偡丅

bash$ ls -al /etc/localtime                                                                   
lrwxrwxrwx  1 root root 35 May 22  2001 /etc/localtime -> /usr/share/zoneinfo/Brazil/Brasilia 
bash$ date                                                                                    
Fri Mar 29 20:13:38 BRST 2002                                                                 
bash# ln -sf /usr/share/zoneinfo/GMT /etc/localtime                                           
bash$ date                                                                                    
Fri Mar 29 23:13:47 GMT 2002                                                                  
bash# ln -sf /usr/share/zoneinfo/Brazil/Brasilia /etc/localtime                               
bash$ date                                                                                    
Fri Mar 29 20:14:03 BRST 2002                                                                 

  20:13 偵丄巹偼帺暘偺僨僼僅儖僩偱偁傞僽儔僕儖偺僞僀儉僝乕儞 (BRST) 偵
偄傑偟偨丅偙偙偱巹偼帺暘偺僔僗僥儉傪 GMT 偵曄峏偟丄偡傞偲巹偺僔僗僥儉帪
崗偼 23:13 偵側傝傑偟偨! 偁側偨傕丄帺暘偺偄傞僞僀儉僝乕儞偑僒儅乕僞僀儉
偵曄傢偭偨偲偒偵丄摨條偺尰徾傪尒傞偙偲偵側傝傑偡 [栿拲: 擔杮崙撪偱偼柍
棟偱偡偑 :-)]丅偨偩偟偦偺婯懃偼偡傋偰僞僀儉僝乕儞偺撪晹偵偁傞傕偺偱偡
(/etc/localtime 偺儕儞僋偑偙偺椺偺傛偆偵曄傢傞傢偗偱偼偁傝傑偣傫)丅

  偙偺儅僔儞偱摦嶌偟偰偄傞傾僾儕働乕僔儑儞 (傾僋僙僗儘僌傪惗惉偡傞 web
僒乕僶側偳) 偼丄偙偺曄峏傪擣幆偟傑偡丅偟偨偑偭偰 Section 1 偱弎傋偨偲偍
傝丄姰慡側堄枴偱偺帪崗偲偼尰嵼偺帪崗僾儔僗尰嵼偺僞僀儉僝乕儞偱偁傞丄偲
偄偆帠幚傪棟夝偡傞偙偲偼丄奐敪幰偵偲偭偰旕忢偵廳梫偱偡丅

  嵟屻偵巹偼丄帺暘偺惓偟偄僞僀儉僝乕儞偵栠偟傑偟偨丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

3. Linux 儅僔儞傪惓偟偔愝掕偡傞

  偳傫側 OS 傪僀儞僗僩乕儖偡傞偵偣傛丄尰嵼偺僞僀儉僝乕儞偵娭偡傞忣曬偼
昁恵偱偡丅偙傟偼搒巗丒廈丒崙側偳偱昞尰偝傟傑偡丅 BIOS 帪崗傪偳偆愝掕偡
傞偐傕寛傔偰偍偐側偗傟偽側傝傑偣傫偑丄偙傟偵偼師偺曽恓偵廬偆偺偑偄偄偱
偟傚偆丅

Linux 偩偗偺儅僔儞
   
      偙偺応崌偼 BIOS 帪崗偼 UTC 偵偟偰偍偔偺偑偄偄偱偟傚偆丅僒儅乕僞僀
    儉偺曄峏傕僞僀儉僝乕儞愝掕偵傛偭偰摦揑偵娗棟偝傟傑偡丅
   
Linux 偲 MS Windows 偺僨儏傾儖僽乕僩儅僔儞
   
      Windows 偼丄Linux 偵斾傋丄帪崗傪尨巒揑偵埖偄傑偡丅 Windows 偱偼
    BIOS 帪崗偑忢偵抧曽帪 (localtime) 偵摍偟偔丄偟偨偑偭偰僒儅乕僞僀儉
    偵偍偄偰偼丄僴乕僪僂僃傾僋儘僢僋偑捈愙曄峏偝傟傞偲偄偆丄傛傝戝偒側
    曄壔偑惗偠傞偙偲偵側傝傑偡丅 Linux 傕 Windows 傕僽乕僩帪偵偼僴乕僪
    僂僃傾偐傜帪崗傪庢摼偟偰愝掕偡傞偺偱丄椉幰傪嫟懚偝偣傞偲偒偵偼
    Linux 偱傕摨偠傗傝曽偱帪崗傪埖傢側偗傟偽側傝傑偣傫丅偟偨偑偭偰 BIOS
    帪崗傪帺暘偺抧曽帪偵崌傢偣側偗傟偽側傝傑偣傫丅
   
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

3.1. 僞僀儉僝乕儞愝掕

  Red Hat Linux 偍傛傃偦偺攈惗僔僗僥儉偱偼丄僴乕僪僂僃傾僋儘僢僋偺愝掕
曽恓偲僞僀儉僝乕儞偲偼 timeconfig 僐儅儞僪偱愝掕偱偒傑偡丅偙偺僐儅儞僪
偼儐乕僓乕僼儗儞僪儕乕側僟僀傾儘僌傪昞帵偟偰偔傟傑偡丅傑偨旕懳榖揑偵巊
偆偙偲傕偱偒傑偡丅

Example 2. 帪崗愝掕僣乕儖

bash# timeconfig "Brasil/East"   # set HC to localtime, and TZ to "Brazil/East" 
bash# timeconfig --utc "Brasil/East"   # set HC to UTC, and TZ to "Brazil/East" 

  偄偢傟偺曽朄偱傕丄timeconfig 偼婲摦帪偵撉傒崬傑傟傞 /etc/sysconfig/
clock 僼傽僀儖傪曄峏偟傑偡丅偙偺僼傽僀儖傪庤偱曇廤偡傞偙偲傕偱偒傑偡丅
師偺傛偆側撪梕偵側偭偰偄傞偼偢偱偡丅

Example 3. /etc/sysconfig/clock 僼傽僀儖

ZONE="Brazil/East"                                                     
UTC=true                                                               
ARC=false                                                              

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

3.2. 僴乕僪僂僃傾僋儘僢僋傪愝掕偡傞

  僴乕僪僂僃傾僋儘僢僋偺愝掕傪峴偆偺偼丄惓偟偄帪崗偺庢摼曽朄傪棟夝偟偰
偐傜偵偡傞偙偲傪偍偡偡傔偟偰偍偒傑偡丅偙偺傗傝曽偼 Section 4 偱愢柧偟傑
偡丅

  hwclock 偼僴乕僪僂僃傾僋儘僢僋 (HC) 傪撉傒彂偒偡傞僐儅儞僪偱丄偄偔偮
偐懚嵼偡傞僆僾僔儑儞偵墳偠偰摦嶌偟傑偡 (僆僾僔儑儞偵偮偄偰偼 man 儁乕僕
偵婰弎偝傟偰偄傑偡)丅偟偐偟嵟嬤偺 Linux 僨傿僗僩儕價儏乕僔儑儞傪巊偭偰
偄傞側傜偽丄 hwclock 傪巊偆昁梫偼偁傝傑偣傫丅 HC 偲僞僀儉僝乕儞偺曽恓傪
寛傔偨傜丄傛傝崅儗儀儖偺僐儅儞僪偱偁傞 setclock 傪巊偭偰 HC 傪惓偟偔愝
掕偱偒傑偡丅 setclock 偵偼僷儔儊乕僞傪搉偡昁梫偼側偔丄偙偺僐儅儞僪偼僀
儞僥儕僕僃儞僩偵 hwclock 傪屇傃丄尰嵼偺 OS 偺擔晅丒帪崗偵婎偯偄偰 BIOS
傪愝掕偟傑偡丅偟偨偑偭偰丄忢偵 setclock 傪巊偆傛偆偵偟傑偟傚偆丅

  偟偐偟僴乕僪儚乕僋偑岲偒側儈僯儅儕僗僩偺恖岦偗偵丄偄偔偮偐 hwclock 偺
椺傕偙偙偵嫇偘偰偍偒傑偟傚偆丅

Example 4. setclock 偲 hwclock 偺巊偄曽

bash# setclock                                  # The easy way to set HC                                 
bash# hwclock                                   # reads HC                                               
bash# hwclock --systohc --utc                   # set HC with UTC time based on OS current time          
bash# hwclock --systohc                         # set HC with local time based on OS current time        
bash# hwclock --set --date "22 Mar 2002 13:17"  # set HC with time specified on string                   

  OS 偺帪崗偼僴乕僪僂僃傾僋儘僢僋偲偼撈棫偟偰偄傞偨傔丄 BIOS 傪曄峏偟偰
傕丄師偵僽乕僩偡傞傑偱偦偺曄峏偼斀塮偝傟傑偣傫丅

  傕偆堦偮偺 HC 偺愝掕曽朄偲偟偰偼丄嵞婲摦偟偰僐儞僺儏乕僞偺 BIOS 夋柺
偵擖傞傗傝曽傕偁傝傑偡丅 IBM e-server zSeries <http://ibm.com/servers/
eserver/zseries/os/linux/> 偱偼丄偙傟偼 z/VM 儗儀儖偱峴偆昁梫偑偁傝傑偡
丅 Linux 偼偙偙偱偼 z/VM 忋偵嶌傜傟偨壖憐儅僔儞忋偱摦嶌偟偰偄傞偐傜偱偡
丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

4. 惓妋側悽奅帪偵摨婜偡傞

  娗棟偟偰偄傞偡傋偰偺儅僔儞偺帪崗傪惓妋偵曐偮偙偲偼丄偟偭偐傝偟偨僱僢
僩儚乕僋僙僉儏儕僥傿偺曽恓傪棫偰傞 (乽僼傽僀傾僂僅乕儖傪抲偔偩偗乿傛傝
偢偭偲愭偺儗儀儖) 偺偲摨偠偔傜偄廳梫側偙偲偱偡丅僔僗僥儉傪婡擻揑偐偮埨
慡偵丄惓偟偔娗棟偟偰偄偔忋偱丄帪崗偺摨婜偼庡梫側梫慺偺傂偲偮偲尵偊傑偡
丅摿偵暘嶶宆偺傾僾儕働乕僔儑儞傗 web 僒乕價僗丄偁傞偄偼暘嶶宆偺僙僉儏儕
僥傿娔帇僣乕儖傪娗棟偡傞応崌偵偼丄惓妋側帪崗偼昁梫晄壜寚偱偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

4.1. NTP: 僱僢僩儚乕僋僞僀儉僾儘僩僐儖

  偙偙偱偼僾儘僩僐儖偵偮偄偰偼怗傟傑偣傫偑丄偙偺偡偽傜偟偄敪柧偲僀儞僞
乕僱僢僩偺晛媦偲偑丄巹偨偪偵偳偺傛偆偵栶棫偭偰偔傟傞偐偼愢柧偟傑偟傚偆
丅 NTP 偵娭偡傞傛傝徻偟偄忣曬偼 www.ntp.org <http://www.ntp.org/> 偐傜
摼傜傟傞偱偟傚偆丅

  堦搙僔僗僥儉傪愝掕偡傞偲丄 NTP 偼 (摦嶌偟偰偄傞傾僾儕働乕僔儑儞偵偼塭
嬁傪媦傏偝側偄傛偆側) 旕忢偵彫偝側廋惓傪峴偄側偑傜丄偦偺惓妋側帪崗傪曐
帩偟傛偆偲偟懕偗傑偡丅

  尨巕偵娷傑傟傞揹巕偺怳摦悢傗僒僀僋儘僩儘儞傪棙梡偟偨僴乕僪僂僃傾傪梡
偄傞偲丄旕忢偵惓妋側帪崗偑庢摼偱偒傑偡丅傑偨 GPS (Global Positioning
System) 傪梡偄傞曽朄傕偁傝傑偡丅慜幰偺傎偆偑傛傝惓妋偱偡偑丄屻幰傕廩暘
桪傟偰偄傑偡丅椉幰偲傕摿庩偱崅壙側憰抲傪昁梫偲偟傑偡偑丄偙傟傜偺憰抲偺
強桳幰 (偨偄偰偄戝妛偐尋媶強) 偼丄偦偺憰抲傪僐儞僺儏乕僞偵愙懕偟丄偦偺
僐儞僺儏乕僞偱 NTP 僨乕儌儞傪憱傜偣丄僀儞僞乕僱僢僩偵偮側偓丄変乆偑柍椏
偱傾僋僙僗偡傞偙偲傪嫋壜偟偰偔傟偰偄傞偺偱偡丅偦偟偰変乆偼丄偙傟傪巊偭
偰帺暘偺僔僗僥儉偺帪崗摨婜傪偟傛偆偲偄偆傢偗偱偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

4.2. 娙扨側帪崗摨婜峔憿傪峔抸偡傞

  昁梫側傕偺偼:

 1.   捈愙傑偨偼娫愙 (僼傽僀傾僂僅乕儖宱桼) 偺僀儞僞乕僱僢僩愙懕丅
   
 2.   NTP 僒乕僶傪慖戰偟傑偡丅岞奐僒乕僶偱偁傞 pool.ntp.org <http://
    www.fortytwo.ch/time/> 傪棙梡偡傞偙偲傕偱偒傑偡偟丄 NTP 偺 web 僒僀
    僩偵偁傞 stratum 2 岞奐僞僀儉僒乕僶 <http://www.eecis.udel.edu/
    ~mills/ntp/clock2a.html> 偐傜慖傇偙偲傕偱偒傑偡丅僀儞僞乕僱僢僩傊愙
    懕偝傟偰偄側偄応崌偼丄偁側偨偺 WAN 偺娗棟幰偑揔愗側撪晹傾僪儗僗傪嫵
    偊偰偔傟傞偱偟傚偆 (榬偺偄偄娗棟幰側傜丄偱偡偗偳)丅
   
 3.   摨婜偝偣偨偄僔僗僥儉偡傋偰偵 NTP 僷僢働乕僕傪僀儞僗僩乕儖偡傞偙偲
    丅帺暘偺巊偭偰偄傞 Linux 僨傿僗僩儕價儏乕僔儑儞偺 CD 偵 RPM 偑偁傞
    偱偟傚偆偟丄側偗傟偽 rpmfind.net <http://rpmfind.net/> 偱専嶕
    <http://rpmfind.net/linux/rpm2html/search.php?query=ntp> 偟偰傒傑偟
    傚偆丅
   
  椙偄峔惉偺椺傪師偵帵偟傑偡丅

Figure 1. NTP 偺儘乕僇儖儕儗乕僒乕僶

[ntp]

  摨婜偝偣偨偄儅僔儞偑暋悢偁傞応崌丄偦傟傜偡傋偰傪慖戰偟偨儕儌乕僩偺
NTP 僒乕僶偵愙懕偟偰偼偄偗傑偣傫丅帺暘偺娗棟偟偰偄傞僒乕僶偨偪偐傜 2 戜
偩偗傪慖傃丄儕儌乕僩偺 NTP 僒乕僶傊傾僋僙僗偡傞儅僔儞偼偙偺 2 戜偵尷傞
偺偱偡丅偦偟偰懠偺儅僔儞偼丄偙偺 2 戜偵懳偟偰摨婜偝偣傞偺偱偡丅偙偺 2
戜偺偙偲傪丄偙傟埲崀偱偼儕儗乕僒乕僶偲屇傇偙偲偵偟傑偟傚偆丅

  儕儗乕僒乕僶偼僱僢僩儚乕僋偵偮側偑偭偰偄傞儅僔儞偺偳傟偱傕偐傑偄傑偣
傫丅 NTP 偺巊偆儊儌儕傗 CPU 偼傢偢偐偱偡偐傜丄愱梡偺儅僔儞傪梡堄偡傞昁
梫偼偁傝傑偣傫丅

    Tip: 偙傟傜偺儘乕僇儖側儕儗乕僒乕僶偵偼丄ntp1.my.com 傗 ntp2.my.com
    偺傛偆偵丄儂僗僩柤偺僄僀儕傾僗傪偮偗偰偍偔偲偄偄偱偟傚偆丅偙偆偟偰
    偍偗偽丄 NTP 偺婡擻傪 (IP 傾僪儗僗偲儂僗僩柤偺堘偆) 暿偺儕儗乕僒乕
    僶偵堏摦偟偰傕丄僋儔僀傾儞僩偱偼曄峏傪峴傢偢偵偡傒傑偡丅 DNS 偺娗棟
    幰偵丄偙傟傜偺僄僀儕傾僗傪嶌惉偡傞傛偆棅傫偱傒傑偟傚偆丅
   
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

4.3. NTP 偺愝掕

儕儗乕僒乕僶偱偼
   
      /etc/ntp.conf 傪曇廤偟偰丄慖戰偟偨儕儌乕僩僒乕僶傪捛壛偟傑偡丅
   
    Example 5. 儕儗乕僒乕僶偺 /etc/ntp.conf
   
    .                                                                     
    .                                                                     
    server  otherntp.server.org     # A stratum 1 server at server.org    
    server  ntp.research.gov        # A stratum 2 server at research.gov  
    .                                                                     
    .                                                                     
   
      慜偵傕弎傋傑偟偨偑丄岞奐僒乕僶 pool.ntp.org <http://
    www.fortytwo.ch/time/> 傕巊偊傑偡偟丄 NTP 偺 web 僒僀僩偐傜岞奐僞僀
    儉僒乕僶 <http://www.eecis.udel.edu/~mills/ntp/clock2a.html> 偺儕僗
    僩傪庢傝婑偣傞偙偲傕偱偒傑偡丅
   
僋儔僀傾儞僩偱偼
   
      /etc/ntp.conf 傪曇廤偟偰丄儕儗乕僒乕僶偺 (NTP 僒乕僶偱偁傞偙偲傪
    堄枴偡傞曽偺) 儂僗僩柤傪捛壛偟傑偡丅
   
    Example 6. 僋儔僀傾儞僩儅僔儞偺 /etc/ntp.conf
   
    .                                                                  
    .                                                                  
    server  ntp1.my.com             # My first local relay             
    server  ntp2.my.com             # My second local relay            
    .                                                                  
    .                                                                  
   
  傕偟儅僔儞偺 UTC 帪崗偑 NTP 僒乕僶偵懳偟偰悢暘埲忋偢傟偰偄傞偲丄 NTP
偼摦嶌偟傑偣傫丅廬偭偰嵟弶偵姰慡摨婜 (full sync) 傪峴傢側偗傟偽側傝傑偣
傫 (僔僗僥儉偱巇帠偑峴傢傟偰偄側偄帪娫懷傪慖傃傑偟傚偆)丅偙偺嶌嬈偼 NTP
偺弶婜愝掕傪峴偆帪偩偗昁梫偲偝傟傑偡丅偦傟埲崀偼慡偔晄梫偱偡丅

Example 7. 嵟弶偺摨婜

bash# ntpdate otherntp.research.gov     (1)                                          
24 Mar 18:16:36 ntpdate[10254]: step time server 200.100.20.10 offset -15.266188 sec 
bash# ntpdate otherntp.research.gov     (2)                                          
24 Mar 18:16:43 ntpdate[10255]: adjust time server 200.100.20.10 offset -0.000267 sec

(1)   嵟弶偺姰慡摨婜偱偼丄変乆偺僔僗僥儉偑 15 昩抶傟偰偄傑偟偨丅
(2)   擇搙栚偺姰慡摨婜偼丄扨偵妋擣偺偨傔偵峴偄傑偟偨丅傎偲傫偳偢傟偼僛
    儘偱丄偙傟偱 OK 偱偡丅

  嵟廔抜奒偼丄奺儅僔儞偱偺 NTP 僨乕儌儞偺婲摦 (傑偨偼嵞婲摦) 偱偡丅

bash# service ntpd restart                                             

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

4.4. 帪崗摨婜偺妋擣

  埲忋偱愝掕偼偡傋偰廔傢傝偱偡丅 NTP 偼偦偭偲偁側偨偺儅僔儞偺帪崗傪摨婜
偟懕偗偰偔傟偰偄傞偼偢偱偡丅偙偺條巕偼丄NTP Query 僐儅儞僪 (ntpq) 偱尒
傞偙偲偑偱偒傑偡丅

Example 8. 帪崗摨婜偺忬懺

bash# ntpq -p                                                                  
     remote           refid      st t when poll reach   delay   offset  jitter 
============================================================================== 
-jj.cs.umb.edu   gandalf.sigmaso  3 u   95 1024  377   31.681  -18.549   1.572 
 milo.mcs.anl.go ntp0.mcs.anl.go  2 u  818 1024  125   41.993  -15.264   1.392 
-mailer1.psc.edu ntp1.usno.navy.  2 u  972 1024  377   38.206   19.589  28.028 
-dr-zaius.cs.wis ben.cs.wisc.edu  2 u  502 1024  357   55.098    3.979   0.333 
+taylor.cs.wisc. ben.cs.wisc.edu  2 u  454 1024  347   54.127    3.379   0.047 
-ntp0.cis.strath harris.cc.strat  3 u  507 1024  377  115.274   -5.025   1.642 
*clock.via.net   .GPS.            1 u  426 1024  377  107.424   -3.018   2.534 
 ntp1.conectiv.c 0.0.0.0         16 u    - 1024    0    0.000    0.000 4000.00 
+bonehed.lcs.mit .GPS.            1 u  984 1024  377   25.126    0.131  30.939 
-world.std.com   204.34.198.40    2 u  119 1024  377   24.229   -6.884   0.421 

奺楍偺堄枴

remote
   
      儕儌乕僩偺 NTP 僒乕僶偺柤慜偱偡丅 -n 僗僀僢僠傪梡偄傞偲丄儂僗僩柤
    偺戙傢傝偵 IP 傾僪儗僗偑昞帵偝傟傑偡丅
   
refid
   
      奺僒乕僶偑尰嵼偳偙偐傜帪崗傪庢摼偟偰偄傞偐傪帵偟傑偡丅僒乕僶偺儂
    僗僩柤傗 .GPS. 偺傛偆側傕偺偑昞帵偝傟傑偡丅屻幰偼 Global
    Positioning System 偐傜帪崗傪庢摼偟偰偄傞偙偲傪帵偟傑偡丅
   
st
   
      Stratum 偼 1 偐傜 16 傑偱偺悢抣偱丄儕儌乕僩僒乕僶偺惓妋偝
    (precision) 傪帵偟偰偄傑偡丅 1 偼嵟傕惓妋偱丄16 偼僒乕僶偵愙懕偱偒
    側偄偙偲傪堄枴偟傑偡丅偁側偨偺儅僔儞偺 Stratum 偼丄嵟傕惓妋側儕儌乕
    僩僒乕僶偺 Stratum 偵 1 傪壛偊偨傕偺偵側傝傑偡丅 [栿拲: GPS 帪寁側
    偳偺帪崗婎弨傪旛偊偨儅僔儞偵懳偡傞乽愙懕抜悢乿偲峫偊傞偲傛偄偲巚偄
    傑偡丅]
   
poll
   
      億乕儕儞僌傪峴偆帪娫娫妘傪昩扨埵偱昞偟偨傕偺偱偡丅抣偼嫋偝傟偰偄
    傞嵟彫抣丒嵟戝抣偺娫偵側傝傑偡丅摉弶偼崅懍偵摨婜偑偱偒傞傛偆丄偙偺
    抣偼彫偝偔側偭偰偄傑偡丅帪寁偑摨婜忬懺偵側偭偨傜丄億乕儕儞僌抣偼偩
    傫偩傫挿偔側偭偰偄偒丄僱僢僩儚乕僋偺捠怣検傗丄恖婥偺偁傞 time 僒乕
    僶偺晧壸傪尭傜偡傛偆偵側偭偰偄傑偡丅
   
reach
   
      8 價僢僩暘偺價僢僩楍傪 8 恑悢偱昞尰偟偨傕偺偱丄儘乕僇儖偺儅僔儞偑
    僒乕僶傊偺愙懕傪帋傒偨丄嵟屻偺 8 夞暘偺寢壥傪帵偟偰偄傑偡丅僒乕僶偵
    摓払偟偨応崌偼價僢僩偑棫偪傑偡丅 [栿拲: 廬偭偰慡晹惉岟偟偰偄傟偽
    377 偲側傝傑偡丅]
   
delay
   
      乽偄傑壗帪?乿梫媮偵懳偡傞曉摎偑曉偝傟傞傑偱偵昁梫偲偝傟偨帪娫 (昩
    扨埵) 偱偡丅
   
offset
   
      嵟傕廳梫側抣偱偡丅儘乕僇儖儅僔儞偲儕儌乕僩僒乕僶偺帪崗偺堘偄偱偡
    丅摨婜偟偰偄傞嵟拞偼丄offset 偼彫偝偔側偭偰偄偒傑偡丅偮傑傝儘乕僇儖
    偺儅僔儞偺帪崗偑偩傫偩傫惓妋偵側偭偰偄偔傢偗偱偡丅
   
jitter
   
      暘嶶 (dispersion) 偲偐梙傜偓 (jitter) 偲屇偽傟傞傕偺偼丄壗夞偐梫
    媮丒墳摎傪峴偭偨嵺偺丄僆僼僙僢僩抣偺摑寁揑側梙傜偓傪梌偊傞傕偺偱偡
    丅偙偺抣偼掅偄曽偑岲傑偟偄偱偡丅抣偑掅偄曽偑丄惓妋側帪崗摨婜偑壜擻
    偵側傝傑偡丅
   
僒乕僶偺儂僗僩柤偺慜偵抲偐傟傞晞崋偺堄枴

-
   
      儘乕僇儖偺 NTP 僒乕價僗偼偙偺僒乕僶傪偁傑傝岲傫偱偄側偄
   
+
   
      儘乕僇儖偺 NTP 僒乕價僗偼偙偺僒乕僶傪岲傫偱棙梡偟偰偄傞
   
x
   
      晄椙儂僗僩
   
*
   
      尰嵼棙梡偟偰偄傞
   
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

4.5. NTP 偑僽乕僩帪偵帺摦婲摦偡傞傛偆愝掕偡傞

  NTP 偼偢偭偲摦嶌偝偣偰偍偒偨偄偙偲偑懡偄偱偟傚偆丅儅僔儞傪嵞婲摦偟偨
応崌偱傕偦偆偱偡偹丅奺儅僔儞偱埲壓偺嶌嬈傪峴偄傑偟傚偆丅

bash# chkconfig --level 2345 ntpd on                                   

  偙傟偱帺摦婲摦偑妋幚偵側傝傑偡丅

  儅僔儞傪嵞婲摦偟側偄傑傑挿偄偙偲 (壗儢寧傕壗擭傕) 摦偐偟懕偗傞偲丄杮
棃惓妋偱側偄僴乕僪僂僃傾僋儘僢僋偲丄(崱傗旕忢偵惓妋偲側偭偨) 僔僗僥儉帪
崗偲偺娫偵偼丄戝偒側偢傟偑惗偠傞偱偟傚偆丅嵟嬤偺 Linux 僨傿僗僩儕價儏乕
僔儑儞偱偼丄僔僗僥儉傪僔儍僢僩僟僂儞偡傞嵺偵丄 setclock 僐儅儞僪偵帡偨
巇慻傒傪巊偭偰 OS 帪崗傪 HC 帪崗偵僐僺乕偟傑偡丅偙偺傛偆偵偟偰丄師偵 OS
傪婲摦偡傞嵺偵傕丄僔儍僢僩僟僂儞偺帪偲偩偄偨偄摨偠偔傜偄丄傎傏惓妋側擔
晅偲帪崗偑摼傜傟傞傛偆偵側偭偰偄傞偺偱偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

A. 偙偺暥彂偵偮偄偰

Copyright 2002, Avi Alkalay.

This document must be distributed under the terms of GNU Free
Documentation License <http://www.gnu.org/copyleft/fdl.html>.

  嶲峫栿: 偙偺暥彂偺嵞攝晍偵偁偨偭偰偼丄 GNU Free Documentation License
<http://www.gnu.org/copyleft/fdl.html> 偵廬傢側偗傟偽側傝傑偣傫丅

  偙偺暥彂偼埲壓偱攝晍偝傟偰偄傑偡丅

 丒 Official site <http://avi.alkalay.net/linux/docs/TimePrecision/> [
    XML (DocBook) 僜乕僗 <http://avi.alkalay.net/linux/docs/
    TimePrecision/timeprecision.tar.gz>]
   
 丒 LinuxDoc 偺 HOWTO 暥彂偲偟偰搊榐 <http://en.tldp.org/HOWTO/
    TimePrecision-HOWTO/> [1 儁乕僕宍幃 <http://www.ibiblio.org/pub/
    Linux/docs/HOWTO/other-formats/html_single/
    TimePrecision-HOWTO.html>] [PDF <http://www.ibiblio.org/pub/Linux/
    docs/HOWTO/other-formats/pdf/TimePrecision-HOWTO.pdf>]
   
 丒 拞栰晲梇 <nakano at apm.seikei.ac.jp> 偵傛傞擔杮岅栿 <http://
    www.linux.or.jp/JF/JFdocs/TimePrecision-HOWTO/> [僥僉僗僩斉 <http:/
    /www.linux.or.jp/JF/JFdocs/TimePrecision-HOWTO.txt>]
   
 丒 SHAKI <sha-ki at narod.ru> 偵傛傞儘僔傾岅栿 <http://
    computerlib.narod.ru/html/linuxtime.htm>
   
  東栿偼拞栰晲梇偑峴偄傑偟偨丅摨偠偔嵞攝晍偼 GFDL (Invariant Section 側
偟丄Front-Cover Text 側偟丄Back-Cover Text 側偟) 偵廬偄傑偡丅

