Stuart, I am aware that ntpd(8) on boot won't update the clock if the current time is ahead of the time received from the time server. It's in the man page section that I posted in my message. I personally have never really had an issue there, though.
I'm aware of a variety of ways to resolve the problem. However, for some reason I hadn't thought of resolving it by running rdate(8) at boot before ntpd(8). I've resolved it with running rdate(8) manually and also thought about having a remote script run rdate(8) as well. Would the correct place to do this be in /etc/rc and rdate(8) should be called right before it says "echo -n 'starting early daemons:'"? Or is there a better way of doing this? Otto, Something I wasn't thinking about until I read your message was how much drift would a non-RTC enabled machine have if offline. The answer doesn't seem to be an easy one, given there are a lot of factors at play. My best guess is even with a machine being out of contact with a time server for several months, the clock likely wouldn't drift more than 60 seconds. I've had old machines that have been offline for a while, but given they had RTCs, I'm assuming that's why I never had any problems related to NTP. Therefore, I have no threshold for what's normal in regards to drift. Out of curiosity, in the future, I'll have to pay more attention to see how much drift occurred during the period of time it was offline. As for the options for resolution, I'm aware of simply adding RTCs to these machines. I'm also aware of changing the monitoring period. My original thinking was for a server side script to run rdate(8) depending on the uptime(1) of the machine. Stuart also mentioned running rdate(8) at boot before ntpd(8) runs. I appreciate the information. ------- Original Message ------- On Sunday, November 6th, 2022 at 6:33 PM, Stuart Henderson <stu.li...@spacehopper.org> wrote: > On 2022-11-06, indivC ind...@proton.me wrote: > > > I could be wrong, but I believe there's another condition > > that isn't mentioned. > > As far as I can tell, if the clock is behind less than 60 seconds, > > ntpd will not update the clock. > > > Same if the clock is ahead of NTP time. > > You can ensure that the clock is close by running rdate to set > against NTP before ntpd starts > > -- > Please keep replies on the mailing list.