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. hdu 5950 Recursive sequence

    题意:告诉你数列的递推公式为f(n+1)=f(n)+2*f(n-1)+(n+1)^4 以及前两项a,b:问第n项为多少,结果对2147493647取模. 题解:有递推公式,马上应该就能想到矩阵快速幂: ...

  2. ASP.NET_SessionId vs .ASPXAUTH why do we need both of them?

    https://stackoverflow.com/questions/23758704/asp-net-sessionid-vs-aspxauth-why-do-we-need-both-of-th ...

  3. bzoj 1078 [SCOI2008]斜堆 —— 斜堆

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1078 考察斜堆的性质: 一个点如果没有左子树,也一定没有右子树: 看了这篇精美的博客:htt ...

  4. DOM对象,控制HTML元素(1)

    1:getElementsByName(name)方法 它是通过元素的name属性来查询元素,而不是通过id属性.getElementById()方法是通过元素的id属性来获取元素的. 注意: 该方法 ...

  5. 通过类库ChineseChar实现将汉字转化为拼音

    //封装dllusing Microsoft.International.Converters.PinYinConverter;using System.Text;namespace Utils{ p ...

  6. Akka源码分析-local-DeathWatch

    生命周期监控,也就是死亡监控,是akka编程中常用的机制.比如我们有了某个actor的ActorRef之后,希望在该actor死亡之后收到响应的消息,此时我们就可以使用watch函数达到这一目的. c ...

  7. JavaScript--编程练习1

    使用JS完成一个简单的计算器功能.实现2个输入框中输入整数后,点击第三个输入框能给出2个整数的加减乘除. 提示:获取元素的值设置和获取方法为:例:赋值:document.getElementById( ...

  8. HTML--使用提交按钮,提交数据

    在表单中有两种按钮可以使用,分别为:提交按钮.重置.这一小节讲解提交按钮:当用户需要提交表单信息到服务器时,需要用到提交按钮. 语法: <input type="submit" ...

  9. 【USACO2009 Open】滑雪课程ski

    [USACO2009 Open]滑雪课程 Ski Lessons Time Limit: 1000 ms Memory Limit: 131072 KBytes Description 约翰请贝西去科 ...

  10. Python安装distribute包

    从官网https://pypi.python.org/pypi/distribute/0.6.49#downloads上下载distribute包,解压后进入解压文件的目录下,使用 python se ...