问题标签 [ntpd]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
gps - GPSD 是否支持基于 LEA-M8 系列的 U-blox EVK-M8N 和 EVK-M8T
我阅读了以下链接: http: //www.catb.org/gpsd/gpsd-time-service-howto.html#_choice_of_hardware和http://catb.org/gpsd/hardware.html,其中 U -blox EVK 6H 建议与开源 GPSD 和 NTPD 一起使用,以实现基于每秒脉冲 (PPS) 的时间同步。但是,u-blox 不再销售 EVK 6H,可用的最新评估套件是用于 LEA-M8 系列的 EVK-M8N 和 EVK-M8T。您知道 GPSD 是否可以与 EVK-M8N 和 EVK-M8T 一起正常工作吗?
LEA-M8S 和 LEA-M8T 是否属于 u-blox M8 系列?我从 GPSD 的网页上阅读了以下声明:http: //www.catb.org/gpsd/references.html
“ u-blox M8 Rev 08(2014 年 12 月)他 u-blox M8 支持 GPS、GLONASS 和北斗。gpsd 支持它。”
任何人都有使用 EVK-M8* 进行 GPSD 工作的经验?
还有其他 GPS 设备,例如 Garmin 18X 和 16X,它们需要使用 RS232 连接器进行一些焊接工作。您对 GPS 模块有何建议,以便在 Linux、U-blox 或 Garmin 上与 GPSD 和 NTPD 一起使用?
谢谢!
建国
hadoop - docker 容器中的 ntpd 服务已死,无法重新启动
我正在尝试使用 docker 和 ambari 安装本地 hadoop 集群,我遇到的问题是 ambari 安装检查显示 NTP 没有运行,并且需要知道使用 ambari 安装的服务是否正在运行。我检查了容器中的 ntpd 并尝试启动它们,但它失败了
有没有办法在这些容器中启动 ntp 守护进程?
ntp - ntpd 拒绝与上游服务器同步
我在 CentOS 6.9 服务器上运行 ntpd,并且我的 ntpd 配置之前一直在正常工作。通常,这需要一点时间,但一段时间后它会与更高层的服务器同步。
但是,在我昨晚执行内核更新后,服务器拒绝连接到其中任何一个。它仍然将除本地对等方之外的所有内容显示为第 16 层。
我在配置中使用以下服务器。
ntpd 使用这些参数进行配置。
我尝试停止 ntpd,执行 ntpdate -s/-u 然后再次启动 ntpd。它似乎在我运行 ntpdate 时调整时钟,但拒绝通过服务同步。一切都无限期地保留在第 16 层。
ntp - busybox ntpd 更改后不会重新同步日期/时间
我试图弄清楚 ntpd(来自busybox)是如何工作的。为了测试,我正在运行以下场景:
- 使用
date -s
, 将日期/时间设置为任意日期/时间(例如2000-01-01 00:00:00
); - 运行命令
ntpd -N -p <server_address>
以启动守护程序。之后,日期/时间同步成功; - 再次使用 ,将日期/时间更改为
date -s
与第一步中使用的相同(即2000-01-01 00:00:00
);
在那之后,我一直期待日期/时间再次同步,但这不会发生,即使我等待了几个小时。
我的问题是:我对 ntpd 行为的理解是否正确?第三步后是否应该自动重新同步日期/时间?如果没有,我应该怎么做才能重新同步日期/时间?
ntp - 尽管具有更好的偏移和抖动,首选 NTP 服务器仍被拒绝
我们在我们的一个系统上配置了一个 NTP 客户端。客户端有一组可以与之同步的服务器。
然而,我们选择的首选服务器是我们的内部主服务器,IP 为 169.254.1.51。
ntp.conf 的内容如下:-
以上是配置部分。但是,当我们在配置并重新启动系统后检查 syslog 时,我们发现客户端正在与外部服务器同步,而不是在 syslog 中的 ntpq 输出中捕获的首选服务器
此外,以下消息消息在系统日志中不断泛滥
我们尝试在 NTP 论坛上进行检查,并确定它使用以下参数来定义要与其同步的服务器(参考:- https://www.eecis.udel.edu/~mills/ntp/html/warp.html) :-
- 第一级拒绝基于偏移和延迟发生。
- 然后在拒绝池之后,将幸存者传递给时钟聚类算法。
- 聚类算法依靠抖动来决定。
- 剩下的所有服务器都是可选择的幸存者,可以选择其中任何一个。
- 现在prefer关键字的作用开始发挥作用,所有的selectable都被选中,prefer one被选中。
- 如果幸存者不存在,则迁移规则决定对等方。
然而,在 ntpq 输出中,首选服务器具有更好的偏移和抖动,即使这样也没有被选择。
在这种情况下,是否可以确定它拒绝首选服务器的依据是什么。
autotools - What is the proper method to modify the autotools options of a Buildroot source package using BR2_EXTERNAL?
I want to change the <PKG>_CONF_OPTS
config options for a package included in Buildroot without altering the baseline <pkg>.mk
file. Based on what I'm reading, it shouldn't be necessary to completely override the package using the BR2_PACKAGE_OVERRIDE_FILE
as I don't want to change the source or anything else significant.
It has been suggested that this can be done using BR2_EXTERNAL
and external.mk
, but I cannot find any examples and my attempts have failed. The Buildroot documentation is quite silent on this topic, as near as I can tell, and instead only explains the creation of new packages rather than the build customization of included packages.
I have tried adding lines to external.mk
directly as in <PKG>_CONF_OPTS += --new-option
but this has no effect. I have also tried creating a supplementary makefile in package/<pkg>/<pkg>.mk
and filling in the needed information in the Config.in
files for a "new" package but this has also failed.
I have referenced a couple of related questions that do not have complete answers given, so I am hoping to discover the general method and document it here.
How to pass extra custom ./configure autotools options to a Buildroot package?
Buildroot: Build only one package as both shared and static lib, all others shared only
Hopefully with a couple hints we can get this figured out and then documented for others.
EDIT: Done quite a bit of testing with this, and it's interesting to note that even the "sanity check" case of making the changes to _CONF_OPTS directly in the existing package is not having the desired effect. In my case (trying to do a static linkage build of one particular package while leaving everything else dynamic) I find that the presence or absence of BR2_STATIC_LIBS in the _defconfig controls everything when it comes down to the final build command, despite acknowledgement to the contrary all throughout the build logs.
bash - Shell 脚本命令超时
我正在尝试运行命令,但如果命令在一段时间内没有成功(例如 30 秒),请取消命令并失败。该脚本相当简单,我只是暂停 ntpd,然后强制时间同步并启动。但是,如果存在无效的 ntp 服务器,则会挂起。
我的想法是,我尝试在后台运行它,每 10 秒检查一次命令是否仍在尝试运行。并说在 3 次检查后我是否看到“ntpd -gq”我终止进程并返回失败。这是正确的方法还是有任何内置的时间处理?
rhel - 将 chrony.conf 文件设置为“服务器”而不是“池”
我正在使用 RHEL 8 并且不再支持 ntp 包,它由 chrony 包中提供的 chronyd 守护程序实现。该文件设置为使用 pool.ntp.org 项目(pool 2.rhel.pool.ntp.org iburst)中的公共服务器。有没有办法设置服务器而不是池?
我的 chrony.conf 文件:
c++ - 如何检查 ntpd 是否仍在运行和同步
我正在调用 ntp_gettime() 并且它按预期执行但是如果我杀死 ntpd 我仍然会得到正确的行为,并且我的返回值没有显示任何问题。这表明 ntp_gettime() 不会调用 ntpd,我相信这是正在发生的事情。
我正在尝试检查 ntpd 是否仍然正常运行并且它仍然具有有效的连接。我现在假设 ntpd 根据定义的时间间隔更新系统,并且 ntp_gettime() 调用仅调用系统。
我的问题是可以使用 ntp_gettime() 来确定 ntpd 是否正在运行并且服务器连接仍然有效并且我只是在某个地方犯了错误吗?如果没有,有没有办法做到这一点?
openwrt - 不同步时禁用 chrony NTP 服务器
我有一个运行 chrony (chronyd) 的 OpenWRT 路由器。硬件没有 RTC,所以在断电后,系统时钟会变得疯狂。
我想拥有一个 LAN NTP 服务器,但如果不知何故没有互联网连接并且由于断电而时钟错误,则 NTP 服务器将错误的时间传递给客户端。考虑到我正在使用无法防止大时钟摆动的“廉价”NTP 客户端(Android/Arduino/其他路由器/相机)。
我想在重新启动时禁用 chrony NTP 服务器并等待第一次同步以启用它。我认为这是一个常见的设置,但在任何地方都找不到。
我也尝试过 ntpd 并且我对替代方案持开放态度(但它必须在 OpenWRT 上运行)。
注意:即使没有互联网连接,我已经尝试使用 USB GPS 作为更可靠的时钟源。