- # Kill any LTTng-related process
- lttng_processes="$("$PGREP" -l 'lttng|gen-ust-.+')"
- if [ $? -eq 0 ]; then
- echo "The following LTTng processes were detected running on the system and will be killed:"
- echo "$lttng_processes"
-
- pids="$(cut -d ' ' -f 1 <<< "$lttng_processes" | tr '\n' ' ')"
- kill -SIGKILL $pids
- fi
-