Move to kernel style SPDX license identifiers
[lttng-tools.git] / extras / core-handler / test.sh
... / ...
CommitLineData
1#!/bin/sh
2#
3# Copyright (C) 2013 Christian Babeux <christian.babeux@efficios.com>
4#
5# SPDX-License-Identifier: GPL-2.0-only
6#
7
8SESSION_NAME="coredump-handler"
9
10# Just recording kernel event sched_switch as an example, but we can as
11# well record user-space events from UST domain.
12EVENT_NAME="sched_switch"
13
14SNAPSHOT_PATH="/tmp/lttng/snapshot"
15SNAPSHOT_URI="file://${SNAPSHOT_PATH}"
16
17echo "Setup ${SESSION_NAME}..."
18$LTTNG_BIN create ${SESSION_NAME} --snapshot -U ${SNAPSHOT_PATH}
19$LTTNG_BIN enable-event ${EVENT_NAME} -k -s ${SESSION_NAME}
20$LTTNG_BIN start ${SESSION_NAME}
21
22echo "Sleeping..."
23sleep 10
24
25echo "Crashing..."
26$(dirname $0)/crash
27
28echo "Sleeping..."
29sleep 10
30
31$LTTNG_BIN stop ${SESSION_NAME}
32$LTTNG_BIN destroy ${SESSION_NAME}
33
34echo "Core dump will be available in /tmp/lttng/core."
35echo "Snapshot will be available in ${SNAPSHOT_PATH}."
This page took 0.026513 seconds and 4 git commands to generate.