On 2022-06-02, Pantelis Roditis <prodi...@echothrust.com> wrote: > I recently started running multiple pflogd instances and noticed that > /etc/rc.d/pflogd killed/restarted every running instance. > The same happened from newsyslog rotations as well. > > After suggestions by brynet, sthen and ajacoutot (thank you guys) > I updated pexp to use a combination of `[running]` and `daemon_flags` > > pexp="pflogd: \[running\]${daemon_flags:+ ${daemon_flags}}" > > However, the default pflogd does not start with any flags set, so in > order to make this work I had to either set the flags for pflogd > > rcctl set pflogd flags -s 160 -i pflog0 -f /var/log/pflog > > or add something like this to /etc/rc.d/pflogd > >: ${daemon_flags:="-s 160 -i pflog0 -f /var/log/pflog"} > pexp="pflogd: \[running\]${daemon_flags:+ ${daemon_flags}}"
hmm, so it constructs the process title based on the variables which are set, rather than the actual supplied command line. $ rcctl get pflogd flags -s 256 $ pgrep -lf pflog 40896 pflogd: [running] -s 256 -i pflog0 -f /var/log/pflog 46762 pflogd: [priv] That's a bit annoying and will get in the way of fixing this properly. Maybe we need some changes to how pflogd sets the process title as well.