linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: <linux-trace-devel@vger.kernel.org>
Cc: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Subject: [PATCH 2/3] trace-cmd stat: Update the usage and man pages
Date: Fri, 16 Apr 2021 13:23:30 -0400	[thread overview]
Message-ID: <20210416172331.3870833-3-rostedt@goodmis.org> (raw)
In-Reply-To: <20210416172331.3870833-1-rostedt@goodmis.org>

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

trace-cmd stat takes some options (-B and -t, as well as -h), but the
usage and the man pages do not display them.

Also, since 'h' was not included in the getopt(), it failed to be called.
Fix that.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 Documentation/trace-cmd/trace-cmd-stat.1.txt | 12 +++++++++++-
 tracecmd/trace-stat.c                        |  2 +-
 tracecmd/trace-usage.c                       |  4 +++-
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/Documentation/trace-cmd/trace-cmd-stat.1.txt b/Documentation/trace-cmd/trace-cmd-stat.1.txt
index e5fccce9..1be9e609 100644
--- a/Documentation/trace-cmd/trace-cmd-stat.1.txt
+++ b/Documentation/trace-cmd/trace-cmd-stat.1.txt
@@ -7,7 +7,7 @@ trace-cmd-stat - show the status of the tracing (ftrace) system
 
 SYNOPSIS
 --------
-*trace-cmd stat*
+*trace-cmd stat* ['OPTIONS']
 
 DESCRIPTION
 -----------
@@ -45,6 +45,16 @@ system. The status that it shows is:
 
 *Error log:* Dump the content of ftrace error_log file.
 
+OPTIONS
+-------
+*-B* 'buffer-name'::
+    Display the status of a given buffer instance. May be specified more than once
+    to display the status of multiple instances.
+
+*-t*::
+    If *-B* is also specified, show the status of the top level tracing directory
+    as well as the instance(s).
+
 SEE ALSO
 --------
 trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1),
diff --git a/tracecmd/trace-stat.c b/tracecmd/trace-stat.c
index 31127872..e640a9e5 100644
--- a/tracecmd/trace-stat.c
+++ b/tracecmd/trace-stat.c
@@ -875,7 +875,7 @@ void trace_stat (int argc, char **argv)
 	init_top_instance();
 
 	for (;;) {
-		c = getopt(argc-1, argv+1, "tB:");
+		c = getopt(argc-1, argv+1, "htB:");
 		if (c == -1)
 			break;
 		switch (c) {
diff --git a/tracecmd/trace-usage.c b/tracecmd/trace-usage.c
index 98247074..094c6397 100644
--- a/tracecmd/trace-usage.c
+++ b/tracecmd/trace-usage.c
@@ -258,7 +258,9 @@ static struct usage_help usage_help[] = {
 	{
 		"stat",
 		"show the status of the running tracing (ftrace) system",
-		" %s stat"
+		" %s stat [-B buf][-t]"
+		"          -B show the status of a instance buffer\n"
+		"          -t show the top level status along with buffer specified by -B\n"
 	},
 	{
 		"split",
-- 
2.29.2


  parent reply	other threads:[~2021-04-16 17:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16 17:23 [PATCH 0/2] trace-cmd: Add more ways to view options Steven Rostedt
2021-04-16 17:23 ` [PATCH 1/3] trace-cmd list: Have -o read the options directory instead of file Steven Rostedt
2021-04-19  4:50   ` Tzvetomir Stoyanov
2021-04-19 12:16     ` Steven Rostedt
2021-04-16 17:23 ` Steven Rostedt [this message]
2021-04-16 17:23 ` [PATCH 3/3] trace-cmd stat: Add -o option to show options Steven Rostedt

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=20210416172331.3870833-3-rostedt@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    /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).