Skip to content

Commit d6b2ed9

Browse files
authored
Clarify what tool-specific options are (#3444) (#3462)
Fixes #3443 Modify the help message of base-tool (and everybody who is symlinked to it) to clarify the tool-specific options that may be specified when registering a tool (on the RHS of `--` in the invocation of `pbench-register-tool`). PBENCH-1173
1 parent 7d5defa commit d6b2ed9

File tree

42 files changed

+130
-232
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+130
-232
lines changed

agent/tool-scripts/base-tool

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -190,24 +190,29 @@ vmstat)
190190
esac
191191

192192
function usage {
193-
printf -- "The following options are available:\n\n"
194-
printf -- "\t--install verify this perf tool will work\n\n"
195-
printf -- "\t--start|stop|postprocess start/stop/postprocess the data collection\n"
196-
printf -- "\t-d str|--dir=str directory to store data collection (required)\n"
193+
printf -- "\t-h|--help display this help message and exit\n\n"
194+
195+
printf -- "\nTool-specific options - these may be specified when you register a tool:\n\n"
196+
197197
case "${tool}" in
198-
blktrace|bpftrace|kvmtrace|lockstat|oc|perf|strace|systemtap|tcpdump)
199-
: # These tools don't use interval
198+
lockstat)
199+
: # Tools that don't take *any* tool-specific options
200+
printf -- "\tNo tool-specific options for this tool\n"
201+
;;
202+
blktrace|bpftrace|kvmtrace|oc|perf|strace|systemtap|tcpdump)
203+
: # Tools that don't use '--interval' but take other tool-specific options
200204
;;
201205
*)
202206
printf -- "\t--interval=int number of seconds between each data collection (optional, default is %s seconds)\n" "${def_interval}"
203207
;;
204208
esac
209+
205210
case "${tool}" in
206211
blktrace)
207-
printf -- "\t--devices=str,[str] the list of block devices to trace (required w/ --start)\n"
212+
printf -- "\t--devices=str,[str] the list of block devices to trace (required)\n"
208213
;;
209214
bpftrace)
210-
printf -- "\t--script=str path to the bpftrace script (required w/ --start)\n"
215+
printf -- "\t--script=str path to the bpftrace script (required)\n"
211216
;;
212217
haproxy-ocp)
213218
printf -- "\t--counters-clear-all clear all HAProxy counters at tool start (optional, default: '%s')\n" "${def_counters_clear_all}"
@@ -278,7 +283,6 @@ function usage {
278283
printf -- "\t but not both at the same time\n"
279284
;;
280285
esac
281-
printf -- "\n\t-h|--help display this help message\n"
282286
}
283287

284288
# Process options and arguments
@@ -582,7 +586,7 @@ install)
582586
local _installed_rpm
583587
local _rc
584588
_installed_rpm="$(require-rpm "${_tpn}" "${_tpv}")"
585-
_rc=${?}
589+
_rc=${?}
586590
if [[ ${_rc} != 0 ]]; then
587591
printf -- "%s: %s is not installed\n" "${tool}" "${_tpn}${_tpv:+-${_tpv}}" >&2
588592
else
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
blktrace: Error, one of the following options is required, --install|--start|--stop|--postprocess
22

3-
The following options are available:
3+
-h|--help display this help message and exit
44

5-
--install verify this perf tool will work
65

7-
--start|stop|postprocess start/stop/postprocess the data collection
8-
-d str|--dir=str directory to store data collection (required)
9-
--devices=str,[str] the list of block devices to trace (required w/ --start)
6+
Tool-specific options - these may be specified when you register a tool:
107

11-
-h|--help display this help message
8+
--devices=str,[str] the list of block devices to trace (required)
129
blktrace: WARNING - postprocess - tool output directory, '/var/tmp/pbench-test-tool-scripts/blktrace/tools-group/blktrace', missing
1310
blktrace: WARNING - stop - tool output directory, '/var/tmp/pbench-test-tool-scripts/blktrace/tools-group/blktrace', missing
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
bpftrace: Error, one of the following options is required, --install|--start|--stop|--postprocess
22

3-
The following options are available:
3+
-h|--help display this help message and exit
44

5-
--install verify this perf tool will work
65

7-
--start|stop|postprocess start/stop/postprocess the data collection
8-
-d str|--dir=str directory to store data collection (required)
9-
--script=str path to the bpftrace script (required w/ --start)
6+
Tool-specific options - these may be specified when you register a tool:
107

11-
-h|--help display this help message
8+
--script=str path to the bpftrace script (required)
129
bpftrace: WARNING - postprocess - tool output directory, '/var/tmp/pbench-test-tool-scripts/bpftrace/tools-group/bpftrace', missing
1310
bpftrace: WARNING - stop - tool output directory, '/var/tmp/pbench-test-tool-scripts/bpftrace/tools-group/bpftrace', missing
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
cpuacct: Error, one of the following options is required, --install|--start|--stop|--postprocess
22

3-
The following options are available:
3+
-h|--help display this help message and exit
44

5-
--install verify this perf tool will work
65

7-
--start|stop|postprocess start/stop/postprocess the data collection
8-
-d str|--dir=str directory to store data collection (required)
9-
--interval=int number of seconds between each data collection (optional, default is 10 seconds)
6+
Tool-specific options - these may be specified when you register a tool:
107

11-
-h|--help display this help message
8+
--interval=int number of seconds between each data collection (optional, default is 10 seconds)
129
cpuacct: WARNING - postprocess - tool output directory, '/var/tmp/pbench-test-tool-scripts/cpuacct/tools-group/cpuacct', missing
1310
cpuacct: WARNING - stop - tool output directory, '/var/tmp/pbench-test-tool-scripts/cpuacct/tools-group/cpuacct', missing
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
disk: Error, one of the following options is required, --install|--start|--stop|--postprocess
22

3-
The following options are available:
3+
-h|--help display this help message and exit
44

5-
--install verify this perf tool will work
65

7-
--start|stop|postprocess start/stop/postprocess the data collection
8-
-d str|--dir=str directory to store data collection (required)
9-
--interval=int number of seconds between each data collection (optional, default is 10 seconds)
6+
Tool-specific options - these may be specified when you register a tool:
107

11-
-h|--help display this help message
8+
--interval=int number of seconds between each data collection (optional, default is 10 seconds)
129
disk: WARNING - postprocess - tool output directory, '/var/tmp/pbench-test-tool-scripts/disk/tools-group/disk', missing
1310
disk: WARNING - stop - tool output directory, '/var/tmp/pbench-test-tool-scripts/disk/tools-group/disk', missing
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
dm-cache: Error, one of the following options is required, --install|--start|--stop|--postprocess
22

3-
The following options are available:
3+
-h|--help display this help message and exit
44

5-
--install verify this perf tool will work
65

7-
--start|stop|postprocess start/stop/postprocess the data collection
8-
-d str|--dir=str directory to store data collection (required)
9-
--interval=int number of seconds between each data collection (optional, default is 10 seconds)
6+
Tool-specific options - these may be specified when you register a tool:
107

11-
-h|--help display this help message
8+
--interval=int number of seconds between each data collection (optional, default is 10 seconds)
129
dm-cache: WARNING - postprocess - tool output directory, '/var/tmp/pbench-test-tool-scripts/dm-cache/tools-group/dm-cache', missing
1310
dm-cache: WARNING - stop - tool output directory, '/var/tmp/pbench-test-tool-scripts/dm-cache/tools-group/dm-cache', missing
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
docker-info: Error, one of the following options is required, --install|--start|--stop|--postprocess
22

3-
The following options are available:
3+
-h|--help display this help message and exit
44

5-
--install verify this perf tool will work
65

7-
--start|stop|postprocess start/stop/postprocess the data collection
8-
-d str|--dir=str directory to store data collection (required)
9-
--interval=int number of seconds between each data collection (optional, default is 10 seconds)
6+
Tool-specific options - these may be specified when you register a tool:
107

11-
-h|--help display this help message
8+
--interval=int number of seconds between each data collection (optional, default is 10 seconds)
129
docker-info: WARNING - postprocess - tool output directory, '/var/tmp/pbench-test-tool-scripts/docker-info/tools-group/docker-info', missing
1310
docker-info: WARNING - stop - tool output directory, '/var/tmp/pbench-test-tool-scripts/docker-info/tools-group/docker-info', missing
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
docker: Error, one of the following options is required, --install|--start|--stop|--postprocess
22

3-
The following options are available:
3+
-h|--help display this help message and exit
44

5-
--install verify this perf tool will work
65

7-
--start|stop|postprocess start/stop/postprocess the data collection
8-
-d str|--dir=str directory to store data collection (required)
9-
--interval=int number of seconds between each data collection (optional, default is 10 seconds)
6+
Tool-specific options - these may be specified when you register a tool:
107

11-
-h|--help display this help message
8+
--interval=int number of seconds between each data collection (optional, default is 10 seconds)
129
docker: WARNING - postprocess - tool output directory, '/var/tmp/pbench-test-tool-scripts/docker/tools-group/docker', missing
1310
docker: WARNING - stop - tool output directory, '/var/tmp/pbench-test-tool-scripts/docker/tools-group/docker', missing
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
haproxy-ocp: Error, one of the following options is required, --install|--start|--stop|--postprocess
22

3-
The following options are available:
3+
-h|--help display this help message and exit
44

5-
--install verify this perf tool will work
65

7-
--start|stop|postprocess start/stop/postprocess the data collection
8-
-d str|--dir=str directory to store data collection (required)
6+
Tool-specific options - these may be specified when you register a tool:
7+
98
--interval=int number of seconds between each data collection (optional, default is 10 seconds)
109
--counters-clear-all clear all HAProxy counters at tool start (optional, default: 'false')
11-
12-
-h|--help display this help message
1310
haproxy-ocp: WARNING - postprocess - tool output directory, '/var/tmp/pbench-test-tool-scripts/haproxy-ocp/tools-group/haproxy-ocp', missing
1411
haproxy-ocp: WARNING - stop - tool output directory, '/var/tmp/pbench-test-tool-scripts/haproxy-ocp/tools-group/haproxy-ocp', missing
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
iostat: Error, one of the following options is required, --install|--start|--stop|--postprocess
22

3-
The following options are available:
3+
-h|--help display this help message and exit
44

5-
--install verify this perf tool will work
65

7-
--start|stop|postprocess start/stop/postprocess the data collection
8-
-d str|--dir=str directory to store data collection (required)
6+
Tool-specific options - these may be specified when you register a tool:
7+
98
--interval=int number of seconds between each data collection (optional, default is 10 seconds)
109
--options=str options passed directly to the tool (optional)
11-
12-
-h|--help display this help message
1310
iostat: WARNING - postprocess - tool output directory, '/var/tmp/pbench-test-tool-scripts/iostat/tools-group/iostat', missing
1411
iostat: WARNING - stop - tool output directory, '/var/tmp/pbench-test-tool-scripts/iostat/tools-group/iostat', missing

0 commit comments

Comments
 (0)