linux时间服务源配置文件,Linux 7 chrony 时间同步服务配置

本文介绍了RHEL 7中两种时间同步客户端:ntp和chrony,重点讲述了chrony的优势,如在网络不稳定时仍能保持良好性能。在默认配置下,chrony不会在系统启动后立即调整时间,以避免影响其他程序。配置chrony时,只需在/etc/chrony.conf文件中添加服务器信息。此外,提供了启动、检查和管理chrony服务的步骤,以及使用chronyc命令行工具进行监控。
摘要由CSDN通过智能技术生成

1

概述

NTP(Network Time Protocol)是网络时间协议,用来同步网络中各个计算机的时间的协议,客户端向一个或者多个服务端进行时间同步。

在RHEL 7中有两种方法来配置同步客户端。

https://www.cndba.cn/dave/article/1820

(1)ntp: this is the classic package, already existing in RHEL 6, RHEL 5, etc.

(2)chrony: this is a new solution better suited for portable PC or servers with network connection problems (time synchronization is quicker). chrony is the default package in RHEL 7.

https://www.cndba.cn/dave/article/1820

关于ntpd 和chronyd的区别参考红帽官网:

https://www.cndba.cn/dave/article/1820

Chrony consists of chronyd, a daemon that runs in user space, and chronyc, a command line program for making adjustments to chronyd. Systems which are not permanently connected, or not permanently powered up, take a relatively long time to adjust their system clocks with ntpd. This is because many small corrections are made based on observations of the clocks drift and offset. Temperature changes, which may be significant when powering up a system, affect the stability of hardware clocks. Although adjustments begin within a few milliseconds of booting a system, acceptable accuracy may take anything from ten seconds from a warm restart to a number of hours depending on your requirements, operating environment and hardware. chrony is a different implementation of the NTP protocol than ntpd, it can adjust the system clock more rapidly.

Differences Between ntpd and chronyd

One of the main differences between ntpd and chronyd is in the algorithms used to control the computer's clock. Things chronyd can do better than ntpd are:

chronyd can work well when external time references are only intermittently accessible, whereas ntpd needs regular polling of time reference to work well.

chronyd can perform well even when the network is congested for longer periods of time.

chronyd can usually synchronize the clock faster and with better time accuracy.

chronyd quickly adapts to sudden changes in the rate of the clock, for example, due to changes in the temperature of the crystal oscillator, whereas ntpd may need a long time to settle

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值