FreeBSD-10.3 No ntpd.pid file created

Polytropon freebsd at edvax.de
Tue Feb 7 04:53:19 UTC 2017


On Mon, 6 Feb 2017 16:42:22 -0500, James B. Byrne via freebsd-questions wrote:
> I am looking at the process list entries for ntpd on two FreeBSD 10.3
> systems and I see this:
> 
> system 1:
> 
> root                        1187   0.0  0.4  32376 18172  -  Ss   
> 9:42AM   0:02.03 /usr/sbin/ntpd -g -c /etc/ntp.conf
> 
> system 2:
> 
> root        1024    0.0  0.0   26124   18044  -  Ss   21Nov16      
> 3:56.36 /usr/sbin/ntpd -g -c /etc/ntp.conf -p /var/run/ntpd.pid
> 
> Somehow system 1 is starting ntpd without passing the pidfile
> argument.  However, I have diffed the /etc/rc.d/ntpd files from both
> systems against each other and there are no differences.  So, how can
> this be?

Check /etc/rc.conf as well. There is a _flags variable that
can affect ntpd startup. You will also find them in the sourced
file /etc/defaults/rc.conf which might differ as well between
versions:

	ntpd_enable="NO"
	ntpd_program="/usr/sbin/ntpd"
	ntpd_config="/etc/ntp.conf"
	ntpd_sync_on_start="NO" high
	ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift"

In this example (FreeBSD 8), a PID file is explicitely mentioned.
If that default differs (or if it is overwritten in rc.conf), the
creation of a PID file might be omitted.

See "man ntpd" for details.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list