From owner-freebsd-questions@freebsd.org Wed Jun 5 21:12:17 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C9F015B93CE for ; Wed, 5 Jun 2019 21:12:17 +0000 (UTC) (envelope-from doug@safeport.com) Received: from cyrus.watson.org (cyrus.watson.org [204.107.128.30]) by mx1.freebsd.org (Postfix) with ESMTP id 41B436D571 for ; Wed, 5 Jun 2019 21:12:16 +0000 (UTC) (envelope-from doug@safeport.com) Received: from fledge.watson.org (fledge.watson.org [198.74.231.63]) by cyrus.watson.org (Postfix) with ESMTPS id 607FC3D9CD; Wed, 5 Jun 2019 21:12:15 +0000 (UTC) Received: from fledge.watson.org (doug@localhost.watson.org [127.0.0.1]) by fledge.watson.org (8.15.2/8.15.2) with ESMTP id x55LCEfk049507; Wed, 5 Jun 2019 17:12:14 -0400 (EDT) (envelope-from doug@safeport.com) Received: from localhost (doug@localhost) by fledge.watson.org (8.15.2/8.15.2/Submit) with ESMTP id x55LCEPJ049504; Wed, 5 Jun 2019 17:12:14 -0400 (EDT) (envelope-from doug@safeport.com) X-Authentication-Warning: fledge.watson.org: doug owned process doing -bs Date: Wed, 5 Jun 2019 17:12:14 -0400 (EDT) From: doug@safeport.com X-X-Sender: doug@fledge.watson.org Reply-To: doug@fledge.watson.org To: "Ronald F. Guilmette" cc: freebsd-questions@freebsd.org Subject: Re: ntpd configutration -- a small suggestion from the peanut gallery In-Reply-To: <51500.1559755693@segfault.tristatelogic.com> Message-ID: References: <51500.1559755693@segfault.tristatelogic.com> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Rspamd-Queue-Id: 41B436D571 X-Spamd-Bar: ++++++ Authentication-Results: mx1.freebsd.org; spf=fail (mx1.freebsd.org: domain of doug@safeport.com does not designate 204.107.128.30 as permitted sender) smtp.mailfrom=doug@safeport.com X-Spamd-Result: default: False [6.47 / 15.00]; ARC_NA(0.00)[]; R_SPF_FAIL(1.00)[-all]; HAS_REPLYTO(0.00)[doug@fledge.watson.org]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.94)[0.945,0]; REPLYTO_DN_EQ_FROM_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; DMARC_NA(0.00)[safeport.com]; NEURAL_SPAM_MEDIUM(1.00)[0.998,0]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[bucksport.safeport.com]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[30.128.107.204.list.dnswl.org : 127.0.10.0]; FROM_NO_DN(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000,0]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11288, ipnet:204.107.128.0/24, country:US]; IP_SCORE(2.53)[ip: (6.74), ipnet: 204.107.128.0/24(3.37), asn: 11288(2.61), country: US(-0.06)] X-Spam: Yes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jun 2019 21:12:17 -0000 On Wed, 5 Jun 2019, Ronald F. Guilmette wrote: > In message , > Matthias Oestreicher wrote: > >> NTP works out of the box, but does not accept big time changes unless you run it with >> the -g option. I think it's not ntp's fault. > > OK. Thanks. It now appears that this was indeed the issue, and I did > need the -g option. The ntpd daemon -was- dying entirely, shortly after > starting up, but now I have run it manually with the -g option and also > with the other options that it normally gets when it has been started > via "/etc/rc.d/ntpd start" and now all seems to be well. > > (Apparently, adding ntpd_sync_on_start="YES" to /etc/rc.conf is the > particular magic that should be used to cause ntpd to always be started > with the -g option, which suits me just fine. I'm not sure why this > isn't used by default, but I guess that some folks are a lot more > worried about their time getting set wrong somehow than I am.) > > Just one more small thing... The man page for ntpd says, very explicitly, > undetr the description of the -g option, that when and if ntpd finds > that the time adjustment needed is too big, it will exit *and* also > write a message (presumably explaining why it did that) to "the system > log". I am assming that for a fresh new system that has not yet been > fiddled too much, that means the message in question... which explains > why ntpd has elected to commit suicide... should appear in the > /var/log/messages file. Certainly I *am* seeing other messages from > ntpd in that file. But I am quite certainly *not* seeing any message > in that file and tagged with the name "ntpd" that mentioned either that > ntpd was electing to commit suicide *or* the reason why it might be > doing so. > > Did I just miss those ntpd death messages somehow? I'm not sure. Somewhere in the ntp docs it says ntpd will not change the time if the offset is too large. On the server where I either connect to a local ntp server or to a set I define, ntpd starts but in affect does nothing. Using the current FreeBSD setup I find that sometimes ntp will not start. For me this generally has meant ntpd got started before DNS got going. At least that's the errors I have in /var/log/messages indicate. You can use ntpq to check the status of things ntp. There are lots of "neat" commands, I just use lpeer. That will give something like: > ntpq ntpq> lpeer remote refid st t when poll reach delay offset jitter ============================================================================== +ntp.wdc1.us.lea 130.133.1.10 2 u 903 1024 377 6.661 2.560 2.170 *ntp.your.org .CDMA. 1 u 131 1024 377 27.607 -1.345 2.149 +103.105.51.156 195.195.221.100 2 u 835 1024 377 67.670 -2.897 1.770 ntpq> If ntp is not running you get something much less informative. As for the time zone setting I have since FreeBSD day 1 (1996) said no to the system install prompt that says "answer no ..." and set the time zone to the physical locale of the server. I sometimes go to the UK, then I use tzsetup to change the time zone to zulu (local time). I've never had any reason to vary this setup.