diff --git a/agent/tool-scripts/systemtap b/agent/tool-scripts/systemtap index 39d8ed6366..e9fc4f882a 100755 --- a/agent/tool-scripts/systemtap +++ b/agent/tool-scripts/systemtap @@ -18,14 +18,8 @@ pbench_bin="`cd ${script_path}/..; /bin/pwd`" # Defaults tool=$script_name tool_bin=staprun -ver=10.2.1 -tool_url="http://pagesperso-orange.fr/sebastien.godard/sysstat-$ver.tar.bz2" group=default dir="/tmp" -mode="" -interval="10" -iteration="1" -options="none" # Process options and arguments opts=$(getopt -q -o idp --longoptions "dir:,script:,group:,iteration:,options:,start,stop,install,postprocess" -n "getopt.sh" -- "$@"); @@ -86,9 +80,10 @@ while true; do --script) shift; if [ -n "$1" ]; then - script="$1" + script=`echo $1 | sed 's/^"\(.*\)"$/\1/'` shift - echo script is $script + else + echo "you did not provide a script" fi ;; -o|--options) @@ -115,6 +110,9 @@ case "$mode" in install) # the installation for systemtap includes compiling the kernel module from the stap script # this is done to avoid extra overhead when the workload is running + check_install_rpm systemtap-client + check_install_rpm systemtap-devel + check_install_rpm kernel-devel pushd $pbench_tmp >/dev/null install_cmd="stap -v -m pbench_systemtap -p4 $script" printf "%s\n" $script @@ -123,6 +121,7 @@ case "$mode" in popd >/dev/null ;; start) + mkdir -p $tool_output_dir if [ -e $tool_output_file ]; then /bin/rm $tool_output_file fi