11.0 with base ntpd daily leapfile problem
matthew at FreeBSD.org
Thu Oct 20 14:31:33 UTC 2016
On 2016/10/20 15:18, Ernie Luzar wrote:
> Hello list;
> Every morning the "ps ax" command shows these 2 tasks running.
> They never change or go away until I manually kill it.
> /root >ps ax
> PID TT STAT TIME COMMAND
> 729 - Ss 0:35.63 /usr/sbin/ntpd -g -c /etc/ntp.conf -p
> 28509 - I 0:00.00 /bin/sh /etc/periodic/daily/480.leapfile-ntpd
> 28512 - I 0:00.00 sleep 84627
> This is the text of the script
> /root >cat /etc/periodic/daily/480.leapfile-ntpd
> # $FreeBSD: releng/11.0/etc/periodic/daily/480.leapfile-ntpd 301102
> 2016-06-01 04:37:43Z cy $
> # If there is a global system configuration file, suck it in.
> if [ -r /etc/defaults/periodic.conf ]
> . /etc/defaults/periodic.conf
> case "$daily_ntpd_leapfile_enable" in
> case "$daily_ntpd_avoid_congestion" in
> # Avoid dogpiling
> (sleep $(jot -r 1 0 86400); service ntpd onefetch) &
> service ntpd onefetch
> exit $rc
> I think I need to file a bug report about this.
> What do I have to manually change in the script to fix this problem?
ntpd is the NTP daemon -- it is intended to run continually.
What you're seeing is the way the script is intended to work.
The 'sleep NNNNNN' is a random delay between 0s and 1 day intended to
spread out the load of downloading the leapfile and avoid all those
FreeBSD machines in each timezone around the world hitting the download
site within seconds of each other. If you enable
'daily_ntpd_avoid_congestion' in your periodic.conf (it's enabled by
default) then it may cause your daily period scripts to take hours
longer to complete each day (although most of that time will be taken up
by the process sleeping).
Probably your best approach will be to run 'service ntpd onefetch' by
hand -- once the NTP daemon has a valid leapfile it won't need to
download another one until the expiry date given inside the file.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 972 bytes
Desc: OpenPGP digital signature
More information about the freebsd-questions