이 페이지의 이전 버전을 보고 있습니다. 현재 버전 보기.

현재와 비교 페이지 이력 보기

버전 1 현재 »

Network Time Protocol
리눅스 시스템 시간 동기화 


CentOS7 ntp 설정

/etc/ntp.conf
# /etc/ntp.conf, configuration for NTP
# by default act only as a basic NTP client
restrict -4 default nomodify nopeer noquery notrap
restrict -6 default nomodify nopeer noquery notrap
# allow NTP messages from the loopback address, useful for debugging
restrict 127.0.0.1
restrict ::1
logfile /var/log/ntpd
driftfile /var/lib/ntp/ntp.drift
statsdir  /var/lib/ntp/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

server 210.98.56.10         iburst  # KREONET NTP
server 210.98.56.5          iburst  # KREONET NTP
server gps.bora.net         iburst
server ntp.kornet.net       iburst  # 168.126.3.6
server ntp.postech.ac.kr    iburst
server time.kriss.re.kr     iburst  # 210.98.16.100
server time2.kriss.re.kr    iburst  # 210.98.16.101


현재 동기화 된 서버 확인
+/*/공백 등으로 표시되는, 각 행의 첫번째 글자 tally를 보고 현재 어느 서버가 선택되었는지 확인 가능
각 NTP 서버는 다른 서버, 또는 GPS 등을 통해 시간을 동기화 함

$ ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 210.98.56.10    .XFAC.          16 u    - 1024    0    0.000    0.000   0.000
 210.98.56.5     .XFAC.          16 u    - 1024    0    0.000    0.000   0.000
+210.98.16.101   210.98.16.100    2 u  412 1024  377    0.802    0.225   0.156
 gps.bora.net    .INIT.          16 u    - 1024    0    0.000    0.000   0.000
 168.126.3.6     .INIT.          16 u    - 1024    0    0.000    0.000   0.000
+ntp.postech.ac. .GPS.            1 u  455 1024  377    9.028   -1.179   0.454
*210.98.16.100   .GPS.            1 u  221 1024  377    0.890    0.280   0.140


tally설명
공백rejectThe peer is discarded as unreachable, synchronized to this server (synch loop) or outrageous synchronization distance.
+candidateThe peer is a survivor and a candidate for the combining algorithm.
*sys.peerThe peer has been declared the system peer and lends its variables to the system variables.


윈도우의 경우

윈도우 설치 시 기본으로 time.windows.com 와 시간 동기화 됨

시간 동기화가 중요한 서비스를 실행하고 있는 경우, 한국표준과학연구원의 UTCk 3.1 프로그램을 이용


참고

NTP - 제타위키

ntpq - NTP 4.2.4 Official Document

CentOS 서비 시간 동기화 - JDM's Blog

  • 레이블 없음