Skip to content

Commit cc63f89

Browse files
zhang-ruilenb
authored andcommitted
tools/power turbostat: Improve --help output
Improve the `--help` output of turbostat by standardizing the format and enhancing readability. The following changes are made to ensure consistency and clarity in the help message: 1. Use a consistent pattern for each parameter's help message: - Display the parameter and its input (if any) on the same line, separated by a space. - Provide the detailed description on a separate line. 2. Ensure that the first character of each description is in lower-case. These changes make the help output more uniform and easier to read, helping users quickly understand the available options and their usage. No functional change. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
1 parent 48c62ba commit cc63f89

File tree

1 file changed

+26
-15
lines changed

1 file changed

+26
-15
lines changed

tools/power/x86/turbostat/turbostat.c

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2145,41 +2145,52 @@ void help(void)
21452145
"when COMMAND completes.\n"
21462146
"If no COMMAND is specified, turbostat wakes every 5-seconds\n"
21472147
"to print statistics, until interrupted.\n"
2148-
" -a, --add add a counter\n"
2148+
" -a, --add counter\n"
2149+
" add a counter\n"
21492150
" eg. --add msr0x10,u64,cpu,delta,MY_TSC\n"
21502151
" eg. --add perf/cstate_pkg/c2-residency,package,delta,percent,perfPC2\n"
21512152
" eg. --add pmt,name=XTAL,type=raw,domain=package0,offset=0,lsb=0,msb=63,guid=0x1a067102\n"
2152-
" -c, --cpu cpu-set limit output to summary plus cpu-set:\n"
2153+
" -c, --cpu cpu-set\n"
2154+
" limit output to summary plus cpu-set:\n"
21532155
" {core | package | j,k,l..m,n-p }\n"
2154-
" -d, --debug displays usec, Time_Of_Day_Seconds and more debugging\n"
2156+
" -d, --debug\n"
2157+
" displays usec, Time_Of_Day_Seconds and more debugging\n"
21552158
" debug messages are printed to stderr\n"
2156-
" -D, --Dump displays the raw counter values\n"
2157-
" -e, --enable [all | column]\n"
2159+
" -D, --Dump\n"
2160+
" displays the raw counter values\n"
2161+
" -e, --enable [all | column]\n"
21582162
" shows all or the specified disabled column\n"
2159-
" -H, --hide [column|column,column,...]\n"
2163+
" -H, --hide [column | column,column,...]\n"
21602164
" hide the specified column(s)\n"
21612165
" -i, --interval sec.subsec\n"
2162-
" Override default 5-second measurement interval\n"
2163-
" -J, --Joules displays energy in Joules instead of Watts\n"
2164-
" -l, --list list column headers only\n"
2165-
" -M, --no-msr Disable all uses of the MSR driver\n"
2166-
" -P, --no-perf Disable all uses of the perf API\n"
2166+
" override default 5-second measurement interval\n"
2167+
" -J, --Joules\n"
2168+
" displays energy in Joules instead of Watts\n"
2169+
" -l, --list\n"
2170+
" list column headers only\n"
2171+
" -M, --no-msr\n"
2172+
" disable all uses of the MSR driver\n"
2173+
" -P, --no-perf\n"
2174+
" disable all uses of the perf API\n"
21672175
" -n, --num_iterations num\n"
21682176
" number of the measurement iterations\n"
21692177
" -N, --header_iterations num\n"
21702178
" print header every num iterations\n"
21712179
" -o, --out file\n"
21722180
" create or truncate \"file\" for all output\n"
2173-
" -q, --quiet skip decoding system configuration header\n"
2174-
" -s, --show [column|column,column,...]\n"
2181+
" -q, --quiet\n"
2182+
" skip decoding system configuration header\n"
2183+
" -s, --show [column | column,column,...]\n"
21752184
" show only the specified column(s)\n"
21762185
" -S, --Summary\n"
21772186
" limits output to 1-line system summary per interval\n"
21782187
" -T, --TCC temperature\n"
21792188
" sets the Thermal Control Circuit temperature in\n"
21802189
" degrees Celsius\n"
2181-
" -h, --help print this help message\n"
2182-
" -v, --version print version information\n" "\n" "For more help, run \"man turbostat\"\n");
2190+
" -h, --help\n"
2191+
" print this help message\n"
2192+
" -v, --version\n"
2193+
" print version information\n" "\n" "For more help, run \"man turbostat\"\n");
21832194
}
21842195

21852196
/*

0 commit comments

Comments
 (0)