R. Clayton wrote:
In 3.9 I've modified /etc/ntpd.conf to turn ntpd into a server; now I want to
restart it. After poking around a bit, it seems I either HUP ntpd or kill it
outright; which is recommended? If it's kill it outright, how does it get
restarted?
Neither ntpd(8) or ntpd.conf(5) mentions HUP.
Also, there seems to be two copies running:
$ ps ax | grep [n]tpd
30316 ?? I 0:00.32 ntpd: ntp engine (ntpd)
2983 ?? Is 0:00.01 ntpd: [priv] (ntpd)
$ ps -axul | grep 'nt[p]d'
_ntp 4675 /.../ ntpd: ntp engine 83 27783 0 2 0 poll
root 27783 /.../ ntpd: [priv] (nt 0 1 0 2 0 poll
^------,
One is privileged, the other is not. Notice the PPID -'
Which one(s) get signalled? ntpd.pid doesn't show in either /var/run or
locate.
Either one should do it (AFAICR), but I prefer pkill.
$ pgrep -fl ntpd
27810 ntpd: ntp engine
19615 ntpd: [priv]
$ sudo pkill ntpd
$ pgrep -fl ntpd
$ grep ntpd /etc/rc.conf*
/etc/rc.conf:ntpd_flags=NO # for normal use: ""
/etc/rc.conf.local:ntpd_flags=""
$ sudo ntpd
$ pgrep -fl ntpd
10786 ntpd: ntp engine
3936 ntpd: [priv]
/Alexander