Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: Kienan Stewart via lttng-dev <lttng-dev@lists.lttng.org>
To: Amir Najafi Zadeh <anajafizadeh@cs.stonybrook.edu>,
	lttng-dev@lists.lttng.org
Subject: Re: Question about LTTng Kernel Probe Tracking
Date: Tue, 7 Apr 2026 10:57:35 -0400	[thread overview]
Message-ID: <4a6fd540-da30-419e-b311-1fdf17306cef@efficios.com> (raw)
In-Reply-To: <CAOQX81c_1OGMybWoc3axCVZGk58q9aefxpNS2XTny2K8cy_65w@mail.gmail.com>

Hi Amir,

On 2026-04-04 21:02, Amir Najafi Zadeh via lttng-dev wrote:
> Hello all,
> 
> I hope you are doing well.
> 
> I have a quick question about LTTng tracking when using kernel probes. I 
> mainly use LTTng to trace file system functions in the Linux kernel, and 
> for that I use the LTTng kernel probe feature, which works very well. 
> However, when I tried filtering logs for a specific group ID, I noticed 
> that filters are not supported for kernel probes.
> 
> Then I attempted to use the tracking feature to trace only a specific 
> GID, but this also did not work. From what I see in my logs, it appears 
> that for kernel probes all events are captured and recorded, regardless 
> of the tracking options.
> 
> I wanted to know if this is a known limitation, and whether there is any 
> in-progress work or reason why this is not currently supported.
> 

I just tried on the master branch (since I had easy access to it), and 
wasn't able to reproduce a situation where I added the gid tracking and 
had results for a different gid in lttng view.

> For reference, here is my code. I am using LTTng 2.13.11 with kernel 
> 6.8.0-101-generic:
> 
> ``` #!/bin/sh
> SESSION_NAME="lttng-gid-test"
> OUTPUT_DIR="/tmp/lttng/${SESSION_NAME}"
> GROUP_ID=1002
> 
> # create the lttng session
> lttng create "$SESSION_NAME" -o "$OUTPUT_DIR"
> 
> # create the lttng ring buffer channel
> lttng enable-channel --session="$SESSION_NAME" --kernel channel0 \
> --subbuf-size=16M \
> --num-subbuf=2
> 
> # add pid, tid, proc, and gid for tracing collection
> lttng add-context --session="$SESSION_NAME" --channel=channel0 --kernel 
> --type pid
> lttng add-context --session="$SESSION_NAME" --channel=channel0 --kernel 
> --type gid
> 
> # enable the target probe
> lttng enable-event --session="$SESSION_NAME" --channel=channel0 --kernel 
> --probe=ext4_get_inode_loc ext4_get_inode_loc
> 
> # disable all tracks # NOTE: untracking doesn't make a difference
> # lttng untrack --session="$SESSION_NAME" --kernel --all --gid
> # lttng untrack --session="$SESSION_NAME" --kernel --all --pid
> # lttng untrack --session="$SESSION_NAME" --kernel --all --vpid
> # lttng untrack --session="$SESSION_NAME" --kernel --all --uid
> # lttng untrack --session="$SESSION_NAME" --kernel --all --vuid
> # lttng untrack --session="$SESSION_NAME" --kernel --all --vgid
> # only enable gid 1002 track
> lttng track --kernel --gid=1002
> 

Could you check the output of your script after "lttng track --kernel 
--gid=1002"?

The rest of your commands specify a session name, but this one does not. 
I wonder if  it's selecting a different default session that the one 
you're expecting?

> # start lttng lttng start $SESSION_NAME
> 
> ```
> 
> Thank you for your time and guidance.
> 
> Best regards,
> Amir
> 
> -- 
> *Amirhossein Najafizadeh*
> *PhD Student, Computer Science Department, Stony Brook University, N.Y.
> File systems and Storage Lab (FSL)
> 
> *
> najafizadeh21@gmail.com <mailto:najafizadeh21@gmail.com>
> https://amirhnajafiz.github.io/ <https://amirhnajafiz.github.io/>


  reply	other threads:[~2026-04-07 14:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-05  1:02 Amir Najafi Zadeh via lttng-dev
2026-04-07 14:57 ` Kienan Stewart via lttng-dev [this message]
2026-04-07 15:14   ` Amir Najafi Zadeh via lttng-dev
2026-04-08 18:28     ` Kienan Stewart via lttng-dev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4a6fd540-da30-419e-b311-1fdf17306cef@efficios.com \
    --to=lttng-dev@lists.lttng.org \
    --cc=anajafizadeh@cs.stonybrook.edu \
    --cc=kstewart@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox