File indexing completed on 2026-06-04 08:56:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 echo "--- Executing macro"
0011 echo "${full_command}"
0012 time_file=$(mktemp)
0013 /usr/bin/time -v -o "${time_file}" bash -c "${full_command}"
0014 status_f4a=$?
0015 user_cpu=$( awk '/User time \(seconds\)/ {print $NF}' "${time_file}")
0016 sys_cpu=$( awk '/System time \(seconds\)/ {print $NF}' "${time_file}")
0017 max_rss_kb=$(awk '/Maximum resident set size/ {print $NF}' "${time_file}")
0018 rm -f "${time_file}"
0019
0020 if [[ ${status_f4a} -ne 0 ]]; then
0021 echo "ERROR: Macro exited with code ${status_f4a}. Aborting."
0022 . ${SPHENIXPROD_SCRIPT_PATH}/common_runscript_finish.sh
0023 fi