From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YPY3KKjoOmlPrzQAWB0awg (envelope-from ) for ; Thu, 11 Dec 2025 10:52:08 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=lists.lttng.org header.i=@lists.lttng.org header.a=rsa-sha256 header.s=mx header.b=YOlRz3hg; dkim=pass (2048-bit key; unprotected) header.d=lists.lttng.org header.i=@lists.lttng.org header.a=rsa-sha256 header.s=default header.b=Q7+H6Rwf; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 8DBC81E08D; Thu, 11 Dec 2025 10:52:08 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no autolearn_force=no version=4.0.1 Received: from m43-10.mailgun.net (m43-10.mailgun.net [69.72.43.10]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with UTF8SMTPS id CE1A01E08D for ; Thu, 11 Dec 2025 10:52:07 -0500 (EST) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=lists.lttng.org; q=dns/txt; s=mx; t=1765468326; x=1765475526; h=Sender: Sender: Cc: Reply-To: From: From: List-Subscribe: List-Help: List-Post: List-Archive: List-Unsubscribe: List-Id: Content-Type: To: To: Subject: Subject: Message-ID: Date: In-Reply-To: References: MIME-Version; bh=kJmTKz6JPil/PKDQ9CMsVnoUT0nRBdACic6NnrUwuH4=; b=YOlRz3hgHrnEVAnmzIf7m8cVRzuPFMrKOTRJOMpJaydPDvGMFu5kK64pH6hm4BmrTOIw0uI62d/YiiSJASkt0oPt5Rs0s8LwR5sEmmGxpSOad0Lv24SVMrD5VAB5VFxFodrF0bYgGgyw895YAEh4bqSZvh8VjDGSn7D9Bq38nBP1VHU9Z8RMWV5GM/47jM2dwuvPjn765bVY5iqieUwZO5AemE9oDKl1hgnkvtdy4cEcaHv4VBI1Hdl/BexSrvgggJkx3sHNBrhruBHKlYSUtLG+hRjZTetgOYboOuVEDnE4qg3W98OTxHmXrcv32vTMVKsIM//02hxHq0CYW3tGLQ== X-Mailgun-Sid: WyJkOTk2OCIsInB1YmxpYy1pbmJveEBzaW1hcmsuY2EiLCI2MDIzMjMiXQ== Received: from lists.lttng.org (lists.lttng.org [158.69.130.29]) by 458061b74e3732d1fd6a2ba5c8f257e414367eec0fed349d1b0f30542a2c6e9c with SMTP id 693ae8a6eb1ab326a9fd5a60 (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Thu, 11 Dec 2025 15:52:06 GMT X-Mailgun-Sending-Ip: 69.72.43.10 ARC-Filter: OpenARC Filter v1.2.1 lists.lttng.org 4dRxsx2klCz1wwn ARC-Seal: i=1; d=lists.lttng.org; s=arc1; a=rsa-sha256; cv=none; t=1765468325; b=KVVO2SJvnyWytI+o8pJcLBqZnsWSqEHUMKCeE4iwXHlMExdM5tdSHloG0Mdpdr973Wf8 uRDmXOZXEWAkS+htVeNWdKC54+9XcGMimRQc+C5Jq5a5iq9voEL1cn2QNIWj4gqzGbO32 IzUedzRgHykGRQLLl4d9of5zywoqkj6CoZkdToLKQ58TdrjagjQp5dmDFUtLLSKHJODtl RmwS3SlhgaIPjFUV09mNCpxGlL7ebT1k7cjVDGC0PLAc+vBjSBmzGoxAq8dHgATQ0ePUJ PyRJN2eVm3IbuuWpvJxQjLBfYackqpYRHgyatYEpbZKeppLve/e+DxUp9LSGb0ASCUQ== ARC-Message-Signature: i=1; d=lists.lttng.org; s=arc1; a=rsa-sha256; c=relaxed/simple; t=1765468325; h=DKIM-Signature:MIME-Version:Date:Message-ID:Subject:To:From:From; bh=PsboBVm+q1aVBO/WzDmo9zFQCvzDg0EwuHMzk5CgLqM=; b=gVYBOv7owzKcCWuM1BtYeMuS5Stn1oyzN9KbxGGAbMbOYbA8TENKdcrNagyF3P8mm4a7 l7N9voSpIjKjKY6neORppu5JfcIpt2UGIzUfg9aRlaburZQ7/eZRGMw+amWLJTrRZ1uax bQHXe7ztnHC0J5TyN18f1fdPLuH3Q9CGkPz68bj4FmKgw+esRAbg2y5lSypTyvQN1ngff Kv3+Jqn1yHhmVar3xDyBG2zTfypNquTTrENKdC1M4ZmLBIkmD3CNHZv+uErLKjM4VwhW8 hxfOpFDArAJhvuXBRFwGUeLDSf5Y975KLRuhOoqhBBQjvBABdh6GSkApLYgEo3Oi0tQ== ARC-Authentication-Results: i=1; lists.lttng.org; arc=none smtp.remote-ip="::1" DKIM-Filter: OpenDKIM Filter v2.11.0 lists.lttng.org 4dRxsx2klCz1wwn DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1765468325; bh=PsboBVm+q1aVBO/WzDmo9zFQCvzDg0EwuHMzk5CgLqM=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Q7+H6RwfM2baHl0SJXy5L8IU39EVFFIoQxJQQvqanadXaT6e7gQmtUj67A0VGoetc kGLJezT0+uh0Xax6PS+t5tqHyoH6fphh+37JNe2SOGVSI0rVQGvPnNbdSzzNEoJU7A Oyaifi0cA7h4WXDdcL3CKhdvPSJLuCdGTTxwv4Gz2sQ5YEH8YJZuSabiDBrSmlLWqY UdWVAVQgUCLgDnpLgIRliDgs7GLWGRLrHJMAGtd7r3rHk+dx/SLtnmEFD4VV8lJYyn f+i10Tgum3K3xmf+gOIqRWFMQYL30TKoOXKEdz+QYfP1KoQOAnXo4Pji5Pqg16GU0X XNMZRGJGC4vQw== Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4dRxsx2klCz1wwn; Thu, 11 Dec 2025 10:52:05 -0500 (EST) ARC-Filter: OpenARC Filter v1.2.1 lists.lttng.org 4dRxsw4GGkz1wLB DKIM-Filter: OpenDKIM Filter v2.11.0 lists.lttng.org 4dRxsw4GGkz1wLB Received: from mail-oo1-xc33.google.com (mail-oo1-xc33.google.com [IPv6:2607:f8b0:4864:20::c33]) by lists.lttng.org (Postfix) with ESMTPS id 4dRxsw4GGkz1wLB for ; Thu, 11 Dec 2025 10:52:04 -0500 (EST) Received: by mail-oo1-xc33.google.com with SMTP id 006d021491bc7-65745a436f7so134873eaf.3 for ; Thu, 11 Dec 2025 07:52:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765468323; x=1766073123; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kJmTKz6JPil/PKDQ9CMsVnoUT0nRBdACic6NnrUwuH4=; b=lzlOq/9IuKHPZBn3YNtjE/G6WnXTqLziohDhqePmp038SjuC8ouJvEWT+i6Uq6v7a9 qvHfMHBLjuAj0jJKShnuyYZCmTUjLwKqtsOHbx9WLZv6JXumvS+k5d2l2NKpAIyeoPoJ rH5nSB9K5jWK0HpPpgyoNkrIa0P1ShF/UoMTubNgxn9hKrdjP7LsSfRZDuXI59Bs/Gak M8GYRC8HRcih3jCnI8RPlR78gURK9BIbLPEdR8f4x4OGsCkXbZNBUhpQDBXUIx7X7VOX J2VmuzmUaxE6pjpiMh6p2JXMg9TtzW0B076BGMuPSqlg/kq5TFHx4j/Aq9GWydMNVT9Z H8lQ== X-Forwarded-Encrypted: i=1; AJvYcCXKGvf0oBw7QVz0OMKJ/tZWCra44V6H4LelHrmKeptUjUDkKLJXQhWpZxACPtSu8b40asE1rMpi3LU=@lists.lttng.org X-Gm-Message-State: AOJu0Yx6Pthjhzv9NnJwzqNS6hnFWSqnjzsnZ5Gf5rmmGnYYRbNsPn8P gf/0OnSkv1zOHVQNy8bCJ68l8RkRNlak94OVibuGuxDhKzwU6Lu4t3ubGgd0QQlEbAein1wBAXL w+ZznXZ3608zo/JIdRnnRhts0ppy6Xq2wtRCgW0usRg== X-Gm-Gg: AY/fxX5HRXEVhwBr3Eeq3w2x8doQj2AoKHP+JTJ8MGck56jShn6/eTcHjKav/LqR/mi 9OKjPM3sgFp/foPSk+8kyGRDxcFEe9plPhAa6V0WwHYK/PWs+cDdJojrzlj9n9rRdBS4yums+/g ViU/s1Lg18b2zvWN5EDcM1/autHfBm6E0svsQMnkk3iPUBXspxrks9aTFL6/HPuPuKJPNbNVdCP +CoSDBeFxsX+wCO9Pg+sOXlnpuhPViqlW/8uZSJq8tsZCTMWeXoaOyTQQIJ+9t/4hVqth0dis8w BSJAc5B9xKEA4wJTAEYfKk7MdvOureTN90AsfA== X-Google-Smtp-Source: AGHT+IHPZ0cdemRUDw0ZwLEbhiiSEZfIe85gFCY24U6WOy0Z4IaLRPoB/0lA6lsHLAEYA0FLMaNX7yWoTGY94vwPRHU= X-Received: by 2002:a05:6820:f48:b0:659:9a49:8f8a with SMTP id 006d021491bc7-65b2ad07bccmr3286911eaf.79.1765468322927; Thu, 11 Dec 2025 07:52:02 -0800 (PST) MIME-Version: 1.0 References: <87a7e3d3-3ce2-4ded-acdf-bc7f152cdcec@efficios.com> <073db198-6792-4caa-81f5-ac65f5d76f1e@efficios.com> In-Reply-To: <073db198-6792-4caa-81f5-ac65f5d76f1e@efficios.com> Date: Thu, 11 Dec 2025 10:51:50 -0500 X-Gm-Features: AQt7F2qBuf-LfZxkPQ0YPaEWkjE7fX97UAtAlx68PAsgBj41r1LgoqstnWUYM6k Message-ID: Subject: Re: Question about LTTng Context To: Michael Jeanson Content-Type: multipart/alternative; boundary="0000000000004025e40645af20ad" X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Amir Najafi Zadeh via lttng-dev Reply-To: Amir Najafi Zadeh Cc: lttng-dev@lists.lttng.org Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" --0000000000004025e40645af20ad Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Michael, Kienan, Thank you both for your replies. As you mentioned the cgroup namespace, it isn=E2=80=99t very helpful in some cases. Containers m= ay share the same cgroup namespace, and the container runtime often avoids giving each container a private cgroup namespace for performance and security reasons. Because of this, the cgroup namespace can=E2=80=99t be used as a r= eliable or unique label for filtering trace logs. In my case, with container-d you can inspect a container, find its PID, and then check /proc//ns/cgroup, but you=E2=80=99ll see that different con= tainers often have the same cgroup namespace ID (e.g., in the following logs you can see the calico-node and kube-proxy containers sharing a cgroup ns). ``` Name: calico-node CID: b5624afe31b005725f4ba53c7b6fe758f3c09fabf013085231ff8b97588f6ace PID: 2243 cgroup_ns_inode: 4026531835 Name: kube-proxy CID: 52f3c12def7a680f61a925ac92dd5ebd5eba6cad17d671efbfd1d40db7dff624 PID: 1851 cgroup_ns_inode: 4026531835 >> MATCH FOUND: shares ns with container: b5624afe31b005725f4ba53c7b6fe758f3c09fabf013085231ff8b97588f6ace (calico-node) ``` Thanks again for your answers. I hope this feature appears in a future patch. Best, Amir On Thu, Dec 11, 2025 at 9:57=E2=80=AFAM Michael Jeanson wrote: > On 12/11/25 09:30, Kienan Stewart via lttng-dev wrote: > > Hi Amir, > > > > On 12/10/25 9:40 PM, Amir Najafi Zadeh via lttng-dev wrote: > >> Hello everyone, > >> > >> I hope you=E2=80=99re doing well. My name is Amir, and I=E2=80=99m a P= hD student in > >> the Computer Science department at Stony Brook University, New York. > >> > >> I have a question about the LTTng context that I haven=E2=80=99t been = able to > >> find an answer for in the docs or man pages. Does LTTng support adding > >> the cgroup ID or cgroup path as a context field? I want to filter my > >> trace results based on cgroups. > >> > > > > I think you're looking for the `cgroup_ns` context which adds the inum > > of the cgroup namespace as a context field. > > This will give you the ID of the cgroup namespace but we don't have > contexts for cgroups themselves. It's probably something we would like > to have but there is no concrete plans on implementing this at the moment= . > > > > >> If this isn=E2=80=99t supported, are there any plans to add it in futu= re > >> versions, such as 2.14? > >> > >> For reference, I=E2=80=99m currently using LTTng 2.13 on Ubuntu 24.04 = with > >> kernel 6.8.0-87-generic. > >> > >> Cheers, > >> Amir > >> -- > >> *Amirhossein Najafizadeh* > >> *PhD Student, Computer Science Department, Stony Brook University, N.Y= . > >> File systems and Storage Lab (FSL) > --0000000000004025e40645af20ad Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Michael, Kienan, Thank you both for your replies. As you m= entioned the cgroup namespace, it isn=E2=80=99t very helpful in some cases.= Containers may share the same cgroup namespace, and the container runtime = often avoids giving each container a private cgroup namespace for performan= ce and security reasons. Because of this, the cgroup namespace can=E2=80=99= t be used as a reliable or unique label for filtering trace logs.

In= my case, with container-d you can inspect a container, find its PID, and t= hen check /proc/<pid>/ns/cgroup, but you=E2=80=99ll see that differen= t containers often have the same cgroup namespace ID (e.g., in the followin= g logs you can see the calico-node and kube-proxy containers sharing a cgro= up ns).

```
Name: calico-node =C2=A0CID: b5624afe31b005725f4ba53c= 7b6fe758f3c09fabf013085231ff8b97588f6ace =C2=A0PID: 2243 =C2=A0cgroup_ns_in= ode: 4026531835
Name: kube-proxy =C2=A0CID: 52f3c12def7a680f61a925ac92dd= 5ebd5eba6cad17d671efbfd1d40db7dff624 =C2=A0PID: 1851 =C2=A0cgroup_ns_inode:= 4026531835
=C2=A0 >> MATCH FOUND: shares ns with container: b5624= afe31b005725f4ba53c7b6fe758f3c09fabf013085231ff8b97588f6ace (calico-node)```

Thanks again for your answers. I hope this feature appears in = a future patch.

Best,
Amir

On Thu, Dec 11, 2= 025 at 9:57=E2=80=AFAM Michael Jeanson <mjeanson@efficios.com> wrote:
On 12/11/25 09:30, Kienan Stewart via lttng-d= ev wrote:
> Hi Amir,
>
> On 12/10/25 9:40 PM, Amir Najafi Zadeh via lttng-dev wrote:
>> Hello everyone,
>>
>> I hope you=E2=80=99re doing well. My name is Amir, and I=E2=80=99m= a PhD student in
>> the Computer Science department at Stony Brook University, New Yor= k.
>>
>> I have a question about the LTTng context that I haven=E2=80=99t b= een able to
>> find an answer for in the docs or man pages. Does LTTng support ad= ding
>> the cgroup ID or cgroup path as a context field? I want to filter = my
>> trace results based on cgroups.
>>
>
> I think you're looking for the `cgroup_ns` context which adds the = inum
> of the cgroup namespace as a context field.

This will give you the ID of the cgroup namespace but we don't have contexts for cgroups themselves. It's probably something we would like =
to have but there is no concrete plans on implementing this at the moment.<= br>
>
>> If this isn=E2=80=99t supported, are there any plans to add it in = future
>> versions, such as 2.14?
>>
>> For reference, I=E2=80=99m currently using LTTng 2.13 on Ubuntu 24= .04 with
>> kernel 6.8.0-87-generic.
>>
>> Cheers,
>> Amir
>> --
>> *Amirhossein Najafizadeh*
>> *PhD Student, Computer Science Department, Stony Brook University,= N.Y.
>> File systems and Storage Lab (FSL)
--0000000000004025e40645af20ad--