aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2021-04-16 13:23:30 -0400
committerSteven Rostedt (Google) <rostedt@goodmis.org>2022-03-15 12:21:07 -0400
commitcfde37f5bdf90823260960e105a570f2382cba71 (patch)
tree816c497f7789b5815bcec6de9872edf5e342b6d7
parent75bcde2f70b8b5b3f7c46828c0503a9f66c29643 (diff)
downloadtrace-cmd-cfde37f5bdf90823260960e105a570f2382cba71.tar.gz
trace-cmd stat: Update the usage and man pages
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. Link: https://lore.kernel.org/linux-trace-devel/20210416172331.3870833-3-rostedt@goodmis.org Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r--Documentation/trace-cmd/trace-cmd-stat.1.txt12
-rw-r--r--tracecmd/trace-stat.c2
-rw-r--r--tracecmd/trace-usage.c4
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 cb92622a..b4428e49 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 3eb32eba..b5ef7733 100644
--- a/tracecmd/trace-usage.c
+++ b/tracecmd/trace-usage.c
@@ -283,7 +283,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",