* [PATCH] trace-cmd: Document new proxy args for {agent,record}
@ 2022-08-04 17:37 Brian Norris
2022-08-04 17:49 ` Steven Rostedt
2022-08-05 15:47 ` Steven Rostedt
0 siblings, 2 replies; 3+ messages in thread
From: Brian Norris @ 2022-08-04 17:37 UTC (permalink / raw)
To: linux-trace-devel; +Cc: Steven Rostedt, Brian Norris
Largely cribbed off the commit message introducing these:
4f9d216ee312 trace-cmd: Add agent proxy communications between record and agent
Signed-off-by: Brian Norris <briannorris@chromium.org>
---
NB: I may not have all the vsock/VM/proxy lingo quite right, so feel
free to correct!
Documentation/trace-cmd/trace-cmd-agent.1.txt | 5 +++++
Documentation/trace-cmd/trace-cmd-record.1.txt | 6 ++++++
tracecmd/trace-usage.c | 9 +++++++--
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/Documentation/trace-cmd/trace-cmd-agent.1.txt b/Documentation/trace-cmd/trace-cmd-agent.1.txt
index f247d41dcdb8..8c1721d023e6 100644
--- a/Documentation/trace-cmd/trace-cmd-agent.1.txt
+++ b/Documentation/trace-cmd/trace-cmd-agent.1.txt
@@ -32,6 +32,11 @@ OPTIONS
This options causes trace-cmd agent to go into a daemon mode and run in
the background.
+*-P* 'cid'::
+ Allow an agent to also act as a proxy server, where it can be run on a host
+ and connect with a guest. 'cid' is the context ID (see *vsock*(7)) of the
+ client (e.g., guest VM) it will allow to connect.
+
*--verbose*[='level']::
Set the log level. Supported log levels are "none", "critical", "error", "warning",
"info", "debug", "all" or their identifiers "0", "1", "2", "3", "4", "5", "6". Setting the log
diff --git a/Documentation/trace-cmd/trace-cmd-record.1.txt b/Documentation/trace-cmd/trace-cmd-record.1.txt
index af3e776b1dce..b709e483ebe2 100644
--- a/Documentation/trace-cmd/trace-cmd-record.1.txt
+++ b/Documentation/trace-cmd/trace-cmd-record.1.txt
@@ -412,6 +412,12 @@ OPTIONS
'name' - the name of the desired compression algorithms. Available algorithms can be listed with
trace-cmd list -c
+*--proxy* 'vsocket'::
+ Use a vsocket proxy to reach the agent. Acts the same as *-A* (for an
+ agent) but will send the proxy connection to the agent. It is expected to
+ run on a privileged guest that the host is aware of (as denoted by the
+ 'cid' in the *-P* option for the agent).
+
EXAMPLES
--------
diff --git a/tracecmd/trace-usage.c b/tracecmd/trace-usage.c
index f809c1845cfa..42a8e7d1107d 100644
--- a/tracecmd/trace-usage.c
+++ b/tracecmd/trace-usage.c
@@ -19,7 +19,8 @@ static struct usage_help usage_help[] = {
"record a trace into a trace.dat file",
" %s record [-v][-e event [-f filter]][-p plugin][-F][-d][-D][-o file] \\\n"
" [-q][-s usecs][-O option ][-l func][-g func][-n func] \\\n"
- " [-P pid][-N host:port][-t][-r prio][-b size][-B buf][command ...]\n"
+ " [-P pid][-N host:port][-t][-r prio][-b size][-B buf] \\\n"
+ " [--proxy vsock][command ...]\n"
" [-m max][-C clock]\n"
" -e run command with event enabled\n"
" -f filter for previous -e event\n"
@@ -78,6 +79,8 @@ static struct usage_help usage_help[] = {
" none - do not compress the trace file\n"
" name - the name of the desired compression algorithms\n"
" available algorithms can be listed with trace-cmd list -c\n"
+ " --proxy vsocket to reach the agent. Acts the same as -A (for an agent)\n"
+ " but will send the proxy connection to the agent.\n"
},
{
"set",
@@ -331,13 +334,15 @@ static struct usage_help usage_help[] = {
{
"agent",
"listen on a vsocket for trace clients",
- " %s agent -p port[-D]\n"
+ " %s agent -p port[-D][-N][-P cid]\n"
" Creates a vsocket to listen for clients.\n"
" -N Connect to IP via TCP instead of vsockets\n"
" *** Insecure setting, only use on a trusted network ***\n"
" *** Only use if the client is totally trusted. ***\n"
" -p port number to listen on.\n"
" -D run in daemon mode.\n"
+ " -P Also act as a proxy server, with a single client denoted\n"
+ " by a context ID (cid).\n"
" --verbose 'level' Set the desired log level\n"
},
{
--
2.37.1.559.g78731f0fdb-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] trace-cmd: Document new proxy args for {agent,record}
2022-08-04 17:37 [PATCH] trace-cmd: Document new proxy args for {agent,record} Brian Norris
@ 2022-08-04 17:49 ` Steven Rostedt
2022-08-05 15:47 ` Steven Rostedt
1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2022-08-04 17:49 UTC (permalink / raw)
To: Brian Norris; +Cc: linux-trace-devel
On Thu, 4 Aug 2022 10:37:43 -0700
Brian Norris <briannorris@chromium.org> wrote:
> Largely cribbed off the commit message introducing these:
>
> 4f9d216ee312 trace-cmd: Add agent proxy communications between record and agent
>
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> ---
> NB: I may not have all the vsock/VM/proxy lingo quite right, so feel
> free to correct!
Content looks good. I'll fix up the change log though ;-)
Thanks!
-- Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] trace-cmd: Document new proxy args for {agent,record}
2022-08-04 17:37 [PATCH] trace-cmd: Document new proxy args for {agent,record} Brian Norris
2022-08-04 17:49 ` Steven Rostedt
@ 2022-08-05 15:47 ` Steven Rostedt
1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2022-08-05 15:47 UTC (permalink / raw)
To: Brian Norris; +Cc: linux-trace-devel
On Thu, 4 Aug 2022 10:37:43 -0700
Brian Norris <briannorris@chromium.org> wrote:
> Largely cribbed off the commit message introducing these:
>
> 4f9d216ee312 trace-cmd: Add agent proxy communications between record and agent
>
> Signed-off-by: Brian Norris <briannorris@chromium.org>
Applied. Thanks Brian!
-- Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-05 15:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-04 17:37 [PATCH] trace-cmd: Document new proxy args for {agent,record} Brian Norris
2022-08-04 17:49 ` Steven Rostedt
2022-08-05 15:47 ` Steven Rostedt
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).