버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.
코드 블럭
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


 


코드 블럭
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.



코드 블럭
languagebash
title시간동기화 서비스 확인
linenumberstrue
chronyc sources
chronyc sourcestats
chronyc sources -v
chronyc tracking
펼치기
서식 미적용
[root@ol9 ~]# chronyc sources
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^* 192.168.12.72                 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.12.72               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.12.72                 3   6    17    45  -7890ns[  -23us] +/- 4885us

[root@ol9 ~]# chronyc tracking
Reference ID    : C0A80C48 (192.168.12.72)
Stratum         : 4
Ref time (UTC)  : Mon Apr 01 01:05:33 2024
System time     : 0.000006146 seconds slow of NTP time
Last offset     : -0.000006503 seconds
RMS offset      : 0.000006503 seconds
Frequency       : 22.297 ppm slow
Residual freq   : -0.175 ppm
Skew            : 0.103 ppm
Root delay      : 0.002853230 seconds
Root dispersion : 0.003552613 seconds
Update interval : 64.1 seconds
Leap status     : Normal

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