Getting started

This is a small guide to get started quickly with LTTng kernel and userspace tracing.

Kernel Tracing

First make sure you have lttng-modules (the kernel modules) and lttng-tools installed.

To list the available kernel events:

# lttng list -k

Before starting, we need to create a session:

# lttng create mysession

Enable some events for this session:

# lttng enable-event sched_switch,sched_process_fork -k

or simply all available events:

# lttng enable-event -a -k

Start the tracing:

# lttng start

By default traces are saved in ~/lttng-traces/mysession-[date]-[time]/

When you're done:

# lttng stop
# lttng destroy

For a more exhaustive list of available options, see the lttng-tools wiki page.

User-space Tracing

To trace userspace applications, you need lttng-tools compiled with UST support (on by default), which requires the lttng-ust library.

Information about instrumenting applications can be found in the