버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.

시간 정보를 참조할 서버 정보 등록

코드 블럭
languagebash
titleroot 계정으로 vi /etc/chrony.conf 하여 설정 수정
linenumberstrue
server [동기화 서버의 IP] iburst
펼치기
서식 미적용
[root@ol9 ~]# cat /etc/chrony.conf
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.rhel.pool.ntp.org iburst
#server 1.rhel.pool.ntp.org iburst
#server 2.rhel.pool.ntp.org iburst
#server 3.rhel.pool.ntp.org iburst

server 192.168.0.70 iburst ## ==> 시간 동기화 서버 정보 추가

# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift

# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3

# Enable kernel synchronization of the real-time clock (RTC).
rtcsync

# Enable hardware timestamping on all interfaces that support it.
#hwtimestamp *

# Increase the minimum number of selectable sources required to adjust
# the system clock.
#minsources 2

# Allow NTP client access from local network.
#allow 192.168.0.0/16

# Serve time even if not synchronized to a time source.
#local stratum 10

# Specify file containing keys for NTP authentication.
#keyfile /etc/chrony.keys

# Specify directory for log files.
logdir /var/log/chrony

# Select which information is logged.
#log measurements statistics tracking


RAC나 Data Guard와 같이 클러스터 또는 HA 환경을 구성하기 위해서는 서버 간의 시간 동기화 설정이 필수입니다.

시간 동기화 서비스 기동 및 활성화

코드 블럭
languagebash
title시간 동기화 서비스 기동 및 활성화
linenumberstrue
systemctl start chronyd
systemctl enable chronyd
펼치기
서식 미적용
[root@ol9 ~]# systemctl start chronyd
[root@ol9 ~]# systemctl enable chronyd
Created symlink /etc/systemd/system/multi-user.target.wants/chronyd.service → /usr/lib/systemd/system/chronyd.service.



D) 서비스 기동 결과 확인

코드 블럭
languagebash
title시간동기화 서비스 확인
linenumberstrue
chronyc sources
chronyc sourcestats
chronyc sources -v
chronyc tracking
펼치기
서식 미적용
[root@busan ~]# timedatectl
               Local time: 화 2024-04-02 09:44:36 KST
           Universal time: 화 2024-04-02 00:44:36 UTC
                 RTC time: 화 2024-04-02 00:44:36
                Time zone: Asia/Seoul (KST, +0900)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

[root@ol9 ~]# chronyc sources
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^* 192.168.120.7270                  3   6    37    24   +749ns[-5754ns] +/- 4952us

[root@ol9 ~]# chronyc sourcestats
Name/IP Address            NP  NR  Span  Frequency  Freq Skew  Offset  Std Dev
==============================================================================
192.168.120.7270                7   4   199     -0.082      0.498  -1004ns    14us

[root@ol9 ~]# chronyc sources -v

  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 / .- Source state '*' = current best, '+' = combined, '-' = not combined,
| /             'x' = may be in error, '~' = too variable, '?' = unusable.
||                                                 .- xxxx [ yyyy ] +/- zzzz
||      Reachability register (octal) -.           |  xxxx = adjusted offset,
||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
||                                \     |          |  zzzz = estimated error.
||                                 |    |           \
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^* 192.168.120.7270                  3   6    17    45  -7890ns[  -23us] +/- 4885us

[root@ol9 ~]# chronyc tracking
Reference ID    : C0A80C48 (192.168.12.7270)
Stratum         : 4
Ref time (UTC)  : MonTue Apr 0102 0100:28:05:33 2024
System time     : 0.000006146000000004 seconds slowfast of NTP time
Last offset     : -0.000006503000007447 seconds
RMS offset      : 0.000006503000017282 seconds
Frequency       : 22.297512 ppm slow
Residual freq   : -0.175002 ppm
Skew            : 0.103034 ppm
Root delay      : 0.002853230003092050 seconds
Root dispersion : 0.003552613003388617 seconds
Update interval : 64130.13 seconds
Leap status     : Normal

[root@ol9 ~]# chronyc sources
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^* 192.168.120.7270                  3   6    37    24   +749ns[-5754ns] +/- 4952us