X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=extras%2Fcore-handler%2Fhandler.sh;h=c2d24027b42224bd31a368d2da9266c69eceb23e;hp=781728223bd64b50355a022bc0cf8d24a1348e5c;hb=5d9ad61212d307697bb661bafcf16356fea915ac;hpb=a1ae300ff3a139f4d4f593eddf444b0fca52280f diff --git a/extras/core-handler/handler.sh b/extras/core-handler/handler.sh index 781728223..c2d24027b 100755 --- a/extras/core-handler/handler.sh +++ b/extras/core-handler/handler.sh @@ -29,6 +29,12 @@ SESSION_NAME="coredump-handler" # Sessiond binary name. SESSIOND_BIN_NAME="lttng-sessiond" +# TODO: Checking for a sessiond lockfile would be more appropriate. +if $PGREP_BIN -u root "${SESSIOND_BIN_NAME}" > /dev/null 2>&1 +then + $LTTNG_BIN snapshot record -s ${SESSION_NAME} > /dev/null 2>&1 +fi + # Core file settings. CORE_PATH="/tmp/lttng/core" CORE_PREFIX="core" @@ -54,9 +60,3 @@ $CAT_BIN - > "${CORE_PATH}/${CORE_PREFIX}.$p" # Optional, chain core dump handler with original systemd script. #$CAT_BIN - | /usr/lib/systemd/systemd-coredump $p $u $g $s $t $e - -# TODO: Checking for a sessiond lockfile would be more appropriate. -if $PGREP_BIN -u root "${SESSIOND_BIN_NAME}" > /dev/null 2>&1 -then - $LTTNG_BIN snapshot record -s ${SESSION_NAME} > /dev/null 2>&1 -fi