NTP

共 7 篇文章。

关于闰秒

• Kernel

phk 老大如此 吐槽:

来自 X (Twitter)

背景

关于时间,A core 几年前写过一个 时间是什么? 的系列: 序言 续一 续二 续三。

为了兼顾天文观测获得的时间 UT1(更符合普通人的需要)和由铯-133原子震荡获得的时间 TAI (更稳定),将两者综合一下就获得了协调世界时 UTC。UTC 和 UT1 之间的差距永远保持在 1 秒以内。UTC 中的一秒和 TAI 相同,但 UTC 和 UT1 保持最多一秒的差距,这是通过 IERS 在 UTC 事件中人为插入或减少闰秒这样的人为调整来实现的。从1972年这套系统投入运营到今天为止,总共插入了35个闰秒(2015年6月30日还将再插入一个闰秒)。

闰秒只在每年的6月30日和12月31日的UTC时间 23:59:59 之后插入,表示为当天的 23:59:60。

阅读全文… ( 本文约 1446 字,阅读大致需要 3 分钟 )

一种针对 ntp 服务的 UDP 杠杆式攻击

• Security

今天(2014/01/14)发了4个安全公告和2个勘误公告,其中 FreeBSD-SA-14:02.ntpd 是针对 NTP 的这种攻击的因应措施。

攻击的原理是通过发送一个小包(GET_MONLIST),得到大体积的回应。而由于 NTP 使用了 UDP 协议,因此攻击者可以伪造源 IP,从而,通过较小的流量代价,即可利用其他服务器作为杠杆来攻击受害者。

阅读全文… ( 本文约 354 字,阅读大致需要 1 分钟 )

RTC 与 NTP

• Kernel

早期版本的 FreeBSD 有一个问题是,如果使用 ntpd 来校准系统时钟的话,如果长期开机,则在重启之后,时间会差很远,之前一直没仔细研究这个问题。最近突然发现 FreeBSD 8.1-RELEASE 里面没有这个问题了,于是翻看了一下代码和之前的一些邮件才明白是怎么回事,总结一下:

阅读全文… ( 本文约 762 字,阅读大致需要 2 分钟 )

AsiaBSDCon上说OpenBSD的sensor framework的时候的一个观点

• Security

最近在回味AsiaBSDCon的一些东西,关于对时,有一句话印象很深,在这里跟大家分享一下我的理解。

为什么不用ntpdate,而要用ntpd:

时钟的__跃变__,有时候会导致很严重的问题。许多应用程序依赖__连续__的时钟——毕竟,这是一项常见的假定,即,取得的时间是线性的,一些操作,例如数据库事务,通常会地依赖这样的事实:时间不会往回跳跃。

阅读全文… ( 本文约 643 字,阅读大致需要 2 分钟 )

What? Why?? So inaccurate?!

• The Universe

Seems that my server keep tuning its clock, somewhat weird…

Jun 30 22:56:43 tarsier ntpd[412]: ntpd 4.2.0-a Thu Jun 30 11:02:35 CST 2005 (1)
Jun 30 22:56:43 tarsier ntpd[412]: no IPv6 interfaces found
Jun 30 23:05:20 tarsier ntpd[412]: kernel time sync disabled 2041
Jun 30 23:14:58 tarsier ntpd[412]: kernel time sync enabled 2001
Jul 1 01:26:33 tarsier ntpd[412]: kernel time sync enabled 6001
Jul 1 01:43:39 tarsier ntpd[412]: kernel time sync enabled 2001
Jul 1 09:36:14 tarsier ntpd[412]: time reset -0.152496 s
Jul 1 11:30:42 tarsier ntpd[412]: time reset +0.155343 s
Jul 1 11:30:42 tarsier ntpd[412]: kernel time sync enabled 6001
Jul 1 11:40:17 tarsier ntpd[412]: kernel time sync enabled 2001
Jul 1 15:57:41 tarsier ntpd[412]: time reset +0.176810 s
Jul 1 15:57:41 tarsier ntpd[412]: kernel time sync enabled 6001
Jul 1 16:07:19 tarsier ntpd[412]: kernel time sync enabled 2001
Jul 1 20:10:47 tarsier ntpd[412]: time reset -0.156077 s
Jul 1 20:20:24 tarsier ntpd[412]: time reset +0.236649 s
Jul 2 10:33:54 tarsier ntpd[412]: time reset -0.132817 s
Jul 2 16:11:24 tarsier ntpd[412]: kernel time sync enabled 6001
Jul 2 16:27:47 tarsier ntpd[412]: kernel time sync enabled 2001
Jul 3 19:50:46 tarsier ntpd[412]: kernel time sync enabled 6001
Jul 3 20:17:51 tarsier ntpd[412]: kernel time sync enabled 2001
Jul 4 10:12:53 tarsier ntpd[412]: time reset -0.160430 s
Jul 4 10:12:53 tarsier ntpd[412]: kernel time sync enabled 6001
Jul 4 10:22:29 tarsier ntpd[412]: kernel time sync enabled 2001
Jul 4 20:30:43 tarsier ntpd[412]: kernel time sync enabled 6001
Jul 4 20:31:05 tarsier ntpd[412]: kernel time sync enabled 2001
Jul 5 00:34:58 tarsier ntpd[412]: time reset +0.157389 s
Jul 5 11:00:13 tarsier ntpd[412]: time reset -0.133099 s
Jul 5 18:48:49 tarsier ntpd[412]: time reset +0.263088 s
Jul 5 18:48:49 tarsier ntpd[412]: kernel time sync enabled 6001
Jul 5 18:58:22 tarsier ntpd[412]: kernel time sync enabled 2001
Jul 5 19:57:22 tarsier ntpd[412]: time reset -0.178673 s
Jul 6 00:12:40 tarsier ntpd[412]: time reset +0.144622 s
Jul 6 09:51:10 tarsier ntpd[412]: time reset -0.132773 s
Jul 6 23:40:28 tarsier ntpd[412]: time reset +0.149341 s
Jul 7 01:53:55 tarsier ntpd[412]: time reset -0.177050 s
Jul 7 09:58:34 tarsier ntpd[412]: time reset -0.183544 s
Jul 7 12:15:14 tarsier ntpd[412]: time reset +0.158977 s
Jul 7 17:33:38 tarsier ntpd[412]: time reset +0.188230 s
Jul 7 19:31:21 tarsier ntpd[412]: time reset -0.183378 s
Jul 8 09:22:04 tarsier ntpd[412]: time reset -0.190559 s
Jul 8 10:48:50 tarsier ntpd[412]: time reset +0.144984 s
Jul 8 14:44:54 tarsier ntpd[412]: time reset +0.156142 s
Jul 8 20:13:49 tarsier ntpd[412]: time reset -0.211498 s
Jul 8 20:23:25 tarsier ntpd[412]: time reset +0.213453 s
Jul 8 23:54:54 tarsier ntpd[412]: time reset +0.171939 s
Jul 9 03:35:08 tarsier ntpd[412]: time reset -0.150036 s

参与评论