diff --git a/bin/profile_fe.sh b/bin/profile_fe.sh index f40dd00eff27d8..f017fbaf5a3c9c 100755 --- a/bin/profile_fe.sh +++ b/bin/profile_fe.sh @@ -44,15 +44,15 @@ if [[ ! -x "${JAVA}" ]]; then exit 1 fi -FE_PID=`jps | grep DorisFE | awk '{print $1}'` +FE_PID=$(jps | grep DorisFE | awk '{print $1}') if [[ -z "$FE_PID" ]]; then - echo "DorisFe not started" - exit 1 + echo "DorisFe not started" + exit 1 fi echo "DorisFE pid: $FE_PID" mkdir -p "${DORIS_HOME}/log" -NOW=`date +'%Y%m%d%H%M%S'` +NOW=$(date +'%Y%m%d%H%M%S') PROFILE_OUTPUT="${DORIS_HOME}/log/profile_${NOW}.html" if [[ -z "${PROFILE_SECONDS}" ]]; then PROFILE_SECONDS="10" @@ -60,4 +60,4 @@ fi echo "Begin profiling ${PROFILE_SECONDS} seconds and generate flame graph to ${PROFILE_OUTPUT}..." ${JAVA} -jar "${DORIS_HOME}"/lib/ap-loader-all-*.jar profiler -a -n -l -i 200us -d "${PROFILE_SECONDS}" -f "${PROFILE_OUTPUT}" "${FE_PID}" -echo "Generated flame graph to ${PROFILE_OUTPUT}" \ No newline at end of file +echo "Generated flame graph to ${PROFILE_OUTPUT}"