[日志]offset 正负

机器A上执行:

     remote           refid	 st t when poll reach   delay   offset  jitter
==============================================================================
127.127.1.0 .LOCL. 10 l 213 64 30 0.000 0.000 0.000
*B 182.92.12.11 3 u 41 64 77 0.117 -2164.9 0.688

表示: 机器A比机器B 快2s钟

[1] 10:13:08 [SUCCESS] B
Thu Jul 27 10:13:08 CST 2017
[2] 10:13:08 [SUCCESS] A
Thu Jul 27 10:13:10 CST 2017

[日志]time reset

17 Jun 21:52:12 ntpd[6771]: time reset -47.573538 s

step && slew 阀值

[测试]ntp server时间倒退对ntp client的影响

ntp client:C

ntp server:S

场景1:client不使用-x

场景1.1:跳变来自server

为了达到测试目的,我们将B设置为local的状态,不是其它的server的影响

机器B:

#ntpq -np
remote refid st t when poll reach delay offset jitter
==============================================================================
*127.127.1.0 .LOCL. 10 l 57 64 17 0.000 0.000 0.000

在没有使用-x的情况下,如果ntp server B 时间忽然倒退4s,那么 机器A会跟着直接倒退吗??

机器B倒退:4s

[1] 10:32:56 [SUCCESS] C
Thu Jul 27 10:32:56 CST 2017
[2] 10:32:56 [SUCCESS] S
Thu Jul 27 10:32:52 CST 2017

结果: client 会跟着倒退

日志报错是:clock_step 不是time reset

27 Jul 10:28:48 ntpd[238721]: 0.0.0.0 c515 05 clock_sync
27 Jul 10:35:31 ntpd[238721]: 0.0.0.0 0613 03 spike_detect -3.949780 s
27 Jul 10:46:43 ntpd[238721]: 0.0.0.0 061c 0c clock_step -3.949112 s
27 Jul 10:46:40 ntpd[238721]: 0.0.0.0 0614 04 freq_mode

场景1.2:跳变来自client

场景1.2.1:跳变来自client,时间快进,预期会倒退

[1] 11:04:27 [SUCCESS] C
Thu Jul 27 11:04:25 CST 2017
[2] 11:04:27 [SUCCESS] S
Thu Jul 27 11:04:23 CST 2017

场景1.2.2:跳变来自client,时间倒退,预期会快进

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
127.127.1.0 .LOCL. 10 l 332 64 40 0.000 0.000 0.000
*S LOCAL(0) 11 u 3 8 377 0.075 4152.11 0.067
27 Jul 11:11:08 ntpd[100258]: 0.0.0.0 c515 05 clock_sync
27 Jul 11:13:41 ntpd[100258]: 0.0.0.0 0613 03 spike_detect +4.152511 s
27 Jul 11:27:01 ntpd[100258]: 0.0.0.0 061c 0c clock_step +4.151101 s
27 Jul 11:27:05 ntpd[100258]: 0.0.0.0 0614 04 freq_mode

场景2:client使用-x

如下,server 时间倒退2s

[1] 10:40:44 [SUCCESS] C
Thu Jul 27 10:40:46 CST 2017
ntp 79665 0.0 0.0 31248 1680 ? Ss 10:38 0:00 /usr/sbin/ntpd -u ntp:ntp -g -x
[2] 10:40:44 [SUCCESS] S
Thu Jul 27 10:40:44 CST 2017
ntp 86468 0.0 0.0 31248 1680 ? Ss 10:37 0:00 /usr/sbin/ntpd -u ntp:ntp -g

client:

#ntpq -np
remote refid st t when poll reach delay offset jitter
==============================================================================
127.127.1.0 .LOCL. 10 l 224 64 30 0.000 0.000 0.000
*server LOCAL(0) 11 u 6 8 377 0.065 -2133.0 13.464

结果:

client 会逐渐逼近server但是不会一次性倒退

这里是slew的缓慢同步,slew同步没有日志,只有step的方式才有日志

#ntpq -np
remote refid st t when poll reach delay offset jitter
==============================================================================
127.127.1.0 .LOCL. 10 l 224 64 30 0.000 0.000 0.000
*10.218.250.171 LOCAL(0) 11 u 6 8 377 0.065 -2133.0 13.464 等待。。。 #ntpq -np
remote refid st t when poll reach delay offset jitter
==============================================================================
127.127.1.0 .LOCL. 10 l 1072 64 0 0.000 0.000 0.000
*10.218.250.171 LOCAL(0) 11 u 6 8 377 0.066 -1686.3 17.906

REF

http://tianxiamall.blog.163.com/blog/static/20848911220152186413732/

ntp.log日志梳理的更多相关文章

  1. JAVA主流日志梳理

    JAVA主流日志梳理 引入 历史故事 Log4j - JDK1.3及以前 JUL - JDK1.4 JCL - 日志门面commons-logging的出现 SLF4j - 可能是最好的日志框架 lo ...

  2. Atitit.log日志技术的最佳实践attilax总结

    Atitit.log日志技术的最佳实践attilax总结 1. 日志的意义与作用1 1.1. 日志系统是一种不可或缺的单元测试,跟踪调试工具1 2. 俩种实现[1]日志系统作为一种服务进程存在 [2] ...

  3. mysql general log日志

    注:应一直出现http://www.cnblogs.com/hwaggLee/p/6030765.html文章中的问题 故mysql general log日志.查看具体是什么命令导致的. 打开 ge ...

  4. 使用触发器实现记录oracle用户登录失败信息到alert.log日志文件

    前面我们说了用oracle自带的审计功能可以实现记录用户登录失败日志到数据表中(链接:http://www.54ok.cn/6778.html).今天我们来分享一下如何把用户登录失败信息记录到aler ...

  5. Junit测试打印详细的log日志,可以看到sql

    Junit测试打印详细的log日志,可以看到sql 在log4j.xml的日志配置文件中,把日志级别从info级别调整到debug级别: <?xml version="1.0" ...

  6. iOS及时log日志查看工具 (iConsole)

    github下载地址:https://github.com/nicklockwood/iConsole 偶然看到的一个iOS及时log日志查看工具,通过该工具,我们可以在任何想看日志的时候,通过手势呼 ...

  7. svn update -r m path 代码还原到某个版本(这样之前的log日志也就没了,也就是清空log日志)

    [root@ok 资料库]# svn log 简历 ------------------------------------------------------------------------ r ...

  8. 【个人使用.Net类库】(2)Log日志记录类

    开发接口程序时,要保证程序稳定运行就要时刻监控接口程序发送和接收的数据,这就需要一个日志记录的类将需要的信息记录在日志文件中,便于自己维护接口程序.(Web系统也是如此,只是对应的日志实现比这个要复杂 ...

  9. [转] C#实现自动化Log日志

    qing2005原文地址 C#实现自动化Log日志 在开发项目的时候,我们不免要使用Log记录日志,使用最多的是Log4Net和EntLib Log,在需要记录日志的代码处加入log.Write(日志 ...

随机推荐

  1. 3.2、使用Flask-Bootstrap集成Twitter Bootstrap

    Bootstrap(http://getbootstrap.com/)是 Twitter 开发的一个开源框架,它提供的用户界面组件可用于创建整洁且具有吸引力的网页,而且这些网页还能兼容所有现代 Web ...

  2. JSP中文乱码问题的由来以及解决方法

    首先明确一点,在计算机中,只有二进制的数据! 一.java_web乱码问题的由来 1.字符集 1.1 ASCII字符集 在早期的计算机系统中,使用的字符非常少,这些字符包括26个英文字母.数字符号和一 ...

  3. BA-siemens-apogee总线不稳定解决方法

    状况一:BLN下的火车头在线,但是下面的模块(包括UEC或者PPM)全部掉线 尝试方法: 使用挨个DDC箱断线的方法测试总线是否上线(可以解决由于总线短路引起的总线故障,施工中总线压冷压端子的话就不容 ...

  4. 基本socket api

    socket函数,为了执行网络I/O,一个进程必须做的第一件事就是调用socket函数,并且指定通信协议类型. #include<sys/socket.h> int socket (int ...

  5. HDU 1215

    由算术基本定理, 直接使用公式就好 #include <iostream> #include <cstdio> #include <algorithm> #incl ...

  6. byte类型取值范围以及溢出具体解释

    例1: public class test { public static void main(String[] args) { byte a = 127 ; a = (byte)(a+3) ; Sy ...

  7. cocos2D(六)----CCLayer

    一个游戏中能够有非常多个场景,每一个场景里面又可能包括有多个图层,这里的图层一般就是CCLayer对象.CCLayer本身差点儿没什么功能.对照CCNode,CCLayer可用于接收触摸和加速计输入. ...

  8. 在 Eclipse 中使用 C++

    安装 安装Eclipse Eclipse下载页 能够选择Eclipse IDE for C/C++ Developers(内置CDT插件) 也能够选择安装其它版本号之后再安装CDT插件. 安装CDT插 ...

  9. 转:centos下升级git版本的操作记录

    https://www.cnblogs.com/kevingrace/p/8252517.html 在使用git pull.git push.git clone的时候,或者在使用jenkins发版的时 ...

  10. Response.Redirect(),Server.Transfer(),Server.Execute()的区别与网站优化

    转 http://blog.csdn.net/dannywj1371/article/details/10213631 1.Response.Redirect():Response.Redirect方 ...