Re: [DNG] ntp setup

2022-01-20 Thread Jim Jackson



On Thu, 20 Jan 2022, Steve Litt wrote:

> Rick Moen said on Tue, 22 Jun 2021 01:51:35 -0700
> 
> >Quoting Olaf Meeuwissen (paddy-h...@member.fsf.org):
> >
> >> 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.  
> 
> [snip]
> 
> >Or, to put it a different way, with several excellent genuine NTP
> >clients to choose among, I deny the existence of a compelling use-case 
> >for any SNTP client, 
> 
> I use openntpd. Is that NTP, or only SNTP? What are some full NTP time
> systems for Linux?

See https://www.pool.ntp.org/en/

> 
> Thanks,
> 
> 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
> 
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2022-01-20 Thread Daniel R. Klein

On 1/20/22 12:30 PM, Steve Litt wrote:


After reading that page and man 5 ntpd.conf, I couldn't find out how to
make sure it does NTP. Is it safe to assume that it does both SNTP and
NTP out of the box, and the user of SNTP in no way compromises its use
of NTP?


As far as my knowledge goes: if you install ntpd and use it it uses ntp 
to talk to the configured servers (or pool-addresses).
sntp is a "smaller" subset of the protocol, normaly used by tools that 
only once query the time and are done with it (like ntpdate).
The ntpd can serve sntp-requests, and that changes nothing about how he 
himself queries for time...

ntpsec may be worth a look too.



Daniel

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2022-01-20 Thread wirelessduck--- via Dng


> On 20 Jan 2022, at 21:58, Steve Litt  wrote:
> 
> Rick Moen said on Tue, 22 Jun 2021 01:51:35 -0700
> 
>> Quoting Olaf Meeuwissen (paddy-h...@member.fsf.org):
>> 
>>> 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.  
> 
> [snip]
> 
>> Or, to put it a different way, with several excellent genuine NTP
>> clients to choose among, I deny the existence of a compelling use-case 
>> for any SNTP client, 
> 
> I use openntpd. Is that NTP, or only SNTP? What are some full NTP time
> systems for Linux?
> 
> Thanks,
> 
> SteveT

I’ve used chrony as a NTP client and server on Devuan for many years.

https://chrony.tuxfamily.org/

There is a comparison to ntpd and openntpd but I’m not sure how up to date it 
is.

https://chrony.tuxfamily.org/comparison.html

-- 
Tom___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2022-01-20 Thread Antony Stone
On Thursday 20 January 2022 at 12:30:20, Steve Litt wrote:

> Antony Stone said on Thu, 20 Jan 2022 12:02:08 +0100
> >On Thursday 20 January 2022 at 11:58:32, Steve Litt wrote:
> >
> > > I use openntpd. Is that NTP, or only SNTP?
> >
> > It's both: https://man.openbsd.org/ntpd
> 
> Thanks Antony,
> 
> After reading that page and man 5 ntpd.conf, I couldn't find out how to
> make sure it does NTP. Is it safe to assume that it does both SNTP and
> NTP out of the box, and the user of SNTP in no way compromises its use
> of NTP?

I'm sorry; I have no idea - I don't use openntpd myself; I use De{bi,vu}an's 
"ntp" package, whose man page refers me to http://support.ntp.org


Antony.

-- 
The truth is rarely pure, and never simple.

 - Oscar Wilde

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2022-01-20 Thread Steve Litt
Antony Stone said on Thu, 20 Jan 2022 12:02:08 +0100

>On Thursday 20 January 2022 at 11:58:32, Steve Litt wrote:
>
>> I use openntpd. Is that NTP, or only SNTP?  
>
>It's both: https://man.openbsd.org/ntpd
>
>
>Antony.

Thanks Antony,

After reading that page and man 5 ntpd.conf, I couldn't find out how to
make sure it does NTP. Is it safe to assume that it does both SNTP and
NTP out of the box, and the user of SNTP in no way compromises its use
of NTP?

Thanks,

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

2022-01-20 Thread Antony Stone
On Thursday 20 January 2022 at 11:58:32, Steve Litt wrote:

> I use openntpd. Is that NTP, or only SNTP?

It's both: https://man.openbsd.org/ntpd


Antony.

-- 
Most people would be a lot less bothered about what other people think of them
if they only realised how seldom they do.

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2022-01-20 Thread Steve Litt
Rick Moen said on Tue, 22 Jun 2021 01:51:35 -0700

>Quoting Olaf Meeuwissen (paddy-h...@member.fsf.org):
>
>> 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.  

[snip]

>Or, to put it a different way, with several excellent genuine NTP
>clients to choose among, I deny the existence of a compelling use-case 
>for any SNTP client, 

I use openntpd. Is that NTP, or only SNTP? What are some full NTP time
systems for Linux?

Thanks,

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

2021-07-10 Thread Hendrik Boom
On Fri, Jul 09, 2021 at 03:47:14AM -0700, spiralofh...@spiralofhope.com wrote:
> On Sun, 20 Jun 2021 13:15:13 -0700
> Rick Moen  wrote:
> 
> > If local time suddenly lurches forward or backward a great distance,
> > already running processes may get very distressed or fall over, log
> > files will become very peculiar, etc.
> 
> I saw a YouTube video that demonstrated how 3D printing produces
> jittery items even with tiny time updates.

Which is why real-tome clock needs to be distinct from time-of-day clock.

-- hendrik

> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2021-07-09 Thread spiralofhope
On Fri, 9 Jul 2021 13:10:24 -0400
Steve Litt  wrote:

> spiralofh...@spiralofhope.com said on Fri, 9 Jul 2021 03:47:14 -0700
> 
>  [...]  
> >> If local time suddenly lurches forward or backward a great
> >> distance, already running processes may get very distressed or
> >> fall over, log files will become very peculiar, etc.
> >
> >I saw a YouTube video that demonstrated how 3D printing produces
> >jittery items even with tiny time updates.  
> 
> Define "tiny".

As I recall it was occasional fractions of a second.

I went looking for the video in question, but it's not my field and
it's been long enough that I can't think of the right keywords to search
with or recall the distribution or other technical details.


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2021-07-09 Thread Steve Litt
spiralofh...@spiralofhope.com said on Fri, 9 Jul 2021 03:47:14 -0700

>On Sun, 20 Jun 2021 13:15:13 -0700
>Rick Moen  wrote:
>
>> If local time suddenly lurches forward or backward a great distance,
>> already running processes may get very distressed or fall over, log
>> files will become very peculiar, etc.  
>
>I saw a YouTube video that demonstrated how 3D printing produces
>jittery items even with tiny time updates.

Define "tiny".

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

2021-07-09 Thread spiralofhope
On Sun, 20 Jun 2021 13:15:13 -0700
Rick Moen  wrote:

> If local time suddenly lurches forward or backward a great distance,
> already running processes may get very distressed or fall over, log
> files will become very peculiar, etc.

I saw a YouTube video that demonstrated how 3D printing produces
jittery items even with tiny time updates.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2021-06-26 Thread Olaf Meeuwissen via Dng
Hi Rick,

Rick Moen writes:

> Quoting Olaf Meeuwissen (paddy-h...@member.fsf.org):
>
>> 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.
>
> Put that way, fair point.  _But_, the larger context is that a
> systematically better job of time sync, using better code and also (in
> the case of ntimed-client), _smaller_ code, can be performed instead,
> gaining all the advantages of a real NTP client.

I had no issues with the larger context so refrained from commenting on
that.

> Or, to put it a different way, with several excellent genuine NTP
> clients to choose among, I deny the existence of a compelling use-case
> for any SNTP client, let alone one that's more than a little slipshod.
> (systemd-timed's security history, which I didn't get into, is less than
> reassuring.)

Fully agree.  When I looked into timing issues on a Debian server I
still maintain, I noticed that systemd-timesyncd only promised SNTP and
when I read up on that wondered why anyone in their sane mind would want
to use that instead of NTP.

> The SNTP protocol is what Windows users settle for, because that's what
> they're offered by defaul, and mostly they don't know that they're
> missing out.  On Linux, we don't need to settle.

We definitely don't and the large collection of alternatives, in terms
of distributions as well as programs, attests to that :-)

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

2021-06-22 Thread Rick Moen
Quoting Olaf Meeuwissen (paddy-h...@member.fsf.org):

> 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.

Put that way, fair point.  _But_, the larger context is that a
systematically better job of time sync, using better code and also (in
the case of ntimed-client), _smaller_ code, can be performed instead,
gaining all the advantages of a real NTP client.

Or, to put it a different way, with several excellent genuine NTP
clients to choose among, I deny the existence of a compelling use-case 
for any SNTP client, let alone one that's more than a little slipshod.
(systemd-timed's security history, which I didn't get into, is less than
reassuring.)

The SNTP protocol is what Windows users settle for, because that's what
they're offered by defaul, and mostly they don't know that they're
missing out.  On Linux, we don't need to settle.

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2021-06-21 Thread Alessandro Vesely via Dng

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

2021-06-21 Thread Steve Litt
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

2021-06-21 Thread Steve Litt
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

2021-06-21 Thread Olaf Meeuwissen via Dng
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

2021-06-21 Thread Olaf Meeuwissen via Dng
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] ntp setup

2021-06-20 Thread Steve Litt
Rick Moen said on Sun, 20 Jun 2021 13:15:13 -0700


># ntpd -gqc /dev/null server1.name.net server2.name.org
>server3.name.com
>
>Above will always work, provided system clock is within about 68 years
>of current time.
>
>Do _not_ use ntpdate any more.  It doesn't work well.
>https://support.ntp.org/bin/view/Dev/DeprecatingNtpdate

Ugh!

My computer doesn't have sntp, nor does it have ntp-wait. My openntpd
doesn't have a -q. Meanwhile, the documentation you referenced says the
date should be set very well as early as possible and those requiring
an exact date delayed as late as possible. But that's still a race
condition. I could do the following as soon as the network and DNS are
running:

rm /tmp/ntpd.pid
openntpd -p /tmp/ntpd.pid -s

The preceding would block until hopefully the time is well set, adding
several seconds to the boot, which does no harm except it gives the
systemd fanboiz another silly marketing point. But if it failed to get
the time "well set", there's no way of knowing it.

It would be nice to put the openntpd run in a loop that tests for "well
set" time and quits when the time is well set. As it loops, it gives
the user the choice of ignore or abort or go into some sort of
diagnostic session. This implies that /dev/console would already have
to be running.

Dynasties later, when the boot runs the runit process manager, the
process manager for openntpd can kill the process identified with
/tmp/ntpd.pid, and restart ntpd as a supervised daemon.

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

2021-06-20 Thread karl
Rick Moen:
...
> https://support.ntp.org/bin/view/Dev/DeprecatingNtpdate
...

Thanks for the link.
/Karl Hammar

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2021-06-20 Thread Rick Moen
Quoting Simon Hobson (li...@thehobsons.co.uk):

> From memory, ntp does have problems with clocks that are a long way
> out of sync - or has that been fixed ? 

The NTP protocol _inherently_ has problems with system clocks that are a
long way out of sync -- in the sense that, yes, you can easily force an
NTP client (_any_ NTP client) to programmatically wrench local time,
correcting a huge time skew to force it into compliance with a remote
time source, but is that really a good idea?  Especially automatically?

If local time suddenly lurches forward or backward a great distance,
already running processes may get very distressed or fall over, log
files will become very peculiar, etc.  For those and similar reasons, 
big yanks of time skew correction, albeit perfectly feasible with 
standard tools, tends not to be done automatically (on a theory that
maybe you ought to fix your system clock problem rather than papering it
over with NTP).

I note the following options to /usr/bin/ntpd (from the reference
ntp.org implementation) to perform such indelicate yanking where and if
desired:

   -g Normally,  ntpd  exits with a message to the system log if the
  offset exceeds  the  panic  threshold,  which  is  1000  s  by
  default.   This  option allows the time to be set to any value
  without restriction; however, this can happen only  once.   If
  the  threshold  is  exceeded after that, ntpd will exit with a
  message to the system log.  This option can be used  with  the
  -q and -x options.

   -q Exit  the  ntpd  just  after  the first time the clock is set.
  This behavior mimics that of the ntpdate program, which is  to
  be  retired.   The  -g  and  -x  options can be used with this
  option.  Note: The kernel time  discipline  is  disabled  with
  this option.

   -x Normally,  the  time  is slewed if the offset is less than the
  step threshold, which is 128 ms by  default,  and  stepped  if
  above the threshold.  This option sets the threshold to 600 s,
  which is well within the accuracy window to set the clock man-
  ually.   Note:  Since the slew rate of typical Unix kernels is
  limited to 0.5 ms/s, each second  of  adjustment  requires  an
  amortization  interval of 2000 s.  Thus, an adjustment as much
  as 600 s will take almost 14 days to  complete.   This  option
  can be used with the -g and -q options.  Note: The kernel time
  discipline is disabled with this option.

Regulating time using NTP is one of those things that is normally 
very simple and Just Works[tm], except in lots of fiddly corner 
cases when it isn't.  The simple, Just Works[tm] default configuration 
works almost everywhere, all the time.  The complex non-default options
and tweaks are for all of those corner cases and unusual needs.


Note:  There's certainly nothing wrong with chrony, nor with OpenNTPd,
nor ntimed-client, but none of them is a magic bullet that makes
everything right and simple.  

The only client to point and laugh at is systemd-timesyncd.  

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.


I can't yet recommend Poul-Henning Kamp's ntimed-client as a simple, tiny
NTP client solution for Devuan/Debian desktop users, but only because
it's not available packaged, and because it is technically still beta.
So one of the other three is (for now) a more natural go-to choice.  If
interested in this (very) obscure topic, his blog entries about progress
on the project make interesting reading:  http://phk.freebsd.dk/time/

When finished, it will become a subproject of the reference ntp.org
implementation (not a competing, separate ntp client).


For those who want to set the time hillybilly-style, i.e., Just Do It
and Yes, My System Clock Is Possibly Way Off, and use the reference
ntp.org software:

# ntpd -gqc /dev/null server1.name.net server2.name.org server3.name.com

Above will always work, provided system clock is within about 68 years
of current time.

Do _not_ use ntpdate any more.  It doesn't work well.
https://support.ntp.org/bin/view/Dev/DeprecatingNtpdate

-- 
Cheers, 

Re: [DNG] ntp setup

2021-06-20 Thread Simon Hobson
k...@aspodata.se wrote:

>> npt only synchronizes only on machine starts.
> 
> That is wrong, I guess you are thinking about initial sync.
> 
> You can do initial syncronisation with e.g. ntpdate, but ntpd can do
> that also, but can take more time before it decides to jump the clock
> if it differ too much.
> 
> Then ntpd, while running, will at some regular interval,
> syncronize the clock. Run ntpq -p to see the polling interval.
> 
> The ntp.conf file installed with devuan is perfectly fine for
> a newbies always-connected system. If your box only has intermittent 
> connection to the internet, ntpd might not be what you need.
> You might then be better served by chrony or something else.

For clarification ...

From memory, ntp does have problems with clocks that are a long way out of sync 
- or has that been fixed ? I suspect that was part of the reason for running 
ntpdate on startup. As I'm normally working with systems that a) are always on, 
and b) have working hardware clocks with batteries, this hasn't been a problem 
for me so I haven't followed developments.

By default, ntpd will start with a polling interval of 64 seconds, and over 
time will increase this up to 1024s (17 minutes). If you specify an iburst 
value for a peer in the config file, then it will poll several times in a short 
space of time during startup - shortening it's sync time.

As above, ntpq -p will list the currently configured peers and their status. 
After a while, one will be listed with "*" before it's entry - this is peer it 
currently considers the primary and which it will sync the clock. Others marked 
with "+" are candidate to be the primary.

My configured servers are :
server ntp.plus.net
server ntp2b.mcc.ac.uk
server ntp2c.mcc.ac.uk
server ntp.cis.strath.ac.uk
server ntp.ox.ac.uk

$ ntpq -p
 remote   refid  st t when poll reach   delay   offset  jitter
==
-cdns01.plus.net 195.66.241.3 2 u  396 1024  377   30.702   -0.750   0.322
*frome.mc.man.ac 193.62.22.66 2 u  452 1024  377   39.6840.277   0.231
+utserv.mcc.ac.u 193.62.22.66 2 u  317 1024  377   39.488   -0.010   0.382
+ntp0.cis.strath 193.62.22.74 2 u  630 1024  377   42.8580.002   0.672
 ntp0.ox.ac.uk   .STEP.  16 u- 102400.0000.000   0.000

Taking the second line from this, it says my local daemon is synced to 
frome.mc.man.ac[.uk] (ntp2b.mcc.ac.uk is an alias to frome) which in turn is 
synced to 193.62.22.66. Frome is a stratum 2 server, it was last polled 452 
seconds ago, the polling interval is now 1024s and it responded for each of the 
last 8 polls (377 in octal is  , if any poll fails, then the reach 
column will indicate this with a 0 for each poll that failed). The round trip 
time for the poll was a little under 40 ms, the local clock is offset by .27ms, 
and the jitter (variation in round trip time and time offset between polls) is 
0.23ms.
I'm assuming ntpd has selected this peer because it has the lowest jitter. If 
there were peers with different stratums, then ntpd will favour the higher 
stratum ones - stratum is basically how many hops from a "high quality" time 
source (such as the atomic clocks run by the likes of NPL).

ntp0.ox.ac.uk has never responded (must get round to removing that some time), 
and I think cdns01.plus.net (ntp.plus.net) has been discounted as a candidate 
for primary peer because it's clock disagrees with the rest.

On another system I see :
$ ntpq -p
 remote   refid  st t when poll reach   delay   offset  jitter
==
*patsy.thehobson 130.88.203.133 u  423 1024  3771.079   -0.125   0.237

showing that the ntp daemon running on patsy is stratum 3 because it's synced 
to a stratum 2 peer.


As said, just installed the ntp package should give you a working time sync - 
using four servers from the ntp.org pool. If your clock is not syncing, then 
the first debugging tool is ntpq -p and see what is going on.


As an aside, you may find this interesting to see how some miscreants are (or 
were, it was written 5 years ago) using the Debian pool to find devices to port 
scan.
http://netpatterns.blogspot.com/2016/01/the-rising-sophistication-of-network.html

Simon

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2021-06-20 Thread Marjorie Roome via Dng
On Sat, 2021-06-19 at 09:31 -0500, o1bigtenor via Dng wrote:

> 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 would recommend chrony as a lighter and more accurate and flexible
alternative to ntpd.

Information about chrony at https://chrony.tuxfamily.org/index.html. 
I find no references to systemd. Work fine with sysvinit.

just (sudo) apt install chrony 

It works well even if your connection to the internet is intermittent
because you regularly turn off or sleep/hibernate your desktop/laptop.

-- 
Marjorie








___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2021-06-19 Thread Bob Proulx via Dng
o1bigtenor via Dng wrote:
> Please  - - - anyone for a short writeup on how to
> install/start/whatever else to ntp without using systemd?

A full HOWTO page on what to do to fix this easily for your system is
this one line.

apt-get install ntp

Then best thing to do is to reboot so that everything can get started
off fresh with the correct time.

That's it.  That is the entirety of what is needed in a HOWTO
document.  Nothing more is needed.  The default configuration will
start automatically in Beowulf.  The default configuration will use
the standard pool of Internet time servers.  That's it.  Done.

Some special case situations though.  Raspberry Pi and other machines
without a battery backed up real time clock.  Machines forcing DNSSEC
at boot time without a real time hardware clock.  But people running
on those systems should already know they are running on those types
of systems and do the right handling of the issues there.

Bob


signature.asc
Description: PGP signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2021-06-19 Thread terryc
On Sat, 19 Jun 2021 12:18:32 -0500
o1bigtenor via Dng  wrote:

> What none of the articles mentioned was on how to synchronize system
> time with npt. I had already installed npt it was the synchronizing
> that I wasn't remembering and there was no mention of how to for
> anything but systemd linked resources. It got it linked but likely
> used a technique far too close to that of a 20# sledge hammer.

For what it is worth, my old way was to have a /etc/init.d/ntpdate("?)
script that synce (set the hardware to an authorative server
elsewhere), then called ntp(?) to do the ongoing update.

The rationale was that ntp would barf would either barf or not correct
a way out of sync time cloak. 

I suspect stuff has changed from when I was doing that.

> 
> Given that Devuan is about the 'not' use of systemd it would seem
> sorta normal to have a how-to for a newbie - - - - - and I couldn't
> find anything that wasn't using systemd except for npt and then npt
> only synchronizes only on machine starts.

There seems to be an attitude by some people that Devuan is not for
newbies. Shrug, their loss. However, such is the fact that hands on
keyboards supporting the project are rather limited.

My 2c is that it would help if that project ( local web portal) that
collected list mails and allowed searching was revived. It died shortly
after bots for grabbing email mail addresses started to become common.


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2021-06-19 Thread Steve Litt
o1bigtenor via Dng said on Sat, 19 Jun 2021 09:31:23 -0500

>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?

Hi o1bigtenor,

I can speak for openntpd, because I use it with runit.

My runit system runs openntpd as follows:

exec openntpd -d ${OPTS:=-s} 2>&1

If you were going to run it on a terminal as root, the preceding would
simplify down to the following:

openntpd -d -s

In the preceding, -d means do not daemonize yourself (don't put
yourself in background, but instead run in foreground), and -s means
try to set the time immediately at startup.

As a first step, you can run the preceding command on a terminal
manually, and make sure everything's cool.

If you want to run it from sysvinit, I'm pretty sure you need to remove
the -d, because sysvinit expects daemons to put themselves in the
background (which is inferior). I don't know what you'd do about
logging in sysvinit, but I don't see a big need for logging a time
daemon anyway.

So you'd make an init script with the five verbs, what are they, start,
stop, restart, and two others, have each verb be a shellscript
function, have restart be stop;start, and don't worry about all the
nasty complications sysvinit init scripts throw in to accommodate
corner cases in the corners of corners. It should probably be about 30
lines at most.

As an alternative, you could start Runit's runsvdir in /etc/inittab,
and have runit supervise openntpd. Once you do that, you can do it for
lots of other services. In my opinion, runit is superior to sysvinit,
just like sysvinit is superior to systemd. And using sysvinit as PID1
and using runsvdir as your process supervisor is a VERY good way to do
things, I did it for years except I used daemontools instead of runit.
By the way, if you're interested in s6, you could substitute s6 for
runit.

Bottom line, openntpd has absolutely no dependency or interaction with
PID1 or anything systemd, at least not that I can see. So your wish
should be trivial to fulfill.

HTH,

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

2021-06-19 Thread Patrick Bartek via Dng
On Sat, 19 Jun 2021 09:31:23 -0500
o1bigtenor via Dng  wrote:

> 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?

apt install ntp-doc

Then load in your browser

file:///usr/share/doc/ntp-doc/html/quick.html

That should get you started.

B
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2021-06-19 Thread karl
o1bigtenor:

> Given that Devuan is about the 'not' use of systemd it would seem sorta
> normal to have a how-to for a newbie

I don't follow the logic in that.
Are you saying that thoose who don't use systemd needs newbie 
documentation ?

> - - - - - and I couldn't find anything
> that wasn't using systemd except for npt and then

Look in:
 /var/lib/dpkg/info/ntp.list
and you'll find that both man pages and html pages are provided.

If that doesn't help you, go to
 http://www.ntp.org/
and click on the Documentation link.

If that doesn't help you, ask about the specific problem you have.

> npt only synchronizes only on machine starts.

That is wrong, I guess you are thinking about initial sync.

You can do initial syncronisation with e.g. ntpdate, but ntpd can do
that also, but can take more time before it decides to jump the clock
if it differ too much.

Then ntpd, while running, will at some regular interval,
syncronize the clock. Run ntpq -p to see the polling interval.

The ntp.conf file installed with devuan is perfectly fine for
a newbies always-connected system. If your box only has intermittent 
connection to the internet, ntpd might not be what you need.
You might then be better served by chrony or something else.

Regards,
/Karl Hammar


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2021-06-19 Thread o1bigtenor via Dng
On Sat, Jun 19, 2021 at 9:36 AM R. G. Sidler via Dng  wrote:
>
>
> Am 19.06.21 um 16:33 schrieb R. G. Sidler via Dng:
> > Am 19.06.21 um 16:31 schrieb o1bigtenor via Dng:
> >> 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?
> >>

> >
> > this might be helpful:
> > "https://www.maketecheasier.com/sync-linux-time-with-ntp-server/;
> >
> > Have fun and success
> >
> > Roland
>
>
> Sorry, I forgot - there is a part especially for systems without systemd
> in the lower part of the article ...
>

What none of the articles mentioned was on how to synchronize system
time with npt. I had already installed npt it was the synchronizing that
I wasn't remembering and there was no mention of how to for anything
but systemd linked resources. It got it linked but likely used a technique
far too close to that of a 20# sledge hammer.

Given that Devuan is about the 'not' use of systemd it would seem sorta
normal to have a how-to for a newbie - - - - - and I couldn't find anything
that wasn't using systemd except for npt and then npt only synchronizes
only on machine starts.

Thanks guys
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2021-06-19 Thread tito via Dng
On Sat, 19 Jun 2021 09:31:23 -0500
o1bigtenor via Dng  wrote:

> 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?
> 
> TIA

Hi,

apt install ntp

or

apt install chrony

or

 apt install openntpd

or

apt install ntpdate   (deprecated)

or

apt install ntpsec-ntpdate (more secure replacement for ntpdate)

Ciao,
Tito
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2021-06-19 Thread R. G. Sidler via Dng


Am 19.06.21 um 16:33 schrieb R. G. Sidler via Dng:

Am 19.06.21 um 16:31 schrieb o1bigtenor via Dng:

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?

TIA
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng



Hi there,

this might be helpful: 
"https://www.maketecheasier.com/sync-linux-time-with-ntp-server/;


Have fun and success

Roland



Sorry, I forgot - there is a part especially for systems without systemd 
in the lower part of the article ...




___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2021-06-19 Thread Antony Stone
On Saturday 19 June 2021 at 16:31:23, o1bigtenor via Dng wrote:

> Please  - - - anyone for a short writeup on how to
> install/start/whatever else to ntp without using systemd?

Personally I use "aptitude install ntp".

Antony.

-- 
Some things the German language doesn't easily distinguish between:
 - slugs and snails
 - cucumbers and gherkins
 - snakes and queues
 - wearing something, or carrying it
 - mothers and nuts
 - driving a car, riding a bicycle, or travelling by train
 - a man and a husband
 - a woman and a wife
 - changing clothes and moving house
 - pockets and bags

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] ntp setup

2021-06-19 Thread R. G. Sidler via Dng

Am 19.06.21 um 16:31 schrieb o1bigtenor via Dng:

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?

TIA
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng



Hi there,

this might be helpful: 
"https://www.maketecheasier.com/sync-linux-time-with-ntp-server/;


Have fun and success

Roland

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] ntp setup

2021-06-19 Thread o1bigtenor via Dng
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?

TIA
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng