[DNG] ..hillybilly-style time setting, was: ntp setup
On Sun, 20 Jun 2021 13:15:13 -0700, Rick wrote in message <20210620201513.gs12...@linuxmafia.com>: > For those who want to set the time hillybilly-style, i.e., Just Do It ...by e.g. pointing your favorite web browser to https://time.is/ and copy the time error into the middle date command line after the "-s": "date --rfc-3339=ns & --rfc-3339=ns -s '+0.096 seconds' & \ --rfc-3339=ns " ..the first "date" command shows your computer's opinion of the time, the second "date" command forces your opinion, right or wrong, upon it, the third "date" command shows your computer's obedient opinion of the time after a wee little while, aka after a few milliseconds. ..the "--rfc-3339=ns" nicely and verbosely shows you when time keeping is best handed over to ntp, rather than trying to nail it down with https://time.is/ reloads. > and Yes, My System Clock Is Possibly Way Off, ..aye, https://time.is/ will happily tell you "Your time is exact!" anytime you're inside its error margins. ;o) -- ..med vennlig hilsen = with Kind Regards from Arnt Karlsen ...with a number of polar bear hunters in his ancestry... Scenarios always come in sets of three: best case, worst case, and just in case. ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] ntp setup
On Mon 21/Jun/2021 00:52:42 +0200 karl wrote: Rick Moen: ... https://support.ntp.org/bin/view/Dev/DeprecatingNtpdate ... Thanks for the link. And for the heads-up. I've been using ntpdate-debian every 30 minutes for years. After tuning the HW clock, the adjustment is usually less than 20 milliseconds. More than enough for my needs, and preferable to the resources consumed by a full-fledged ntpd. Switching to sntp seems to be an easy task. However, there is no "sntp-debian" available. I could read NTPSERVERS from /etc/default/ntpdate and use them with sntp, or just use pool.ntp.org. (sntp doesn't compare responses, just uses the first it receives.) With respect to ntpdate, sntp has separate options to enable slew or step mode, and max offset for slew. Thus, one can enable slew only and set a reasonable number of milliseconds, so that sntp won't update the system time if it gets an unreasonable response from a runaway remote server. However, the logged line (on user.log) and the exit code don't say whether the system time was changed or not. Perhaps should cron something like so: sntp -M 128 -s pool.ntp.org|\ ( read first_line_not_used read date time utc offset rest case $offset in ([+-]0.00*):;; (*) logger -t sntp -p user.crit "Time offset: $offset";; esac ) Best Ale -- ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] ntp setup
Olaf Meeuwissen via Dng said on Mon, 21 Jun 2021 20:08:49 +0900 >Hi Rick, > >Rick Moen writes: > >> [...] >> >> The only client to point and laugh at is systemd-timesyncd. > >I think it's fair to point out that systemd-timesyncd only promises >Simple NTP (SNTP). How good a job it does of that is another matter >but at least it explains some of the "quirks" you mention below. :-) Which reveals the true intellectual vacuity of the user who accepts systemd. Listen, we're not promising you that your new timekeeping will be as good as your current, and in fact it will be inferior to what you have now, but you should take the new timekeeping. *And they take it!* :-) SteveT Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] ntp setup
Olaf Meeuwissen via Dng said on Mon, 21 Jun 2021 20:04:56 +0900 >If your computer's clock is way out of sync, i.e. more than five >minutes if memory serves me right, ntp will refuse to sync the clock >on the assumption that that time difference is on purpose. You can >easily, and at your own peril, adjust the clock using the `date` >command with a reasonably close time. At your own peril because some >programs don't handle large time jumps very well. My thought on handling that situation is if you have sysvinit, boot to IIRC level 2, which is network and not much else, and manually set the clock and run ntpd for a minute, then reboot to the full system. If you're using runit, you can either use a runlevel, or if you're like me and don't like runlevels with runit, you can just place bash;exit at the beginning of /etc/runit/2 , set the clock and run ntpd, then comment out the bash;exit and reboot. You know what might be cool? If the Poetterists insist on requiring an initramfs, and if the initramfs already runs the network and the DNS, then why not just put the time check and initialization in the initramfs? At least then it would be good for *something*. SteveT Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] ntp setup
Hi Rick, Rick Moen writes: > [...] > > The only client to point and laugh at is systemd-timesyncd. I think it's fair to point out that systemd-timesyncd only promises Simple NTP (SNTP). How good a job it does of that is another matter but at least it explains some of the "quirks" you mention below. > timesyncd does no clock discipline, can't assess the quality of the > remote time source, doesn't trick jitter and delay over time, and has > poor accuracy. It also stupidly does disk I/O every single time it > adjusts the system clock, and doesn't even bother to try adjusting time > gently, never applying the delta gradually. It's the dumb, crude > hillbilly of NTP clients; any of the other four is serviceable, > respectable, capable, and flexible. The systemd team would have been > much better off incorporating ntimed-client, which is under 5k lines of > code and implements a full proper NTP client -- competently. > > But no. They had to do their own, and do a much worse job at gratuitous > cost in time and effort. Hope this helps, -- Olaf Meeuwissen, LPIC-2FSF Associate Member since 2004-01-27 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9 Support Free Softwarehttps://my.fsf.org/donate Join the Free Software Foundation https://my.fsf.org/join ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] ntp setup
Hi, There's been a good deal of good advice already but I just wanted to add my two yen. o1bigtenor via Dng writes: > Greetings > > Noticed that my new Beowulf install time was not accurate. > > Went looking for a tips page and all I could find was information > relating to using systemd and or its tools to do such. I know there is > a way to do this without systemd - - - - - just - - - its been a very > long time since I've done that. > > Please - - - anyone for a short writeup on how to > install/start/whatever else to ntp without using systemd? I used to install ntpdate on my laptops and ntp on my servers. Seeing that ntpdate was deprecated (as per package Description:), I now just install ntp on my laptops as well. If your computer's clock is way out of sync, i.e. more than five minutes if memory serves me right, ntp will refuse to sync the clock on the assumption that that time difference is on purpose. You can easily, and at your own peril, adjust the clock using the `date` command with a reasonably close time. At your own peril because some programs don't handle large time jumps very well. Once ntp is syncing the system clock I haven't noticed any issues with keeping the clock in sync, even on my laptops (booted at least once a week and with a decent hardware clock). The one thing that I had to work around was the corporate proxy not letting traffic through on the NTP port (123) and the corporate DHCP leases not including any NTP server info. I'm using isc-dhcp-client and that automatically reconfigures the NTP daemon if there is a change in NTP server info. That also covers the first time you get a lease. See /etc/dhcp/dhclient-exit-hooks.d/ntp for the gory details. In my case there were no *_ntp_servers in the lease info so I cobbled up a little /etc/dhcp/dhclient-enter-hooks.d/my-domain snippet to set these variables based on the lease's domain. Works like a charm. # Mostly. I seems to have issues on the occasional times when I switch # from wireless to wired on the same domain. Haven't looked into that # yet ... Hope this helps, -- Olaf Meeuwissen, LPIC-2FSF Associate Member since 2004-01-27 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9 Support Free Softwarehttps://my.fsf.org/donate Join the Free Software Foundation https://my.fsf.org/join ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] ..maybe webmin?, was: Cockpit removal might make sense
Hi Simon, Simon Walter writes: > Anyway, I tend to be sympathetic to people like Olaf "A (remote) > command-line suits just fine." It's when you need to delegate > administration of users and permissions to someone who does not know the > CLI. Then you wish for a decent GUI. I'd cluebat those folks about the CLI first ;-) Using adduser/deluser and addgroup/delgroup isn't exactly rocket science :-P If they don't get that, then they probably shouldn't be adminning users and permissions to begin with ... Just my two yen, -- Olaf Meeuwissen, LPIC-2FSF Associate Member since 2004-01-27 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9 Support Free Softwarehttps://my.fsf.org/donate Join the Free Software Foundation https://my.fsf.org/join ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng