rhel7 文档https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Using_chrony.html

https://wiki.archlinux.org/index.php/Chrony

Note: systemd-timesyncd.service is in conflict with chrony, so you need to disable it first if you want to enable chrony properly.

SERVER1:

[root@r10o10405.sqa.zmf /home/ahao.mah]
#chronyc sources
210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* 10.210.208.8 4 6 377 9 +398us[ +652us] +/- 64ms
#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.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server 10.210.208.8 iburst # Ignore stratum in source selection.
stratumweight 0 # Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift # Enable kernel RTC synchronization.
rtcsync # In first three updates step the system clock instead of slew
# if the adjustment is larger than 10 seconds.
# 如果误差大于10s,前3次update时间使用step而不是slew
makestep 10 3 # Allow NTP client access from local network.
#allow 192.168/16 allow 192.168.0.0/16
allow 172.16.0.0/14
allow 10.0.0.0/8
allow 11.0.0.0/8
allow 30.0.0.0/8
#allow 10.101.75.1/22
#allow 10.101.75.1 #allow 100.64.0.0 mask 255.192.0.0 # Listen for commands only on localhost.
bindcmdaddress 127.0.0.1
bindcmdaddress ::1 # Serve time even if not synchronized to any NTP server.
local stratum 10 keyfile /etc/chrony.keys # Specify the key used as password for chronyc.
commandkey 1 # Generate command key if missing.
generatecommandkey # Disable logging of client accesses.
noclientlog # Send a message to syslog if a clock adjustment is larger than 0.5 seconds.
logchange 0.5 logdir /var/log/chrony
#收集日志
log measurements statistics tracking

client

[root@r10o07276.sqa.zmf /home/ahao.mah]
#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.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server 10.101.74.139 iburst
server 10.101.74.131 iburst # Ignore stratum in source selection.
stratumweight 0 # Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift # Enable kernel RTC synchronization.
rtcsync # In first three updates step the system clock instead of slew
# if the adjustment is larger than 10 seconds. 简单说,如果误差大于10s,在头3次的时间更新中,会使用step,而不是slew
makestep 10 3 #makestep 1000 10
#简单说,如果误差大于1000s,在头10次的时间更新中,会使用step,而不是slew
#This would step the system clock if the adjustment is larger than 1000 seconds, but only in the first ten clock updates. # Allow NTP client access from local network.
#allow 192.168/16 # Listen for commands only on localhost.
bindcmdaddress 127.0.0.1
bindcmdaddress ::1 # Serve time even if not synchronized to any NTP server.
local stratum 10 keyfile /etc/chrony.keys # Specify the key used as password for chronyc.
commandkey 1 # Generate command key if missing.
generatecommandkey # Disable logging of client accesses.
noclientlog # Send a message to syslog if a clock adjustment is larger than 0.5 seconds.
logchange 0.5 logdir /var/log/chrony
#log measurements statistics tracking

命令

client

[[root@r10o07276.sqa.zmf /home/ahao.mah]
#chronyc sources
210 Number of sources = 2
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* r10o07413.sqa.zmf.tbsite. 5 6 377 64 -415us[ -274us] +/- 62ms
^+ r10o10405.sqa.zmf.tbsite. 5 6 377 1 -947us[ -947us] +/- 63ms
[root@r10o07276.sqa.zmf /home/ahao.mah]
#chronyc sources -v
210 Number of sources = 2 .-- Source mode '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| / '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
|| .- 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
===============================================================================
^* r10o07413.sqa.zmf.tbsite. 5 6 377 1 -432us[ -702us] +/- 63ms
^+ r10o10405.sqa.zmf.tbsite. 5 6 377 2 -678us[ -947us] +/- 63ms
[root@r10o07276.sqa.zmf /home/ahao.mah]
#chronyc sourcestats
210 Number of sources = 2
Name/IP Address NP NR Span Frequency Freq Skew Offset Std Dev
==============================================================================
r10o07413.sqa.zmf.tbsite. 6 3 325 -0.550 6.451 -232us 161us
r10o10405.sqa.zmf.tbsite. 7 3 387 +0.702 11.702 +235us 541us
[root@r10o07276.sqa.zmf /home/ahao.mah]
#chronyc sourcestats -v
210 Number of sources = 2
.- Number of sample points in measurement set.
/ .- Number of residual runs with same sign.
| / .- Length of measurement set (time).
| | / .- Est. clock freq error (ppm).
| | | / .- Est. error in freq.
| | | | / .- Est. offset.
| | | | | | On the -.
| | | | | | samples. \
| | | | | | |
Name/IP Address NP NR Span Frequency Freq Skew Offset Std Dev
==============================================================================
r10o07413.sqa.zmf.tbsite. 6 3 325 -0.550 6.451 -233us 161us
r10o10405.sqa.zmf.tbsite. 7 3 387 +0.702 11.702 +237us 541us
[root@r10o10405.sqa.zmf /home/ahao.mah]
#chronyc tracking
Reference ID : 10.210.208.8 (10.210.208.8)
Stratum : 5
Ref time (UTC) : Fri Feb 17 09:53:47 2017
System time : 0.000000227 seconds slow of NTP time
Last offset : +0.000335872 seconds
RMS offset : 0.000938629 seconds
Frequency : 23.669 ppm slow
Residual freq : +0.560 ppm
Skew : 10.502 ppm
Root delay : 0.067548 seconds
Root dispersion : 0.030173 seconds
Update interval : 64.5 seconds
Leap status : Normal

chrony配置介绍的更多相关文章

  1. 什么是blob,mysql blob大小配置介绍

    什么是blob,mysql blob大小配置介绍 作者: 字体:[增加 减小] 类型:转载   BLOB (binary large object),二进制大对象,是一个可以存储二进制文件的容器.在计 ...

  2. ecshop 工作流程加载配置介绍

    ecshop 工作流程加载配置介绍 分类: ecshop2014-09-14 09:36 729人阅读 评论(2) 收藏 举报 模板引擎工作流 这里简单介绍下echsop工作流程: 首先,你会发现一般 ...

  3. Window VNC远程控制LINUX:VNC详细配置介绍

    Window VNC远程控制LINUX:VNC详细配置介绍 //---------------------------------------vnc linux下的详细配置 1.VNC的启动/停止/重 ...

  4. ASP.NET Core 运行原理解剖[2]:Hosting补充之配置介绍

    在上一章中,我们介绍了 ASP.NET Core 的启动过程,主要是对 WebHost 源码的探索.而本文则是对上文的一个补充,更加偏向于实战,详细的介绍一下我们在实际开发中需要对 Hosting 做 ...

  5. prometheus 配置介绍

    prometheus 配置介绍 prometheus 配置分global.alerting.rule_files.scrape_configs 1.global(全局配置) scrape_interv ...

  6. Centos 7 磁盘阵列配置介绍(RAID)

    转自:https://blog.51cto.com/gaowenlong/2086918 Centos 7 磁盘阵列配置介绍每当我们提到磁盘阵列,相信广大管理员并不陌生,比如我们一般安装服务器系统的时 ...

  7. LINUX服务器搭建和常用配置介绍

    服务器搭建 : 搭建私有CA服务器 : http://www.cnblogs.com/zhaojiedi1992/p/zhaojiedi_linux_011_ca.html搭建samba服务器 : h ...

  8. Nginx 日志格式配置介绍

    Nginx日志格式配置介绍   by:授客  QQ:1033553122   测试环境 CentOS 6.5-x86_64 nginx-1.10.0 配置例子 log_format  main  '$ ...

  9. Tsung MQTT协议简介及MQTT xml文档配置介绍

    MQTT协议简介及MQTT xml文档配置介绍 by:授客 QQ:1033553122 1. MQTT协议介绍 MQTT(Message Queuing Telemetry Transport,消息队 ...

随机推荐

  1. 怎样对Android设备进行网络抓包

    问题描写叙述: 前段时间自己的app訪问server的url总是会出现间接性失败的问题,于是和server的同事开了个会.提出了他们server存在的这个bug,我的同事自然说自己的server没问题 ...

  2. _stdcall与_cdecl

    _cdecl(C Declaration的缩写)是C/C++和MFC程序默认使用的调用约定,因此可以省略,也可以在函数声明时加上_cdecl关键字来手工指定.采用_cdecl约定时,函数参数按照从右到 ...

  3. JSP开发学习参考文章

    配置JDK和Tomcat环境变量 http://blog.csdn.net/lijiazhi1987/article/details/2742181 eclipse maven plugin 插件安装 ...

  4. mysql学习笔记:存储过程

    use test; drop table if exists t8; CREATE TABLE t8(s1 INT,PRIMARY KEY(s1)); drop procedure if exists ...

  5. FourCC

    https://en.wikipedia.org/wiki/FourCC A FourCC (literally, four-character code) is a sequence of four ...

  6. 【网易云音乐 for linux】 踩过的坑

    1.从官网下载的包,却怎么也安装不上. 提示依赖,网上全是什么 sudo apt-get -f install ,结果提示有没有完成安装的包,让我卸载. 于是按下Y卸载了网易云. 尝试一个个修复以来, ...

  7. string转date

    /*util-->sql*/ java.util.Date utdt; java.sql.Date sqldt =null; SimpleDateFormat simFormat = new S ...

  8. AAC的ADTS头文件信息介绍

    遵循:BY-SA 署名-相同方式共享 4.0协议   作者:谭东 时间:2016年10月28日 环境:Windows 7   ADTS是Audio Data Transport Stream的简称. ...

  9. etcd磁盘清理步骤

    etcd默认的空间配额限制为2G,超出空间配额限制就会影响服务,所以需要定期清理 以下是etcd磁盘清理的步骤: 1. 显示空间配额: ETCDCTL_API=3 etcdctl --endpoint ...

  10. poj3264Balanced Lineup(倍增ST表)

    Balanced Lineup Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 52328   Accepted: 24551 ...