lttng-dev.lists.lttng.org archive mirror
 help / color / mirror / Atom feed
* [lttng-dev] Filtering tracing by process name or PID/TID
@ 2023-02-15  9:09 Rengar Stinkt via lttng-dev
  2023-02-15 19:33 ` Mathieu Desnoyers via lttng-dev
  0 siblings, 1 reply; 2+ messages in thread
From: Rengar Stinkt via lttng-dev @ 2023-02-15  9:09 UTC (permalink / raw)
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 1599 bytes --]

Dear community,

I only recently started working with lttng tracing due to work related
projects, so I am very new to this. I have done some research before
posting this but I can't seem to find an answer.
I am running several CPU load tests for specific processes on different
devices using lttng and TraceCompass for visualization. I am running into
the issue that 99.9% of traced processes are not of value to me and the
tracing files get extremely big and hard to work with (filtering with
TraceCompass is very slow).
Now I thought of filtering the processes before tracing and I found
filtering by PID and TID. The issue with this is that the PIDs and TIDs are
unique on each device but change between devices.
I then found the command "htop -d 0.1 -u **String**" to see currently
running processes with a certain name.
Now if I run this it shows me the running process IF they are running. I
have time triggered and event triggered processes. There are many
inconvenient workarounds to make it work, like triggering the events and
finding out the PID and then manually copying all of the IDs and pasting
them into "lttng track --kernel --pid=""". But I am trying to find a way to
either filter by name right away, avoiding relying on PIDs or at least to
have an automated process of doing it. But I am unfamiliar with running
code in the PuTTY terminal that we are using, so I am trying to avoid this
(for now). If this is the only option though, I will have to look into it.
Is there any way to filter by name right away like in the mentioned htop
command?

Thank you so much in advance.
Dom

[-- Attachment #1.2: Type: text/html, Size: 1892 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [lttng-dev] Filtering tracing by process name or PID/TID
  2023-02-15  9:09 [lttng-dev] Filtering tracing by process name or PID/TID Rengar Stinkt via lttng-dev
@ 2023-02-15 19:33 ` Mathieu Desnoyers via lttng-dev
  0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Desnoyers via lttng-dev @ 2023-02-15 19:33 UTC (permalink / raw)
  To: lttng-dev

On 2023-02-15 04:09, Rengar Stinkt via lttng-dev wrote:
> Dear community,
> I only recently started working with lttng tracing due to work related 
> projects, so I am very new to this. I have done some research before 
> posting this but I can't seem to find an answer.
> I am running several CPU load tests for specific processes on different 
> devices using lttng and TraceCompass for visualization. I am running 
> into the issue that 99.9% of traced processes are not of value to me and 
> the tracing files get extremely big and hard to work with (filtering 
> with TraceCompass is very slow).
> Now I thought of filtering the processes before tracing and I found 
> filtering by PID and TID. The issue with this is that the PIDs and TIDs 
> are unique on each device but change between devices.
> I then found the command "htop -d 0.1 -u **String**" to see currently 
> running processes with a certain name.
> Now if I run this it shows me the running process IF they are running. I 
> have time triggered and event triggered processes. There are many 
> inconvenient workarounds to make it work, like triggering the events and 
> finding out the PID and then manually copying all of the IDs and pasting 
> them into "lttng track --kernel --pid=""". But I am trying to find a way 
> to either filter by name right away, avoiding relying on PIDs or at 
> least to have an automated process of doing it. But I am unfamiliar with 
> running code in the PuTTY terminal that we are using, so I am trying to 
> avoid this (for now). If this is the only option though, I will have to 
> look into it.
> Is there any way to filter by name right away like in the mentioned htop 
> command?
> Thank you so much in advance.

This would be:

lttng enable-event -k event_name --filter '$ctx.procname == "string"'

Where "string" can include wildcards as well.

Hoping this helps,

Mathieu


> Dom
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-15 19:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-15  9:09 [lttng-dev] Filtering tracing by process name or PID/TID Rengar Stinkt via lttng-dev
2023-02-15 19:33 ` Mathieu Desnoyers via lttng-dev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).