7 lttng-track - Add one or more entries to an LTTng resource tracker
13 *lttng* ['GENERAL OPTIONS'] *track* (option:--kernel | option:--userspace)
14 [option:--session='SESSION'] (option:--pid='PID'[,'PID']... | option:--all option:--pid)
19 The `lttng track` commands adds one or more entries to a
22 A resource tracker is a _whitelist_ of resources. Tracked resources are
23 allowed to emit events, provided those events are targeted by enabled
24 event rules (see linklttng:lttng-enable-event(1)).
26 Tracker entries can be removed from the whitelist with
27 linklttng:lttng-untrack(1).
29 As of this version, the only available tracker is the *PID tracker*. The
30 process ID (PID) tracker follows one or more process IDs; only the
31 processes with a tracked PID are allowed to emit events. By default, all
32 possible PIDs on the system are tracked: any process may emit enabled
33 events (equivalent of `lttng track --pid --all` for all domains).
35 With the PID tracker, it is possible, for example, to record all system
36 calls called by a given process:
38 -------------------------------------------
39 lttng enable-event --kernel --all --syscall
40 lttng track --kernel --pid=2345
42 -------------------------------------------
44 If all the PIDs are tracked (i.e. `lttng track --pid --all`, which is
45 the default state of all domains when creating a tracing session), then
46 using the track command with one or more specific PIDs has the effect of
47 first removing all the PIDs from the whitelist, then adding the
53 Assume the maximum system PID is 7 for this example.
57 -------------------------------
58 [0] [1] [2] [3] [4] [5] [6] [7]
59 -------------------------------
63 -----------------------------------
64 lttng track --userspace --pid=3,6,7
65 -----------------------------------
69 -------------------------------
70 [ ] [ ] [ ] [3] [ ] [ ] [6] [7]
71 -------------------------------
75 ---------------------------------
76 lttng untrack --userspace --pid=7
77 ---------------------------------
81 -------------------------------
82 [ ] [ ] [ ] [3] [ ] [ ] [6] [ ]
83 -------------------------------
87 ---------------------------------
88 lttng track --userspace --pid=1,5
89 ---------------------------------
93 -------------------------------
94 [ ] [1] [ ] [3] [ ] [5] [6] [ ]
95 -------------------------------
97 It should be noted that the PID tracker tracks the numeric process IDs.
98 Should a process with a given ID exit and another process be given this
99 ID, then the latter would also be allowed to emit events.
101 See the linklttng:lttng-untrack(1) for more details about removing
105 include::common-cmd-options-head.txt[]
112 option:-k, option:--kernel::
113 Track resources in the Linux kernel domain.
115 option:-u, option:--userspace::
116 Track resources in the user space domain.
121 option:-s, option:--session='SESSION'::
122 Track resources in the tracing session named 'SESSION' instead of
123 the current tracing session.
128 option:-a, option:--all::
129 Used in conjunction with an empty option:--pid option: track _all_
130 process IDs (add all entries to the whitelist).
132 option:-p, option:--pid[='PID'[,'PID']...]::
133 Track process IDs 'PID' (add them to the current whitelist).
135 The 'PID' argument must be omitted when also using the option:--all
139 include::common-cmd-help-options.txt[]
142 include::common-cmd-footer.txt[]
147 linklttng:lttng-untrack(1),