Hi Stuart,

(i was trying to figure out a way to reply without messing up the line
wraps, so sorry in advance if lines get messed by google)

On Fri, Jun 3, 2022 at 1:08 PM Stuart Henderson
<stu.li...@spacehopper.org> wrote:
>
> On 2022-06-02, Pantelis Roditis <prodi...@echothrust.com> wrote:
> > 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.

Yes, this was the way the process title was constructed for when the
daemon starts without options on rc.conf.local
But its not optimal I admit, tbh I didnt like either of the options.
I was more hoping for a discussion that will lead to a better solution.

>
> $ 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.

Yes, I noticed that as well, and the order is also important as pflogd
will change it.
foo# pflogd -i pflog0 -s 200
foo# ps -axw|grep pflogd
58030 ??  Spc      0:00.00 pflogd: [running] -s 200 -i pflog0 -f
/var/log/pflog (pflogd)

My initial idea for it was that a pid file could resolve this, but as
it was explained to me, it's something we're trying to move away from,
as this will introduce a different set of problems.
So modifying the rc script seemed a better place to start.
However, if the process title is up for discussion I'll take a look
and see if any ideas come up.

Reply via email to