lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 18 Dec 2020 22:25:06 +0900 From: Namhyung Kim <namhyung@...nel.org> To: Jiri Olsa <jolsa@...hat.com> Cc: Alexei Budankov <abudankov@...wei.com>, Jiri Olsa <jolsa@...nel.org>, Arnaldo Carvalho de Melo <acme@...nel.org>, lkml <linux-kernel@...r.kernel.org>, Peter Zijlstra <a.p.zijlstra@...llo.nl>, Ingo Molnar <mingo@...nel.org>, Mark Rutland <mark.rutland@....com>, Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Michael Petlan <mpetlan@...hat.com>, Ian Rogers <irogers@...gle.com>, Stephane Eranian <eranian@...gle.com> Subject: Re: [PATCH 4/8] perf daemon: Add daemon command Hi Jiri, On Wed, Dec 16, 2020 at 4:44 AM Jiri Olsa <jolsa@...hat.com> wrote: > > On Tue, Dec 15, 2020 at 06:40:26PM +0300, Alexei Budankov wrote: > > Hi, > > > > On 12.12.2020 13:43, Jiri Olsa wrote: > > > Adding daemon command that allows to run record sessions > > > on background. Each session represents one perf record > > > process and is configured in config file. > > > > > > Example: > > > > > > # cat config.daemon > > > [daemon] > > > base=/opt/perfdata > > > > It could probably make sense to consider using locations at /var/ > > directory, similar to other already existing daemon processes in > > system so admin and user experience would be easily reusabe for > > performance monitoring daemon (service). > > hm, you can specify any /var path in there if you like, > do you suggest to hardcode it? > > > > > > > > > [session-1] > > > run = -m 10M -e cycles -o /opt/perfdata/1/perf.data --overwrite --switch-output -a > > > > > > [session-2] > > > run = -m 20M -e sched:* -o /opt/perfdata/2/perf.data --overwrite --switch-output -a > > > > > > Default perf config has the same daemon base: > > > > > > # cat ~/.perfconfig > > > [daemon] > > > base=/opt/perfdata > > > > > > Starting the daemon: > > > > > > # perf daemon --config config.daemon > > > > It could make sense to name daemon config file similar to .perfconfig > > e.g. like .perfconfig.daemon. perf daemon command would then assume, by > > default, usage of .perfconfig.daemon config or the one specified on the > > command line via --config option. It also would be helpfull have loaded > > config file path printed into console: > > # perf daemon > > Daemon process <pid> started with config /path/to/.perfconfig.daemon > > 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 As a system daemon, I agree it should follow the standard location for the default base directory and config file. Thanks, Namhyung
Powered by blists - more mailing lists