From mboxrd@z Thu Jan 1 00:00:00 1970 From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers) Date: Tue, 1 Sep 2020 09:37:40 -0400 (EDT) Subject: [lttng-dev] How to use the lttng-untrack command In-Reply-To: <6e9da9cb.16e65.17448f14499.Coremail.xiongyuhua@zju.edu.cn> References: <6e9da9cb.16e65.17448f14499.Coremail.xiongyuhua@zju.edu.cn> Message-ID: <1835947492.25584.1598967460978.JavaMail.zimbra@efficios.com> ----- On Sep 1, 2020, at 5:13 AM, ??? wrote: > Hi?dear > Hello, I have encountered some problems in using LTTNG, which is briefly > described as follows. I am eager to get your help. > About the use of the untrack command.It is reproduced as follows: > I type the following commands in turn to start LTTNG, and set up not to monitor > a particular process.(For example, I input the "top" command in the terminal, > the PID of the "top" process is 72598, now I want LTTNG not to monitor the > "top" process) > 1. lttng create my-kernel-session --output=/tmp/my-kernel-trace > 2. lttng add-context -k -t pid > 3. lttng add-context -k -t tid > 4. lttng enable-event --kernel --all > 5. lttng untrack --kernel --pid=72598 > 6. lttng start > 7. lttng destroy > 8. babeltrace2 /tmp/my-kernel-trace > babeltrace.txt > Unfortunately, the output still contains the data for PID72598. > Even after I changed "lttng untrack --kernel -- PID =72598" to "LTTNG untrack-u > -- PID =72598", this phenomenon still occurred. > How do I use the lttng-untrack command to achieve my goal? Based on the lttng-track(1) man page: The lttng track commands adds one or more values to a process attribute tracker. A process attribute tracker is an inclusion set of process attributes. Tracked processes are allowed to emit events, provided those events are targeted by enabled event rules (see lttng-enable-event(1)). Tracker values can be removed from an inclusion set with lttng- untrack(1). What you are looking for is a an "exclusion set", which does not exist at this point in LTTng. Thanks, Mathieu > Looking forward to your reply. > thanks, > yuhua > ------------------ > Yuhua Xiong > Lab for Internet and Security Technology > School of Computer Science and Technology > Zhejiang University > Hangzhou, 310007, P.R. China -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1598951079297.png Type: image/png Size: 228995 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1598951286057.png Type: image/png Size: 382880 bytes Desc: not available URL: