Articles of ntpd

NTP监听广播IP

我们已经限制NTP只听eth0,其余的应该忽略。 但是我们可以看到,在ntp.conf中进行更改后,它正在尝试侦听广播,并且无法将地址与意外错误绑定。 ntpd[89217]: ./../lib/isc/unix/ifiter_ioctl.c:617: unexpected error: ntpd[89217]: eth2:6: getting broadcast address: Cannot assign requested address ntpd[89217]: i/o error on routing socket No buffer space available – disabling ntpd[5410]: ./../lib/isc/unix/ifiter_ioctl.c:617: unexpected error: ntpd[5410]: eth3.1238:0: getting broadcast address: Cannot assign requested address ntpd[5410]: ntpd exiting on signal 15 ntpd[1508]: ntpd exiting on signal 15 以下是客户服务器的ntp.conf文件: 猫ntp.conf 软性127.127.1.0阶层10 […]

服务器到达“启动Web服务器”后继续重启

最近我们的服务器之一失败,并不会启动服务。 我查看了/var/log/messages ,发现这个: Dec 27 00:53:48 localhost apcupsd[3413]: apcupsd FATAL ERROR in linux-usb.c at line 609 Cannot find UPS device — For a link to detailed USB trouble shooting information, please see <http://www.apcupsd.com/suppo$ Dec 27 00:53:48 localhost apcupsd[3413]: apcupsd error shutdown completed Dec 27 00:53:59 localhost kernel: Linux video capture interface: v2.00 Dec 27 00:53:59 […]

尝试读取密钥文件时,NTP服务器权限被拒绝

我试图为我的内部networking上的主机设置一个NTP时间服务器来同步。 我需要使用授权才能符合PCI标准。 我使用ntp-keygen -M创build了一组密钥,并将下面的代码片段添加到服务器上的/etc/ntp.conf文件中。 enable auth keys /etc/ntp.keys trustedkey 1 7 17 我无法从客户端连接到服务器。 当我在客户端运行“ntpq -c as”时,我可以看到auth对我的服务器“不好”。 我已经将服务器上生成的密钥文件复制到客户端,并将可信的密钥行添加到客户端,如下所示: server timeserver key 17 restrict -4 default kod notrap nomodify nopeer noquery restrict -6 default kod notrap nomodify nopeer noquery restrict 127.0.0.1 restrict ::1 keys /etc/ntp.keys trustedkey 1 7 17 看看服务器日志,我可以看到,当我尝试读取文件时,我得到了一个权限被拒绝的错误,如下所示。 Jan 30 12:38:01 ip-10-0-1-103 systemd[1]: Starting LSB: […]

是否可以检查Busybox系统上的NTPd状态?

我需要知道当前的date/时间在小型embedded式Linux系统Busybox中是否可靠。 我有Busybox ntpd运行,但显然没有程序来查询状态。 在更传统的Linux安装中,我会使用ntpdc,ntpq,ntpstat甚至timedatectl,但是这些Busybox / Buildroot系统都不可用。 我还可以做些什么?

NTP客户重置date到1970年

我有和debian运行NTP客户端,但这个客户重置date1970年,并没有在日志中显示任何错误。 这是我试过:1)date(显示1970年)2)停止NTP服务3)ntpdate与服务器作为参数(date/时间同步完美)4)date(显示我正确的date/时间)5)ntpd -qdate到1970年没有任何错误:/) 这是我的日志这些程序….我不知道如何解决这个问题,因为没有错误。 root@radarboxcomstation:~# date Thu Jan 1 00:01:57 UTC 1970 root@radarboxcomstation:~# ntpdate 0.pool.ntp.org 17 Jul 13:33:44 ntpdate[11163]: step time server 195.22.17.7 offset 1500298282.181552 sec root@radarboxcomstation:~# date Mon Jul 17 13:33:47 UTC 2017 root@radarboxcomstation:~# ntpd -q 17 Jul 13:33:51 ntpd[11165]: ntpd [email protected] Sun May 10 14:06:45 UTC 2015 (1): Starting 17 Jul 13:33:51 ntpd[11165]: […]

ntp_gettime()返回代码5

我试图使用命令在ubuntu服务器上同步时钟: $sudo apt-get install ntp $sudo service ntp stop $sudo ntpd -gq $sudo service ntp start 但无论如何,这给了我: $sudo ntptime ntp_gettime() returns code 5 (ERROR) time dd8ee7a9.ff3c9258 Mon, Oct 16 2017 8:09:13.997, (.997018034), maximum error 16000000 us, estimated error 16000000 us, TAI offset 0 ntp_adjtime() returns code 5 (ERROR) modes 0x0 (), offset 0.000 us, frequency […]

为什么我的1PPS GPS stratum-1时钟总是比其他ntp服务器晚100ms?

我正在尝试build立一个第一层次的服务器。 我有一个Navisys GR-701 GPS,可以发送1 PPS信号。 根据这个规格表和资料来源,我觉得我应该用ntpd来获得〜1ms的准确度。 但是,我的ntpq输出总是看起来类似于以下内容: $ ntpq -pncrv remote refid st t when poll reach delay offset jitter ============================================================================== x127.127.22.0 .PPS. 0 l 10 16 377 0.000 -0.204 0.277 o127.127.20.0 .GPS. 0 l 11 16 377 0.000 -0.201 0.277 us.pool.ntp.org .POOL. 16 p – 64 0 0.000 0.000 0.000 pool.ntp.org .POOL. 16 p […]

为我的局域网设置一个NTP服务器

我试图设置我的Debian 6(Squeeze)虚拟机作为我的networking本地时间服务器。 我已经设置为tock.usno.navy.mil这是一个层1服务器同步。 我有一些问题find有关如何设置ntp守护程序服务时间的客户请求时间的任何信息。 我已经浏览了ntpd手册页,这可能是我find的最好的文档。 support.ntp.org对我来说几乎是无用的,我发现的文档更多地讨论了NTP如何工作,而不是如何configuration服务器。 我也注意到我没有得到任何关于与我列出的服务器同步的日志。 任何人可以提供的帮助将是伟大的,我不知道什么是错的。 我相信这是我正在做的事情。 我以前有一台服务器正在运行,但是我的SAN爆炸了,我没有做备份,因为它是用来testing的。 所以我没有旧的configuration来看看。 这里是一个ntp.conf的副本,因为这里没有任何东西可以提供我认为可能有帮助的任何个人信息。 # /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help driftfile /var/lib/ntp/ntp.drift # Enable this if you want statistics to be logged. #statsdir /var/log/ntpstats/ statistics loopstats peerstats clockstats filegen loopstats file loopstats type day enable filegen peerstats file peerstats type day enable filegen clockstats […]

时间受到ntpd和/ etc / localtime的影响

任何人都可以解释ntpd和/etc/localtime和system clock相互交互的,在UNIX中还是更具体的在FreeBSD中? 如果我误解了其中的一些概念,以便您能指出这些概念,我将对这些概念进行如下详细描述。 我真正的问题是下面。 DATE当我们在shell中执行“ date modify ”时,我认为它会修改/etc/localtime 。 /etc/localtime包含date和时间以及时区信息,通过glibc函数(如localtime()查询,时区也可以由tzset()手动设置。 时钟从一些在线的其他材料中,计算机中有两个时钟: hardware clock和system clock 。 硬件时钟由主板上的电池维持,而系统时钟是软件概念。 系统启动时系统时钟将由硬件时钟设置。 但可以通过ntpd稍后调整(如果我错了,请纠正我)。 ntpd nptd是系统启动后几秒钟开始的用户空间进程。 它会查询一些由ntp.conf某些ntp服务器。 它具有时间漂移调整速度慢的特点,不会发生剧烈的时间变化。 (但时区怎么样,ntpd也会查询时区,然后逐渐改变它,这可能需要很长时间。)对于戏剧性的时间更新,有一个ntpupdate() api。 题 我发现没有资源解释他们之间的交互。 这些概念中的每一个似乎都有一些独立的本地文件来触摸和保持。 我问的原因是因为我观察到,我写的过程中,每当用户要求显示一些数据时dynamic地调用localtime ,它并不反映date modify更新的时区更改(在过程中时间或时区都没有更改)。

NTP minpoll-maxpoll控制同步间隔吗?

NTP minpoll和maxpollconfiguration属性是否控制同步间隔,还是只控制轮询间隔? 哪里: 轮询 =使用NTP服务器进行消息传递以估计偏移量 同步 =实际更新系统时钟