08-11-2025 02:42 PM
I'm attempted to get NTP working on all my real-time controllers but I haven't had any success.
I've been following these instructions
opkg install ntp ntp-tickadj
vi /etc/ntp.conf
add the server to the file, and reboot.
NTP appears to be running but the offset is too extreme for it to synchronize. But in reality, there is no offset or barely any, it just thinks there is. I have tried this on 4 PXIe-8880s and 1 cRIO so far, all have the same result. The offset the ntpq -p claims, isn't even the same between machines so I really don't think this is simple user error. Yes, I've checked the timezones, I've made it UTC even for a bit. I've tried manually setting the time to reduce the offset and while I can reduce it, its always thousands of seconds off as far as I can tell. It's almost like it's reading milliseconds as seconds or something.
See attached for pictures taken from three different machines at the same time (ish). Sorry for the multi-color edits. All are running 2024 Q3 with the same Linux version.
I've been fighting this off and on for a while.
08-12-2025 07:19 PM - edited 08-12-2025 07:28 PM
I don't use a pool, I usually choose three servers near me (network-wise, not geographically, although they may be the same) and sync to them. You can also make your own stratum 1 time server by using a RPI and a GPS time source.
08-13-2025 09:05 AM
I'm not really using a pool, if by pool, you mean more than one NTP server. I was experimenting with different ways of going about having an NTP server. For now, its a stratum 1 domain server, that's actually offline. Which is fine for my purposes; the previous dev didn't have any time syncing and eventually I can get this network on the internet (ish) so I'll have access to an accurate clock later.
I experimented with an IRIG to USB on one of the client computers, then found it gets angry when there's more than one NTP stratum 1 server on the network and I was unwilling to use my domain as a guinea pig for the IRIG setup.
The cRIO test was on a completely different network with an IRIG to USB that comes up as stratum 1 but still says the offset is crazy high no matter what I do so the source isn't the issue. There has to be something odd about how the RTOS NTP client is translating the signal or something. My server is Windows Server 2022 if that matters but as far as I can research, NTP is NTP and there haven't been any major versioning.
On an early version, I was able to run the command ntpdate -u 192.168.xx.xx to force an update from a specific server, but these say they don't recognize that command anymore. I'm trying to avoid doing a full NTP dive and learning all the innerworkings include what NTP-utils is vs NTP-tickadj, etc.
08-13-2025 11:25 AM
@Furbs wrote:
I'm not really using a pool, if by pool, you mean more than one NTP server..
The "pool.ntp.org" is a special URL that will automatically pick one suitable NTP server in your region. Much easier that defining anything specific.
08-13-2025 11:44 AM
@altenbach wrote:
@Furbs wrote:
I'm not really using a pool, if by pool, you mean more than one NTP server..
The "pool.ntp.org" is a special URL that will automatically pick one suitable NTP server in your region. Much easier that defining anything specific.
I don't use the pool because I never know who I'm syncing to.
08-13-2025 12:26 PM - edited 08-13-2025 12:28 PM
@billko wrote:
@altenbach wrote:
@Furbs wrote:
I'm not really using a pool, if by pool, you mean more than one NTP server..
The "pool.ntp.org" is a special URL that will automatically pick one suitable NTP server in your region. Much easier that defining anything specific.
I don't use the pool because I never know who I'm syncing to.
(I was just making a non-judgmental statement about the special meaning of "pool" here as it relates to NTP)
It is an excellent default value for my code which is potentially used all over the world. It will be used if the server is left unwired as clearly documented on the FP. Nobody wants to send newbies on a snipe hunt to figure out which server is "best", enter it manually, making sure there is not typo, making sure it is up, and wire it instead, . 😄
08-13-2025 12:37 PM
@altenbach wrote:
@billko wrote:
@altenbach wrote:
@Furbs wrote:
I'm not really using a pool, if by pool, you mean more than one NTP server..
The "pool.ntp.org" is a special URL that will automatically pick one suitable NTP server in your region. Much easier that defining anything specific.
I don't use the pool because I never know who I'm syncing to.
(I was just making a non-judgmental statement about the special meaning of "pool" here as it relates to NTP)
It is an excellent default value for my code which is potentially used all over the world. It will be used if the server is left unwired as clearly documented on the FP. Nobody wants to send newbies on a snipe hunt to figure out which server is "best", enter it manually, making sure there is not typo, making sure it is up, and wire it instead, . 😄
Me, neither. I was just commenting on my personal prefs. 🙂
08-13-2025 03:41 PM
To be clear, I'm putting NTP directly on the RTOS, not using any kind of code or GUI. Basically NI is not involved.
Have either of you experience the timestamp being correct, but the client thinking its still too far off to synchronize?
08-13-2025 05:10 PM
This is the latest version of NTP? I've heard of stuff like this in (very) old implementations.
08-20-2025 01:37 PM
It's Windows Server 2022. the w32tm.dll says 10.0.20348
I wouldn't think that would qualify as very old.
Linux says 4.2.8p15