Live data from Hacker News

Going in circles without a real-time clock

rachelbythebay.com

81–90 of 157 posts

Re: Going in circles without a real-time clock

#81

I've personally had so many issues with SD card corruption on raspberry pi's that I've decided it was a mistake to even allow SD card disks I only ever use USB storage on my pi's now and not had a single issue since

Indeed, except if you run an in-memory overlay filesystem this might change dramatically for you. I have several Pi's that run for years and years without SD card corruption this way. Normally, however, as in my sbts-aru project, I don't just do that but also create separate data partitions that are read-write. It appears that even though there are some partitions on the card that are read-write, if they are not the system one it is also much more resilient to fatal corruption.

Re: Going in circles without a real-time clock

#82

I had this happen before. I used it as an excuse to learn how to setup NTP with a GPS receiver. I made a little blog on it if anyone is interested in the results. Be sure to click the sandwich menu for some real-time data: https://www.developerdan.com/ntp/

As for the GT-U7, this software can be used to avoid Windows, it seems:

https://github.com/semuconsulting/PyGPSClient

Re: Going in circles without a real-time clock

#83

Its weird that people work OK without knowing exactly what time it is. Sure it helps us but if a person lost track of the date for a few days in a city they would still be able to perform basic functions. We only have had timekeeping devices for a tiny part of our history but we invented alot of stuff without precise synchrony.

How did they do sound localization then in those times ???

Re: Going in circles without a real-time clock

#84

I've personally had so many issues with SD card corruption on raspberry pi's that I've decided it was a mistake to even allow SD card disks I only ever use USB storage on my pi's now and not had a single issue since

Same with "real" servers. For a while there, it was trendy to boot ESXi from an SD card stuck to the system board and use all of the 2.5" disks for just data storage, no OS. It worked great... until it didn't. It turns out that writing logs and swap to an SD card roasts it after 2-4 years pretty consistently.

Re: Going in circles without a real-time clock

#85

Earlier quoted context omitted.

> It would be nice if DHCP could provide the current time as one of the pieces of information it provides with a lease. [0] DHCP can provide the IP address of one or more NTP servers to consult for time queries. I use this feature so that all of the machines on my LAN (at least the ones that can be configured to ask for and/or use this information) have the same general idea of what time it is. [0] See subsection 8.3…

I do that, with a local GSP-synced Pi. Very cheap and easy to set up with IPv4 at least. That said, if you don't trust the DHCP server because some evil actor might give you the wrong time, why should you trust the NTP server it tells you about?

I agree that if you distrust the network operator (but must use the operated network for some reason) that you should accept as little configuration information provided by that operator as is reasonably possible.

That goes without saying.

I mentioned the fact that DHCP can provide NTP server information as a way to explain why DHCP wouldn't just straight-up provide "current time" information. Why do that when you can point people to a server running a far superior purpose-built timekeeping protocol? It'd just be silly to do the worse thing.

(Notice also that RFC2132 was published in 1997. In my mind, this moots any retorts that a good reason for providing time directly would be because the DHCP server's supplicant is too underpowered to run an NTP client. In 2024? On a consumer-grade device? No way.)

Re: Going in circles without a real-time clock

#86

I had this happen before. I used it as an excuse to learn how to setup NTP with a GPS receiver. I made a little blog on it if anyone is interested in the results. Be sure to click the sandwich menu for some real-time data: https://www.developerdan.com/ntp/

Interesting! What is the accuracy like when lacking "PPS precision"/Clayface? I'm wondering about the magnitude by which it is off (seconds, minutes, or other). PPS turned up quickly on Wikipedia, so that one is readily answered > PPS signals have an accuracy ranging from 12 picoseconds to a few microseconds per second, or 2.0 nanoseconds to a few milliseconds per day based on the resolution and accuracy of the devic…

You can see for yourself the level of accuracy in the ntpviz output. Notice the units of measurement on the graphs:

* Clayface: https://www.developerdan.com/ntp/#./clayface/7-days/

* Catwoman: https://www.developerdan.com/ntp/#./catwoman/7-days/

That Wikipedia quote should mention temperature! Temperature variations have a big impact at this level of accuracy. These really cheap GPS receivers do not have temperature adjusted clocks. Unfortunately my server closet (this is just a hobby) does not have well regulated temperature, so you can see the impact of temperature on the clock accuracy. Also, I found if I start running a bunch of stuff on these computers - that makes the CPU heat up, which also affects the jitter. If you really want high-precision, you'll have to shell out some extra cash then I did: https://www.sparkfun.com/products/18774

Re: Going in circles without a real-time clock

#87
post #82

I had this happen before. I used it as an excuse to learn how to setup NTP with a GPS receiver. I made a little blog on it if anyone is interested in the results. Be sure to click the sandwich menu for some real-time data: https://www.developerdan.com/ntp/

As for the GT-U7, this software can be used to avoid Windows, it seems: https://github.com/semuconsulting/PyGPSClient

> While not intended to be a direct replacement, the application supports most of the UBX configuration functionality in u-blox's Windows-only u-center © tool (only public-domain features are supported).

I'm going to have to check this out! Thank you for sharing!

Re: Going in circles without a real-time clock

#88
post #78

Earlier quoted context omitted.

Good question, it absolutely syncs without any network connectivity. For better or for worse, I have it setup NOT to sync to anything else- being a stratum 1 source is enough. Now… I will admit I’m just a hobbyist with this stuff. Anyways, the way I got around it trying to sync to another source when using the PPS was to define the GPS as two separate sources. One for the PPS signal and another for the NMEA sentences…

Ah okay. Because I found that the default start order of gpsmon and chrony was incorrect meaning that the shared memory communications wasn't working but there were no error messages stating this. So sometimes, it would sync (slowly) and then chrony sources would say that it was having microsecond sync time but when I connected a switch (On/Off type) to the same gpio on two separate Pi's with linked earth connections…

I must admit I've never used chrony, so I'm unfamiliar with how to configure it. I've read a lot say saying gpsmon's shared-memory-segment is a really great interface and to go with it instead of NTP's own GPS drivers, but I cannot say that lines up with my experience. I do have one computer setup this way, and it works, but I found on the PPS configurations, it seemed to me to have better accuracy and less jitter using NTP's own GPS drivers and taking gpsmon out of the equation. Its quite possible I just don't know the right configuration combination, but ntpsec's own GPS drivers work great for me.

Re: Going in circles without a real-time clock

#90
post #84

I've personally had so many issues with SD card corruption on raspberry pi's that I've decided it was a mistake to even allow SD card disks I only ever use USB storage on my pi's now and not had a single issue since

Same with "real" servers. For a while there, it was trendy to boot ESXi from an SD card stuck to the system board and use all of the 2.5" disks for just data storage, no OS. It worked great... until it didn't. It turns out that writing logs and swap to an SD card roasts it after 2-4 years pretty consistently.

[deleted]
Post reply on HN