-
-# TODO: Checking for a sessiond lockfile would be more appropriate.
-if $PGREP_BIN -u root "${SESSIOND_BIN_NAME}" > /dev/null 2>&1
-then
- # Since we are called via the kernel coredump mechanism, we need to
- # setup our environment manually.
- #
- # The lttng command line tool lookup $HOME to adjust the .lttngrc
- # path. This is useful to have automatic session name lookup.
- export HOME="/root"
- $MKDIR_BIN -p "${SNAPSHOT_PATH}"
- $LTTNG_BIN snapshot add-output "${SNAPSHOT_OUTPUT}" > /dev/null 2>&1
- $LTTNG_BIN snapshot record > /dev/null 2>&1
-fi