Not capturing ust events
Kienan Stewart
kstewart at efficios.com
Thu May 8 13:25:08 EDT 2025
Hi David,
On 5/8/25 1:02 PM, David Aldrich wrote:
> Hi Kienan
>
> Thanks very much for your reply. I can now capture UST events. (My
> actual problem was that I was not linking to lttng-ust).
>
Glad you caught that. I had assumed it was linked in :)
> I am now using the method you described:
>
>> lttng create my_proj
>> lttng enable-event --userspace 'lttng_ust_tracef:*'
>> lttng start
>> ./my_app
>> lttng stop
>> lttng view # [Optional]
>
> This works and captures UST events but I am not capturing Kernel
> events. My reason for running this experiment is that occasionally
> our application shows glitches where a task takes longer than
> expected. So I want to see what happens in that occurrence - perhaps
> an ISR is running or something like that. So I assume that I need to
> capture Kernel and UST events.
>
> Can you please advise me why Kernel events aren't being captured?
>
In the setup above, only a userspace channel is created.
Assuming the user you are running the `lttng` commands with is a member
of the tracing group and a root lttng-sessiond is running, a complete
example might look like:
```
lttng create my_proj
lttng enable-event --userspace 'lttng_ust_tracef:*' # this will
automatically create a channel if one doesn't exist in the session
lttng enable-channel --kernel --session my_proj kernel_channel # [1]
lttng enable-event --kernel --all --channel kernel_channel --session
my_proj # [2]
lttng start
./my_app
lttng stop
lttng view
```
> Best regards
> David
thanks,
kienan
[1]: https://lttng.org/man/1/lttng-enable-channel/v2.13/
[2]: https://lttng.org/man/1/lttng-enable-event/v2.13/
More information about the lttng-dev
mailing list