@@ -190,24 +190,29 @@ vmstat)
190190esac
191191
192192function 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
0 commit comments