Skip to content

Commit

Permalink
fixes distributed-system-analysis#227 - add *working* sar indexing su…
Browse files Browse the repository at this point in the history
…pport to pbench
  • Loading branch information
Archit Sharma committed May 2, 2016
1 parent 24af88e commit 21e7cb6
Show file tree
Hide file tree
Showing 31 changed files with 8,855 additions and 187 deletions.
2 changes: 1 addition & 1 deletion server/pbench/bin/es_test_index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ rm /tmp/$(basename "$1").tar.xz /tmp/$(basename "$1").tar.xz.md5

echo -e "\nComplete!"

#
#
# LC_ALL=C ../lib/vos/analysis/bin/sadf-<verison for that sa file> -x <path to safile> -- -A > sar.xml
35 changes: 35 additions & 0 deletions server/pbench/bin/extractsa
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

sa_data_file=$1
file_path=$(dirname "${sa_data_file}")
xml_file_path="$2"

sadf_type=$( { ${BASH_SOURCE%/*}/satools/oscode "$sa_data_file"; } 2>&1)

if [[ "$sadf_type" == *Invalid* ]]; then
sadf_type="f23"
echo "attempting to convert sa binary to compatible format.."
conversion_output=$( { LC_ALL=C ${BASH_SOURCE%/*}/vos/analysis/bin/sadf-f23-64 -c "$sa_data_file" > "${sa_data_file%/}".conv ; } 2>&1)
if [[ "$conversion_output" == *Invalid* ]]; then
echo "invalid input file! check if its a SA *binary* file.."
exit 1
fi
sa_data_file="${sa_data_file%/}".conv
fi

LC_ALL=C ${BASH_SOURCE%/*}/vos/analysis/bin/sadf-$sadf_type-64 -x "$sa_data_file" -- -A > "$xml_file_path"

client_nodename=$(${BASH_SOURCE%/*}/detect_nodename $xml_file_path)
echo "nodename: $client_nodename"

# cfg_name=$3
# uid=$4
# run_md5=$5
# ${BASH_SOURCE%/*}/index-sar $xml_file_path $client_nodename $cfg_name $uid $run_md5

# rm "$xml_file_path"
# echo "${sa_data_file##*.}"
# echo "${sa_data_file}"
if [[ "$(basename $sa_data_file)" =~ ^.*\.conv$ ]]; then
rm "$sa_data_file"
fi
Loading

0 comments on commit 21e7cb6

Please sign in to comment.