Master Tracealyzer with Linux tracing

Getting Started with Tracealyzer for Linux tracing

Enable tracing, capture your first Linux trace, and analyze it in Tracealyzer.

Step 1

Integrate LTTng

Integrate LTTng into your system, enabling detailed trace analysis.

Step 2

Configure Tracing

Necessary and common trace configurations to ensure accurate and efficient trace data capture.

Step 3

Capture Your First Trace

Capture your first trace and see how your Linux system executes.

Prerequisites

Before you begin

  • Install Tracealyzer. If you haven’t done so, see detailed instructions here
  • Existing Linux system that is able to run
  • Target/debug connection available

Step 1: Add LTTng

Integrate LTTng into Your Project

Add Tracing Support

  1. Install LTTng on your target device. The steps will vary depending on your target system.  As a first test, and to familiarize yourself with LTTng, you may try installing it on your host computer. On Ubuntu this is easily achieved through apt.

Configure the system

  1. Make sure the user running the tracing is part of the tracing group, unless you are tracing as root.
  2. In some cases you need to start lttng-sessiond as root before recording a trace.

Start tracing

  1. Start tracing by:
    lttng create

    # Add any desired trace configuration, see "Configure Tracing" for further details. Event sched_* enabling example below

    lttng enable-event -k sched_*

    lttng start

  2. Stop tracing by:
    lttng stop

    lttng destroy

For complete LTTng Integration details and advanced configuration, see the detailed LTTng documentation.

C

Step 2: Configure Tracing

Configure Tracing

Initial setup

LTTng allows a magnitude of configuration options for what parts to trace. For a minimal working setup we recommend to use the following:

lttng enable-event -k sched_*
lttng add-context -k -t pid
lttng add-context -k -t ppid

For further details upon LTTng configuration, please see the LTTng guide

C

Step 3: Trace Capture

Capture Your First Trace

By file copy

Transfer the trace file (located in ~/lttng-traces) to you host by any connection means available.

By Tracealyzer Target Library Tool

A more convenient way to record traces is using the Tracealyzer Target Library Tool, found in the Trace menu. This lets you control the tracing and download traces directly from Tracealyzer application, using an SSH connection.

Using the Target Library you can setup target profiles for easy access. Use the New button to create a new profile. From there you can setup the address, username and password or private key file. Once a profile has been created, the Connect button will allow you to connect to your target.

A tab will open to the right with three main parts. A trace session control panel, a command log and a command details box. Click the Start New Session button to start a new session. By default, a TzTrace session has been defined which is preconfigured to include scheduling, syscalls, signals and UST events. You can create your own setup using the Sessions And Channels Editor.

Opening the Trace

If using file copy, open the captured trace file in Tracealyzer. If using Tracalyzer Target Library Tool, the trace is automatically transfered to your host.

A successful trace should show recorded task execution, interrupts and other system events in the timeline.

If the trace is empty or doesn’t open correctly, see Troubleshooting.

Using Your Trace

Start by looking at:

  • Task scheduling — See when tasks execute, block and resume.

  • CPU usage — Identify tasks consuming significant CPU time.

  • Timing — Find long execution times and unexpected delays.

  • User events — Correlate trace data with application-specific behavior and custom events/logs. All synchronized into one execution timeline.

To learn more about using Tracealyzer, see Tracealyzer Features and Capabilities.

Using Tracealyzer to Evaluate Python Algorithms in Linux

In this blog post, we will see how Tracealyzer can be used to quickly and efficiently evaluate multiple implementations of an algorithm in Python, a language that is becoming more common in embedded application development as most machine learning frameworks are implemented in Python.

Understanding the impact of compiler options on performance

In this post, we’re going to understand how the combination of LTTng and Tracealyzer can shine light on how compiler options impact performance. The method discussed can come in handy whenever we are evaluating the performance of multiple candidate implementations of a particular feature.

Using Tracealyzer for Linux To Evaluate Userspace Performance

In this blog post, we’re going to demonstrate how to create LTTng tracepoints and how to use Tracealyzer for Linux to measure certain metrics based on these tracepoints.

Evaluating Linux System Performance Using Tracealyzer

When developing an application that’s targeting a Linux-based system, it is important to configure our system to maximize performance, because misconfiguration can limit application performance.

Using Tracealyzer To Ensure That Your IRQ Handler Is Performant

Today’s post dives into a key component of a Linux device driver, the interrupt handler, and shows how Tracealyzer can give you feedback on the performance of your handler.

Using Tracealyzer With a Yocto-based Linux Distribution

While there are mechanisms native to the Linux kernel to ensure that the functionality of a custom-written driver is correct, evaluating performance is not straightforward. Here’s how you can use Tracealyzer for Linux to assess the performance and identify any deficiencies.

Troubleshoot Your Linux Trace

Resolve common setup and capture issues when using Tracealyzer.

Check the Setup Before Capturing Again

Start with a Linux system that runs, a working target connection, and Tracealyzer installed on your host. Then follow the checks below for the symptom you see.

System Fails After Adding LTTng
If the system stops booting or becomes unstable after installing LTTng, first check that the LTTng packages match your Linux distribution and kernel version. Review the installation output and system logs for missing dependencies or module errors, then confirm that the tracing daemon starts correctly. If the issue began after enabling kernel events, disable the latest tracing changes and test again before adding events gradually.
Trace File Is Empty

An empty trace usually means LTTng did not record events or the trace was not transferred completely. Confirm that tracing started successfully with lttng start and that the expected events are enabled, such as sched_*. Check that the tracing session contains data before stopping it, then verify the trace directory and copy the complete trace to your host. If tracing as a regular user, ensure that the user belongs to the tracing group; where required, start lttng-sessiond with the appropriate permissions. Capture a short test trace and open it in Tracealyzer to confirm events appear in the timeline.

Tracing Stops Too Soon
If a trace ends earlier than expected, check whether the LTTng session was stopped or destroyed, or whether the target ran out of available trace storage. Confirm that the session remains active for the full capture and that the output destination has enough space. For streaming captures, verify that the connection stays available and that the transport can keep up with the event rate. If the trace still cuts off, try a shorter capture, reduce the number of enabled events, and review the LTTng command log for errors.
Streaming Data Does Not Arrive
If live trace data is not appearing in Tracealyzer, first confirm that the target is reachable and the streaming connection is active. Check the target address and login details in your profile, and make sure the required tracing services are running. Verify that the session has started and events are enabled, then review the command log for connection or permission errors. If data still does not arrive, reconnect to the target and try a short capture. A stable connection and a correctly configured session help keep trace data flowing into Tracealyzer.

Enhance Your Tracing Skills

Unlock deeper insights by exploring advanced trace analysis techniques and optimize your Linux applications.
Percepio: Sensing Software

Solutions

Tracealyzer

Detect

DevAlert

Try

Buy

Resources

Blog

White Papers

Application Notes

Videos

Company

Management

Press

Contact

Security Policy

Events

Stay in Touch

Subscribe

Copyright © 2026 Percepio AB. All rights reserved.  |  Privacy Policy  |  Licensing  |  Terms and Conditions  |  Cookie Settings