Skip to content

Commit 5a4f3d9

Browse files
portantendokos
authored andcommitted
Reference pbench_install_dir enviroment variable
We reference the `pbench_install_dir` environment variable instead of fetching it from the config file directly since `base` provides it. We also fix a few tabs vs spaces issues, and add the "item" which was in error when looping through the list of sysinfo items to execute.
1 parent 9fe5a59 commit 5a4f3d9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

agent/util-scripts/pbench-sysinfo-dump

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ fi
2121

2222
label=$3
2323
if [[ -z "$label" ]]; then
24-
dir="$dir/$hostname"
24+
dir="$dir/$hostname"
2525
else
26-
dir="$dir/$label:$hostname"
26+
dir="$dir/$label:$hostname"
2727
fi
2828
mkdir -p $dir
2929
if [[ ! -d "$dir" ]]; then
@@ -152,15 +152,15 @@ function collect_stockpile_data {
152152
stockpile_log=$(getconf.py stockpile_log stockpile)
153153
154154
if [[ -z "$stockpile_path" ]]; then
155-
stockpile_path=$(getconf.py pbench_install_dir pbench-agent)
155+
stockpile_path=$pbench_install_dir
156156
fi
157157
158158
# set stockpile log file and output paths
159159
if [[ -z "$stockpile_log" ]]; then
160-
stockpile_log=$dir/stockpile.log
161-
fi
160+
stockpile_log=$dir/stockpile.log
161+
fi
162162
if [[ -z "$stockpile_output_path" ]]; then
163-
stockpile_output_path=$dir/stockpile.json
163+
stockpile_output_path=$dir/stockpile.json
164164
fi
165165
166166
# generate inventory and run stockpile
@@ -173,7 +173,7 @@ function collect_stockpile_data {
173173
debug_log "Running stockpile with options: $stockpile_opts"
174174
${benchmark_run_dir}/stockpile.cmd 2>&1 >$stockpile_log
175175
if [[ $? != 0 ]]; then
176-
error_log "[$script_name] Stockpile run failed"
176+
error_log "[$script_name] Stockpile run failed"
177177
exit 1
178178
fi
179179
}
@@ -197,7 +197,7 @@ for item in ${sysinfo//,/ };do
197197
elif [[ "$item" == "stockpile" ]]; then
198198
collect_stockpile_data &
199199
else
200-
error_log "[$script_name]bad sysinfo value"
200+
error_log "[$script_name]bad sysinfo value, \"${item}\""
201201
fi
202202
done
203203
wait

0 commit comments

Comments
 (0)