반응형
ntpstat 명령어
ntpstat는 NTP(Network Time Protocol) 동기화 상태를 간단히 확인할 수 있는 유용한 명령어입니다. 주로 NTP 서버 또는 클라이언트의 동기화 여부, 시간 오차 등을 빠르게 점검할 때 사용됩니다.
ntpstat 설치
dnf install -y ntpstat
ntpstat --version
ntpstat 실행
ntpstat
성공적인 동기화 상태
synchronised to NTP server (203.248.240.140) at stratum 4
time correct to within 22 ms
polling server every 1024 s
- synchronised to NTP server : 특정 NTP 서버(203.248.240.140)와 동기화됨.
- stratum 4 : 상위 서버가 Stratum 4(최상위 시간 소스)에 연결된 상태.
- time correct to within 22 ms : 로컬 시간이 NTP 서버와 22ms 이내로 일치.
- polling server every 1024 s : 1024초마다 서버와 동기화 확인.
동기화 실패 상태
unsynchronised
time server re-starting
polling server every 8 s
chrony 상태 확인
chronyc tracking
Reference ID : DD97764E (time.ravnus.com)
Stratum : 3
Ref time (UTC) : Tue Apr 08 04:32:04 2025
System time : 0.000015413 seconds slow of NTP time
Last offset : -0.000045009 seconds
RMS offset : 0.000045009 seconds
Frequency : 9.354 ppm fast
Residual freq : -52.855 ppm
Skew : 0.157 ppm
Root delay : 0.003038572 seconds
Root dispersion : 0.000845361 seconds
Update interval : 2.2 seconds
Leap status : Normal
chronyc sources
$ chronyc sources
210 Number of sources = 3
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* time.bora.net 3 10 373 973 -395us[ -80us] +/- 20ms
^? 121.125.77.167 0 10 0 - +0ns[ +0ns] +/- 0ns
timedatectl 상태 확인
timedatectl
$ timedatectl
Local time: 토 2020-12-19 13:28:37 KST
Universal time: 토 2020-12-19 04:28:37 UTC
RTC time: 토 2020-12-19 04:28:37
Time zone: Asia/Seoul (KST, +0900)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
ntpstat는 복잡한 설정 없이 NTP 상태를 빠르게 점검할 수 있어 편리합니다.
728x90
반응형
'리눅스' 카테고리의 다른 글
아파치 디폴트 페이지(apache default page) 편집 (0) | 2020.12.24 |
---|---|
CentOS 7에서 SELinux를 비활성화하는 방법(selinux disabled) (0) | 2020.12.24 |
[명령어] which, whereis, locate 명령어 (0) | 2020.12.18 |
[리눅스] CentOS7에서 시스템 메시지 로그 필터링 (0) | 2020.12.18 |
[Apache] 웹서버에서 http를 https(SSL)로 리다이렉트하는 방법 (0) | 2020.12.18 |