forked from distributed-system-analysis/pbench
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes distributed-system-analysis#227 - add *working* sar indexing su…
…pport to pbench
- Loading branch information
Archit Sharma
committed
May 2, 2016
1 parent
24af88e
commit 21e7cb6
Showing
31 changed files
with
8,855 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.