8 lttng-track - Allow specific processes to record LTTng events
13 Allow specific processes to record Linux kernel events:
16 *lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *track* option:--kernel [option:--session='SESSION']
17 (option:--pid=PID[,PID]... | option:--vpid=VPID[,VPID]... |
18 option:--uid=UID[,UID]... | option:--vuid=VUSER[,VUSER]... |
19 option:--gid=GID[,GID]... | option:--vgid=VGROUP[,VGROUP]...)...
23 *lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *track* option:--kernel [option:--session='SESSION']
24 option:--all (option:--pid | option:--vpid | option:--uid | option:--vuid | option:--gid | option:--vgid)...
26 Allow specific processes to record user space events:
29 *lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *track* option:--userspace [option:--session='SESSION']
30 (option:--vpid=VPID[,VPID]... | option:--vuid=VUSER[,VUSER]... |
31 option:--vgid=VGROUP[,VGROUP]...)...
34 *lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *track* option:--userspace [option:--session='SESSION']
35 option:--all (option:--vpid | option:--vgid | option:--vuid)...
40 The `lttng track` command allows one or more processes to record LTTng
41 events based on their attributes within:
43 With the option:--session='SESSION' option::
44 The tracing session named 'SESSION'.
46 Without the option:--session option::
47 The current tracing session (see man:lttng-concepts(7) to learn more
48 about the current tracing session).
50 See man:lttng-concepts(7) to learn more about tracing sessions and
51 recording event rules.
53 The `track` command adds values to _inclusion sets_ of process
54 attributes. The available inclusion sets are, for a given tracing
57 With the option:--kernel option::
61 * Virtual process ID (VPID).
63 This is the PID as seen by the application.
67 * Virtual Unix user ID (VUID).
69 This is the UID as seen by the application.
71 * Unix group ID (GID).
73 * Virtual Unix group ID (VGID).
75 This is the GID as seen by the application.
77 With the option:--userspace option::
83 When an event{nbsp}__E__ satisfies all the other explicit and implicit
84 conditions of an event rule{nbsp}__ER__, __ER__ matches{nbsp}__E__ if
85 the attributes of the process for which LTTng creates{nbsp}__E__ are
86 *all* part of the inclusion sets of the tracing session and domain
89 By default, on tracing session creation (see man:lttng-create(1)),
90 all processes are allowed to record events. In other words, all the
91 inclusion sets of the tracing session contain all the possible
92 process attribute values.
94 If a given inclusion set{nbsp}__IS__ contains all the possible values
95 (option:--all option), then using the `track` command to add one or more
96 values{nbsp}__V__ to{nbsp}__IS__:
98 . Removes all the values from{nbsp}__IS__.
100 This effectively makes{nbsp}__IS__ empty.
102 . Adds{nbsp}__V__ to{nbsp}__IS__.
104 Example: with the PID inclusion set, you can record all the system calls
109 $ lttng enable-event --kernel --all --syscall
110 $ lttng track --kernel --pid=2345
114 Remove values from an inclusion set with the man:lttng-untrack(1)
118 Inclusion set example
119 ~~~~~~~~~~~~~~~~~~~~~
120 This example operates on the Linux kernel process ID (PID) inclusion set
121 of the current tracing session to show how an inclusion set works.
123 Assume the maximum system PID is 7 for this example.
125 . Initial inclusion set:
127 -------------------------------
128 [0] [1] [2] [3] [4] [5] [6] [7]
129 -------------------------------
135 $ lttng track --kernel --pid=3,6,7
138 Inclusion set is now:
140 -------------------------------
141 [ ] [ ] [ ] [3] [ ] [ ] [6] [7]
142 -------------------------------
148 $ lttng untrack --kernel --pid=7
151 Inclusion set is now:
153 -------------------------------
154 [ ] [ ] [ ] [3] [ ] [ ] [6] [ ]
155 -------------------------------
161 $ lttng track --kernel --pid=1,5
164 Inclusion set is now:
166 -------------------------------
167 [ ] [1] [ ] [3] [ ] [5] [6] [ ]
168 -------------------------------
170 Remove values from an inclusion set with the man:lttng-untrack(1)
174 include::common-cmd-options-head.txt[]
181 option:-k, option:--kernel::
182 Add values to one or more Linux kernel inclusion sets.
184 option:-u, option:--userspace::
185 Add values to one or more user space inclusion sets.
189 option:-s 'SESSION', option:--session='SESSION'::
190 Add values to one or more inclusion sets of the tracing session
191 named 'SESSION' instead of the current tracing session.
194 Inclusion set selection
195 ~~~~~~~~~~~~~~~~~~~~~~~
196 option:-p ['PID'[,'PID']...], option:--pid[='PID'[,'PID']...]::
197 For each 'PID' argument, add 'PID' to the process ID inclusion set
198 of the selected tracing session and domain.
200 'PID' is the process ID attribute of a process as seen from the root
201 PID namespace (see man:pid_namespaces(7)).
203 Only available with option:--kernel option.
205 option:--vpid[='VPID'[,'VPID']...]::
206 For each 'VPID' argument, add 'VPID' to the virtual process ID
207 inclusion set of the selected tracing session and domain.
209 'VPID' is the virtual process ID attribute of a process as seen from
210 the PID namespace of the process (see man:pid_namespaces(7)).
212 option:--uid[='USER'[,'USER']...]::
213 For each 'USER' argument, add 'USER' to the user ID inclusion set of
214 the selected tracing session and domain.
219 * The real user ID (see man:getuid(3)) of a process as seen
220 from the root user namespace (see man:user_namespaces(7)).
224 The connected LTTng session daemon (see man:lttng-sessiond(8)) performs
225 the user name resolution on addition to the user ID inclusion set.
228 Only available with option:--kernel option.
230 option:--vuid[='VUSER'[,'VUSER']...]::
231 For each 'VUSER' argument, add 'VUSER' to the virtual user ID
232 inclusion set of the selected tracing session and domain.
237 * The real user ID (see man:getuid(3)) of a process as seen
238 from the user namespace (see man:user_namespaces(7)).
242 The connected LTTng session daemon (see man:lttng-sessiond(8)) performs
243 the user name resolution on addition to the virtual user ID inclusion
247 option:--gid[='GROUP'[,'GROUP']...]::
248 For each 'GROUP' argument, add 'GROUP' to the group ID
249 inclusion set of the selected tracing session and domain.
254 * The real group ID (see man:getgid(3)) of a process as seen from the
255 root user namespace (see man:user_namespaces(7)).
259 The connected LTTng session daemon (see man:lttng-sessiond(8)) performs
260 the group name resolution on addition to the group ID inclusion set.
263 Only available with option:--kernel option.
265 option:--vgid[='VGROUP'[,'VGROUP']...]::
266 For each 'VGROUP' argument, add 'VGROUP' to the virtual group ID
267 inclusion set of the selected tracing session and domain.
272 * The real group ID (see man:getgid(3)) of a process as seen
273 from the user namespace (see man:user_namespaces(7)).
277 The connected LTTng session daemon (see man:lttng-sessiond(8)) performs
278 the group name resolution on addition to the virtual group ID inclusion
283 Inclusion set operation
284 ~~~~~~~~~~~~~~~~~~~~~~~
285 option:-a, option:--all::
286 With one or more empty option:--pid, option:--vpid, option:--uid,
287 option:--vuid, option:--gid, and option:--vgid options: add *all*
288 the possible values to the selected inclusion sets.
291 include::common-cmd-help-options.txt[]
294 include::common-cmd-footer.txt[]
300 man:lttng-untrack(1),
301 man:lttng-concepts(7)