diff --git a/agent/base b/agent/base index cd633118f0..ff05f336a8 100755 --- a/agent/base +++ b/agent/base @@ -133,7 +133,8 @@ if [[ -z "$_PBENCH_BENCH_TESTS" ]]; then else function check_install_rpm { - echo $@ + echo $1 + #$2 is the version which will vary return 0 } fi diff --git a/agent/bench-scripts/gold/pbench-fio/test-04.txt b/agent/bench-scripts/gold/pbench-fio/test-04.txt index 6254c93d36..30ba1d0442 100644 --- a/agent/bench-scripts/gold/pbench-fio/test-04.txt +++ b/agent/bench-scripts/gold/pbench-fio/test-04.txt @@ -1,5 +1,6 @@ +++ Running test-04 pbench-fio -pbench-fio 2.14 +pbench-fio +python-pandas The following jobfile was created: /var/tmp/pbench-test-bench/pbench/fio__1900-01-01_00:00:00/1-rw-4KiB/sample1/fio.job [global] bs=4k @@ -1109,7 +1110,8 @@ Iteration 6-randrw-1024KiB complete (6 of 6), with 1 pass and 6 failures /var/tmp/pbench-test-bench/pbench/tools-default/sar --- pbench tree state +++ pbench.log file contents -/var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] [pbench-fio]pbench-fio is installed +/var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] [pbench-fio]pbench-fio 2.14 is installed +/var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] [pbench-fio]python-pandas is installed /var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] fio_device_check() /tmp/fio /var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] fio: Going to run [/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/bm --output-format=json /var/tmp/pbench-test-bench/pbench/fio__1900-01-01_00:00:00/1-rw-4KiB/sample1/fio.job ] /var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] post-processing fio result diff --git a/agent/bench-scripts/gold/pbench-fio/test-05.txt b/agent/bench-scripts/gold/pbench-fio/test-05.txt index 09d3a6823c..d649020c57 100644 --- a/agent/bench-scripts/gold/pbench-fio/test-05.txt +++ b/agent/bench-scripts/gold/pbench-fio/test-05.txt @@ -1,6 +1,7 @@ +++ Running test-05 pbench-fio -pbench-fio 2.14 +pbench-fio verifying clients have fio installed +python-pandas The following jobfile was created: /var/tmp/pbench-test-bench/pbench/fio__1900-01-01_00:00:00/1-throughput-4KiB/sample1/fio.job [global] bs=4k @@ -565,8 +566,9 @@ Iteration 3-throughput-1024KiB complete (3 of 3), with 1 pass and 6 failures /var/tmp/pbench-test-bench/pbench/tools-default/sar --- pbench tree state +++ pbench.log file contents -/var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] [pbench-fio]pbench-fio is installed +/var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] [pbench-fio]pbench-fio 2.14 is installed /var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] verifying clients have fio installed +/var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] [pbench-fio]python-pandas is installed /var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] fio_device_check() /tmp/fio foo,bar /var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] creating directories on the clients /var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] opening port 8765 on firewall on the clients @@ -914,7 +916,7 @@ Iteration 3-throughput-1024KiB complete (3 of 3), with 1 pass and 6 failures /var/tmp/pbench-test-bench/test-execution.log:/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/ssh -o StrictHostKeyChecking=no bar mkdir -p /var/tmp/pbench-test-bench/pbench/fio__1900-01-01_00:00:00/3-throughput-1024KiB/sample1 /var/tmp/pbench-test-bench/test-execution.log:/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/ssh -o StrictHostKeyChecking=no bar mkdir -p /var/tmp/pbench-test-bench/pbench/fio__1900-01-01_00:00:00/3-throughput-1024KiB/sample1 /var/tmp/pbench-test-bench/test-execution.log:/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/ssh -o StrictHostKeyChecking=no bar mkdir -p /var/tmp/pbench-test-bench/pbench/fio__1900-01-01_00:00:00/3-throughput-1024KiB/sample1 -/var/tmp/pbench-test-bench/test-execution.log:/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/ssh -o StrictHostKeyChecking=no bar /opt/pbench-agent/bench-scripts/pbench-fio --install +/var/tmp/pbench-test-bench/test-execution.log:/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/ssh -o StrictHostKeyChecking=no bar /opt/pbench-agent/bench-scripts/pbench-fio --remote-only --install /var/tmp/pbench-test-bench/test-execution.log:/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/ssh -o StrictHostKeyChecking=no bar pushd /var/tmp/pbench-test-bench/pbench/fio__1900-01-01_00:00:00/1-throughput-4KiB/sample1 >/dev/null; screen -dmS fio-server bash -c ''/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/bm' --server 2>&1 >client-result.txt' /var/tmp/pbench-test-bench/test-execution.log:/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/ssh -o StrictHostKeyChecking=no bar pushd /var/tmp/pbench-test-bench/pbench/fio__1900-01-01_00:00:00/1-throughput-4KiB/sample1 >/dev/null; screen -dmS fio-server bash -c ''/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/bm' --server 2>&1 >client-result.txt' /var/tmp/pbench-test-bench/test-execution.log:/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/ssh -o StrictHostKeyChecking=no bar pushd /var/tmp/pbench-test-bench/pbench/fio__1900-01-01_00:00:00/1-throughput-4KiB/sample1 >/dev/null; screen -dmS fio-server bash -c ''/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/bm' --server 2>&1 >client-result.txt' @@ -1005,7 +1007,7 @@ Iteration 3-throughput-1024KiB complete (3 of 3), with 1 pass and 6 failures /var/tmp/pbench-test-bench/test-execution.log:/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/ssh -o StrictHostKeyChecking=no foo mkdir -p /var/tmp/pbench-test-bench/pbench/fio__1900-01-01_00:00:00/3-throughput-1024KiB/sample1 /var/tmp/pbench-test-bench/test-execution.log:/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/ssh -o StrictHostKeyChecking=no foo mkdir -p /var/tmp/pbench-test-bench/pbench/fio__1900-01-01_00:00:00/3-throughput-1024KiB/sample1 /var/tmp/pbench-test-bench/test-execution.log:/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/ssh -o StrictHostKeyChecking=no foo mkdir -p /var/tmp/pbench-test-bench/pbench/fio__1900-01-01_00:00:00/3-throughput-1024KiB/sample1 -/var/tmp/pbench-test-bench/test-execution.log:/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/ssh -o StrictHostKeyChecking=no foo /opt/pbench-agent/bench-scripts/pbench-fio --install +/var/tmp/pbench-test-bench/test-execution.log:/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/ssh -o StrictHostKeyChecking=no foo /opt/pbench-agent/bench-scripts/pbench-fio --remote-only --install /var/tmp/pbench-test-bench/test-execution.log:/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/ssh -o StrictHostKeyChecking=no foo pushd /var/tmp/pbench-test-bench/pbench/fio__1900-01-01_00:00:00/1-throughput-4KiB/sample1 >/dev/null; screen -dmS fio-server bash -c ''/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/bm' --server 2>&1 >client-result.txt' /var/tmp/pbench-test-bench/test-execution.log:/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/ssh -o StrictHostKeyChecking=no foo pushd /var/tmp/pbench-test-bench/pbench/fio__1900-01-01_00:00:00/1-throughput-4KiB/sample1 >/dev/null; screen -dmS fio-server bash -c ''/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/bm' --server 2>&1 >client-result.txt' /var/tmp/pbench-test-bench/test-execution.log:/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/ssh -o StrictHostKeyChecking=no foo pushd /var/tmp/pbench-test-bench/pbench/fio__1900-01-01_00:00:00/1-throughput-4KiB/sample1 >/dev/null; screen -dmS fio-server bash -c ''/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/bm' --server 2>&1 >client-result.txt' diff --git a/agent/bench-scripts/gold/pbench-fio/test-06.txt b/agent/bench-scripts/gold/pbench-fio/test-06.txt index 4d9c05218f..ada9fe02a4 100644 --- a/agent/bench-scripts/gold/pbench-fio/test-06.txt +++ b/agent/bench-scripts/gold/pbench-fio/test-06.txt @@ -1,5 +1,6 @@ +++ Running test-06 pbench-fio -pbench-fio 2.14 +pbench-fio +python-pandas The following jobfile was created: /var/tmp/pbench-test-bench/pbench/fio__1900-01-01_00:00:00/1-throughput-4KiB/sample1/fio.job [global] bs=4k @@ -564,7 +565,8 @@ Iteration 3-throughput-1024KiB complete (3 of 3), with 1 pass and 6 failures /var/tmp/pbench-test-bench/pbench/tools-default/sar --- pbench tree state +++ pbench.log file contents -/var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] [pbench-fio]pbench-fio is installed +/var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] [pbench-fio]pbench-fio 2.14 is installed +/var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] [pbench-fio]python-pandas is installed /var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] fio_device_check() /tmp/fio /var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] fio: Going to run [/var/tmp/pbench-test-bench/opt/pbench-agent/unittest-scripts/bm --output-format=json /var/tmp/pbench-test-bench/pbench/fio__1900-01-01_00:00:00/1-throughput-4KiB/sample1/fio.job ] /var/tmp/pbench-test-bench/pbench/pbench.log:[debug][1900-01-01T00:00:00.000000] post-processing fio result diff --git a/agent/bench-scripts/gold/pbench-uperf/test-00.txt b/agent/bench-scripts/gold/pbench-uperf/test-00.txt index af8e3363ad..cde9233204 100644 --- a/agent/bench-scripts/gold/pbench-uperf/test-00.txt +++ b/agent/bench-scripts/gold/pbench-uperf/test-00.txt @@ -1,5 +1,5 @@ +++ Running test-00 pbench-uperf -pbench-uperf 1.0.4 +pbench-uperf Starting iteration (1 of 2) test sample 1 of 2 client[127.0.0.1]protocol[tcp]test[rr]instances[1]size[64] <-> server[127.0.0.1] diff --git a/agent/bench-scripts/gold/pbench-uperf/test-01.txt b/agent/bench-scripts/gold/pbench-uperf/test-01.txt index d283e8b3d6..67c077e4c5 100644 --- a/agent/bench-scripts/gold/pbench-uperf/test-01.txt +++ b/agent/bench-scripts/gold/pbench-uperf/test-01.txt @@ -1,5 +1,5 @@ +++ Running test-01 pbench-uperf -pbench-uperf 1.0.4 +pbench-uperf Starting iteration (1 of 2) test sample 1 of 2 client[c1]node[1]protocol[tcp]test[rr]instances[1]size[64] <-> server[s1]node[0] diff --git a/agent/bench-scripts/pbench-fio b/agent/bench-scripts/pbench-fio index 8aab117a95..fad35f2474 100755 --- a/agent/bench-scripts/pbench-fio +++ b/agent/bench-scripts/pbench-fio @@ -40,6 +40,7 @@ maxstddevpct=5 # maximum allowable standard deviation in percent max_failures=6 # after N failed attempts to hit below $maxstddevpct, move on to the nest test supported_test_types="read,write,rw,randread,randwrite,randrw" install_only="n" +remote_only="n" config="" rate_iops="" test_types="read,randread" # default is -non- destructive @@ -134,10 +135,13 @@ function fio_usage() { printf -- "\t--install\n" printf "\t\tinstall only\n" printf "\t\tDefault is n\n" + printf -- "\t--remote-only\n" + printf "\trun this on the remotes only\n" } function fio_process_options() { - opts=$(getopt -q -o jic:t:b:s:d:r: --longoptions "help,max-stddev:,max-failures:,samples:,direct:,sync:,install,clients:,client-file:,iodepth:,ioengine:,config:,jobs-per-dev:,job-mode:,rate-iops:,ramptime:,runtime:,test-types:,block-sizes:,file-size:,targets:,tool-group:,postprocess-only:,run-dir:,directory:,numjobs:,job-file:,pre-iteration-script:," -n "getopt.sh" -- "$@"); + opts=$(getopt -q -o jic:t:b:s:d:r: --longoptions "help,max-stddev:,max-failures:,samples:,direct:,sync:,install,remote-only,clients:,client-file:,iodepth:,ioengine:,config:,jobs-per-dev:,job-mode:,rate-iops:,ramptime:,runtime:,test-types:,block-sizes:,file-size:,targets:,tool-group:,postprocess-only:,run-dir:,directory:,numjobs:,job-file:" -n "getopt.sh" -- "$@"); + if [ $? -ne 0 ]; then printf "\t${benchmark}: you specified an invalid option\n\n" fio_usage @@ -154,6 +158,10 @@ function fio_process_options() { shift; install_only="y" ;; + --remote-only) + shift; + remote_only="y" + ;; --max-stddev) shift; if [ -n "$1" ]; then @@ -359,7 +367,7 @@ function fio_process_options() { ;; esac done - if [ $postprocess_only == "n" ]; then + if [ "$postprocess_only" = "n" ]; then benchmark_run_dir="$pbench_run/${benchmark}_${config}_$date" else if [ -z "$run_dir" ]; then @@ -375,24 +383,36 @@ function fio_process_options() { # Ensure the right version of the benchmark is installed function fio_install() { - if [ "$postprocess_only" == "n" ]; then + if [ "$postprocess_only" = "n" ]; then if check_install_rpm $benchmark_rpm $ver; then - debug_log "[$script_name]$benchmark_rpm is installed" + debug_log "[$script_name]$benchmark_rpm $ver is installed" else - debug_log "[$script_name]$benchmark_rpm installation failed, exiting" + debug_log "[$script_name]$benchmark_rpm $ver installation failed, exiting" exit 1 - fi + fi + fi if [ ! -z "$clients" ] ; then debug_log "verifying clients have fio installed" echo "verifying clients have fio installed" for client in `echo $clients | sed -e s/,/" "/g`; do - ssh $ssh_opts $client ${pbench_install_dir}/bench-scripts/$script_name --install & + ssh $ssh_opts $client ${pbench_install_dir}/bench-scripts/$script_name --remote-only --install & done wait fi - if [ "$install_only" == "y" ]; then - exit 0 +} + +# install python-pandas on the controller: fiologparser_hist.py needs it +function pandas_install() { + if [ "$postprocess_only" = "n" ]; then + if check_install_rpm python-pandas; then + debug_log "[$script_name]python-pandas is installed" + else + debug_log "[$script_name]python-pandas installation failed, exiting." + debug_log "[$script_name]On RHEL, python-pandas is in the EPEL repo." + debug_log "[$script_name]See https://fedoraproject.org/wiki/EPEL for details." + exit 1 + fi fi } @@ -401,7 +421,7 @@ function print_iteration { printf "\n%28s" "$1" >>$benchmark_summary_txt_file printf "\n%s" "$1" >>$benchmark_summary_csv_file hists=`cat $iteration_dir/reference-result/fio.job 2>/dev/null | grep "^log_hist_msec"` - if [ $1 == "iteration" ]; then + if [ "$1" = "iteration" ]; then # this is just a label, so no links here if [ ! -z "$hist_interval" ]; then printf "\n%28s %s %s %s" "iteration" "summary" "hist-results" "tools">>$benchmark_summary_html_file @@ -442,7 +462,7 @@ function fio_device_check() { local dev="" local client="" local rc=0 - if [ "$postprocess_only" == "n" ]; then + if [ "$postprocess_only" = "n" ]; then debug_log "fio_device_check() $devs $clients" for dev in `echo $devs | sed -e s/,/" "/g`; do if echo $dev | grep -q "^/dev/"; then @@ -543,7 +563,7 @@ function fio_run_job() { local client_opts="" if [ ! -z "$client_file" ] ;then - typeset -i nclients=$(wc -l $client_file) + typeset -i nclients=$(wc -l $client_file | cut -d ' ' -f 1) client_opts="--client=$client_file --max-jobs=$nclients" elif [ ! -z "$clients" ]; then local max_jobs=0 @@ -624,7 +644,7 @@ function fio_run_benchmark() { echo "Restarting iteration $iteration ($count of $total_iterations)" log "Restarting iteration $iteration ($count of $total_iterations)" fi - if [ "$postprocess_only" == "n" ]; then + if [ "$postprocess_only" = "n" ]; then mkdir -p $iteration_dir else if [ ! -e $iteration_dir ]; then @@ -659,7 +679,7 @@ function fio_run_benchmark() { fi benchmark_results_dir="$iteration_dir/sample$sample" benchmark_tools_dir="$benchmark_results_dir/tools-$tool_group" - if [ "$postprocess_only" == "n" ]; then + if [ "$postprocess_only" = "n" ]; then mkdir -p $benchmark_results_dir fio_job_file="$benchmark_results_dir/fio.job" fio_create_jobfile "$test_type" "$ioengine" "$block_size" "$iodepth" "$direct" "$sync" "$runtime" "$ramptime" "$file_size" "$rate_iops" "$dev" "$fio_job_file" @@ -757,11 +777,11 @@ function fio_run_benchmark() { else # delete the tool data [and respose time log for rr tests] from the other samples to save space # this option is off by default - if [ "$keep_failed_tool_data" == "n" ]; then + if [ "$keep_failed_tool_data" = "n" ]; then /bin/rm -rf $iteration_dir/$sample_dir/tools-* $iteration_dir/$sample_dir/response-times.txt fi # since non reference-result sample data is rarely referenced, tar it up to reduce the number of files used - if [ "$tar_nonref_data" == "y" ]; then + if [ "$tar_nonref_data" = "y" ]; then pushd "$iteration_dir" >/dev/null; tar --create --xz --force-local --file=$sample_dir.tar.xz $sample_dir && /bin/rm -rf $sample_dir; popd >/dev/null fi fi @@ -850,6 +870,14 @@ function fio_print_summary() { fio_process_options "$@" fio_install +# pandas installed only on controller +if [ "$remote_only" = "n" ] ;then + pandas_install +fi +if [ "$install_only" = "y" ]; then + exit 0 +fi + mkdir -p $benchmark_run_dir export benchmark config pbench-collect-sysinfo --group=$tool_group --dir=$benchmark_run_dir beg diff --git a/agent/util-scripts/gold/pbench-register-tool/test-00.txt b/agent/util-scripts/gold/pbench-register-tool/test-00.txt index fb4fac9ed2..d1ebb8375d 100644 --- a/agent/util-scripts/gold/pbench-register-tool/test-00.txt +++ b/agent/util-scripts/gold/pbench-register-tool/test-00.txt @@ -1,5 +1,5 @@ +++ Running test-00 pbench-register-tool -pbench-sysstat 11.2.0 +pbench-sysstat mpstat tool is now registered in group default --- Finished test-00 pbench-register-tool (status=0} +++ pbench tree state