From: Stephen Hemminger <stephen@networkplumber.org>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: dev@dpdk.org
Subject: Re: [RFC] Dynamic log/trace control via telemetry
Date: Tue, 16 Aug 2022 19:08:37 -0700 [thread overview]
Message-ID: <20220816190837.40c557bb@hermes.local> (raw)
In-Reply-To: <20220816021738.5498f802@sovereign>
On Tue, 16 Aug 2022 02:17:38 +0300
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
> When debugging a live app, useful info can be obtained from logs or traces
> that were not enabled when it was started and it is undesirable to restart.
> Furthermore, unless the app authors have considered tracing,
> rte_trace_save() is only called on exit, i.e. a shutdown is required again.
>
> What if the telemetry socket gave the missing control?
> For example:
>
> --> /eal/log/set_level,debug
> {"/eal/log/set_level": {"status": "success"}}
> --> /eal/log/set_level,pmd.net.*:debug
> {"/eal/log/set_level": {"status": "success"}}
> --> /eal/log/set_level,lib.[a-d],debug
> {"/eal/log/set_level": {"status": "success"}}
> --> /eal/log/set_level,foobar
> {"/eal/log/set_level": {"status": "fail", "message": "Invalid log level: foobar"}}
>
> Tracing is more complicated because it requires resource allocation.
> It could be:
>
> /eal/trace/set_mode,discard
> /eal/trace/set_mode,overwrite
> rte_trace_mode_set()
>
> /eal/trace/enable_pattern,<pattern>
> /eal/trace/enable_regex,<regex>
> /eal/trace/disable_pattern,<pattern>
> /eal/trace/disable_regex,<regex>
> rte_trace_enable_pattern()
> rte_trace_enable_regex()
>
> /eal/trace/rearm
> Clear the trace buffer.
> Apply the new settings accumulated by the previous commands.
>
> /eal/trace/save
> rte_trace_save()
>
> An open question is how to deal with multi-process.
> Only the primary process listens to the telemetry socket.
> Log and trace settings are not shared between processes.
> OTOH, when enabling some log source, it is desirable to do in all processes.
>
> In general, telemetry is not for changing the state of the app,
> but logs and traces are diagnostic information that seems to be in-scope.
> A similar suggestion was not opposed recently:
>
> http://inbox.dpdk.org/dev/24c49429394294cfbf0d9c506b205029bac77c8b.1657890378.git.anatoly.burakov@intel.com/
Not sure if turning telemetry into a do all control api makes sense.
This seems like a different API.
Also, the default would have to be disabled for application safety reasons.
next prev parent reply other threads:[~2022-08-17 2:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 23:17 Dmitry Kozlyuk
2022-08-17 1:25 ` fengchengwen
2022-08-17 2:08 ` Stephen Hemminger [this message]
2022-08-17 15:15 ` Dmitry Kozlyuk
2022-08-17 15:34 ` Stephen Hemminger
2022-08-17 15:34 ` Morten Brørup
2022-08-20 15:19 ` Dmitry Kozlyuk
2022-08-22 6:47 ` Morten Brørup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220816190837.40c557bb@hermes.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).