From: Mathieu Desnoyers via lttng-dev <lttng-dev@lists.lttng.org>
To: lttng-dev@lists.lttng.org
Subject: Re: [lttng-dev] Filtering tracing by process name or PID/TID
Date: Wed, 15 Feb 2023 14:33:18 -0500 [thread overview]
Message-ID: <2ccf0476-b0fd-7123-0822-521d78c95c29@efficios.com> (raw)
In-Reply-To: <CAJw2uSD1OacdHRbppqUk4tmDM7JXoTo1z2tF6eLUmcWke+a6aA@mail.gmail.com>
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
prev parent reply other threads:[~2023-02-15 19:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=2ccf0476-b0fd-7123-0822-521d78c95c29@efficios.com \
--to=lttng-dev@lists.lttng.org \
--cc=mathieu.desnoyers@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).