차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판이전 판
다음 판
이전 판
tech:linux_time [2014/03/18 17:37] – 바깥 편집 127.0.0.1tech:linux_time [2016/07/12 00:56] (현재) – 바깥 편집 127.0.0.1
줄 1: 줄 1:
 +{{tag>tech linux 우분투 서버 time}}
 ======리눅스 시간 맞추기====== ======리눅스 시간 맞추기======
  
 시피유에 부하가 갈 수록 시간이 틀려진다고???? 시피유에 부하가 갈 수록 시간이 틀려진다고????
  
-리눅스는 자기가 시간을 계산한다. +리눅스는 자기가 시간을 계산한다.
  
   ntpdate -b -s time.kriss.re.kr   ntpdate -b -s time.kriss.re.kr
  
 이거 쓰면 됨. 이거 쓰면 됨.
- 
  
 1. 우리나라의 NTP(Network Time Protocol) 서버 1. 우리나라의 NTP(Network Time Protocol) 서버
줄 27: 줄 27:
      GNGIDC (ntp1.gngidc.net / ntp2.gngidc.net),      GNGIDC (ntp1.gngidc.net / ntp2.gngidc.net),
      이대부속 초등학교 (ntp.ewha.net / ticktock.ewha.net)      이대부속 초등학교 (ntp.ewha.net / ticktock.ewha.net)
- 
  
 3. ntpdate를 이용한 시간 동기화 3. ntpdate를 이용한 시간 동기화
줄 39: 줄 38:
   2) 다음과 같은 오류가 발생한 경우   2) 다음과 같은 오류가 발생한 경우
  
-  +     
   [root@truefeel root]# ntpdate -b time.kriss.re.kr   [root@truefeel root]# ntpdate -b time.kriss.re.kr
   17 Mar 21:03:25 ntpdate[8244]: no server suitable for synchronization found   17 Mar 21:03:25 ntpdate[8244]: no server suitable for synchronization found
-  
- 
  
   ->  NTP 프로토콜은 UDP port 123 을 사용하는데, 이 포트가 방화벽 등으로   ->  NTP 프로토콜은 UDP port 123 을 사용하는데, 이 포트가 방화벽 등으로
줄 54: 줄 51:
   3) 사용 예   3) 사용 예
  
-  +     
   [root@truefeel root]# date   [root@truefeel root]# date
   월  3월 17 21:40:35 KST 2003   월  3월 17 21:40:35 KST 2003
줄 66: 줄 63:
   [root@truefeel root]# date   [root@truefeel root]# date
   월  3월 17 21:40:46 KST 2003  <- 시간이 동기화 됨   월  3월 17 21:40:46 KST 2003  <- 시간이 동기화 됨
-  
- 
  
   위에서 'offset -557.336058 sec'은 타임서버의 시간(reference time)과 로컬 서버와의   위에서 'offset -557.336058 sec'은 타임서버의 시간(reference time)과 로컬 서버와의
줄 85: 줄 80:
   'adjust time server...' 로 표시되면 adjtime()가 사용되었다.   'adjust time server...' 로 표시되면 adjtime()가 사용되었다.
  
-  +     
   [root@truefeel root]# ntpdate time.nuri.net   [root@truefeel root]# ntpdate time.nuri.net
   14 Mar 01:09:31 ntpdate[3127]: step time server 203.255.112.96 offset 82.763348 sec   14 Mar 01:09:31 ntpdate[3127]: step time server 203.255.112.96 offset 82.763348 sec
   [root@truefeel root]# ntpdate time.nuri.net   [root@truefeel root]# ntpdate time.nuri.net
   14 Mar 01:22:30 ntpdate[3182]: adjust time server 203.255.112.96 offset -0.064531 sec   14 Mar 01:22:30 ntpdate[3182]: adjust time server 203.255.112.96 offset -0.064531 sec
-  
- 
  
 부팅할 때는 ntpdate -b 로, cron등으로 정기적으로 시간조절을 할 때는 옵션없이 ntpdate  사용하기를 하기 바란다. 부팅할 때는 ntpdate -b 로, cron등으로 정기적으로 시간조절을 할 때는 옵션없이 ntpdate  사용하기를 하기 바란다.
- 
  
 ==== 주의 사항==== ==== 주의 사항====
  time.kriss.re.kr 서버는 1초내에 여러번 접속을 시도할 경우 해당 IP를 차단 시키므로     테스트를 하더라도, 시간 간격을 두고 하도록  time.kriss.re.kr 서버는 1초내에 여러번 접속을 시도할 경우 해당 IP를 차단 시키므로     테스트를 하더라도, 시간 간격을 두고 하도록
  
 + 
 + * 출처: [[http://coffeenix.net/board_print.php?bd_code=19|시스템 관리자의 쉼터, 커피닉스]]
  
- 
-^  로긴 후 수정하실 수 있습니다. 관심있는 분들의 많은 참여 부탁드립니다. 문법은 [[wiki:syntax]]참조하세요. | 
- 
-  * 출처: [[http://coffeenix.net/board_print.php?bd_code=19|시스템 관리자의 쉼터, 커피닉스]] 
- 
-{{tag>tech linux 우분투 서버 time}}