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. ios method swizzling

      阅读器 iOS开发iOS   本文由TracyYih[博客]翻译自NSHipster的文章Method Swizzling.   在上周associated objects一文中,我们开始探索Ob ...

  2. LeetCode 720. Longest Word in Dictionary (字典里最长的单词)

    Given a list of strings words representing an English Dictionary, find the longest word in words tha ...

  3. oc75--不可变字典NSDictionary

    // // main.m // NSDictionary // // #import <Foundation/Foundation.h> int main(int argc, const ...

  4. kentico9开始移除的webpart

    https://devnet.kentico.com/articles/fighting-featuritis https://blog.intercom.com/product-strategy-m ...

  5. Mysql的简单使用(二)

    接上文Mysql的简单使用(一) 字段参数以“(字段名1 数据类型1,字段名2 数据类型2,......)”的形式构建. 关于mysql常用的数据类型,一下是比较常用的几种,想查阅比较详细的资料可以自 ...

  6. P5058 [ZJOI2004]嗅探器 tarjan割点

    这个题是tarjan裸题.最后bfs暴力找联通块就行.(一开始完全写错了竟然得了70分,题意都理解反了...这数据强度...) 题干: 题目描述 某军搞信息对抗实战演习,红军成功地侵入了蓝军的内部网络 ...

  7. RDA EQ&频响曲线

    相关数据: FAC->Audio->EQ Setting EQ Band - Gain Frequency Q Factor 1.5 FAC->Audio->PEQ // En ...

  8. Rails mysql数据库连接的小坑

    基本上直接clone下来的话,数据库连接必失败.   注意,把用户名密码写在.env文件下

  9. ognl表达式注意事项

    1.在jsp页面中: <s:a action="departmentAction_delete.action?did="></s:a> 说明:   1.st ...

  10. window.onload的使用

    window.onload:当页面加载的时候可以调用某些函数 例如: 1.最简单的调用方式 直接写到html的body标签里面,如: <html> <body onload=&quo ...