Re: [PATCH 4/8] perf daemon: Add daemon command

From: Jiri Olsa
Date: Fri Dec 18 2020 - 14:32:46 EST


On Fri, Dec 18, 2020 at 10:25:06PM +0900, Namhyung Kim wrote:

SNIP

> >
> > so the current way is, that following creates daemon:
> >
> > # perf daemon --config <CONFIG>
> >
> > and any other 'non --config' option' is used to 'query/control' daemon:
> >
> > # perf daemon
> > # perf daemon --signal
> > # perf daemon --stop
> > ...
>
> My opinion is that it'd be better having sub-commands for essential
> operations like start, stop. Also daemons tend to have 'status' or
> 'reload' operations too.
>
> # perf daemon start --config ...
> # perf daemon stop

ok, seems better

>
> As a system daemon, I agree it should follow the standard location
> for the default base directory and config file.

currently we have this order:

1. custom perfconfig if specified
2. system perf config /etc/perfconfig if exists
3. $HOME/.perfconfig if exists

I think we should keep that, when there's a perf systemd service config
file for this, it can use --config 'whatever'

jirka