Clean-up shm directory tree after freeing the channel
[lttng-tools.git] / doc / man / lttng-track.1.txt
1 lttng-track(1)
2 ==============
3
4
5 NAME
6 ----
7 lttng-track - Add one or more entries to an LTTng resource tracker
8
9
10 SYNOPSIS
11 --------
12 [verse]
13 *lttng* ['GENERAL OPTIONS'] *track* (option:--kernel | option:--userspace)
14 [option:--session='SESSION'] (option:--pid='PID'[,'PID']... | option:--all option:--pid)
15
16
17 DESCRIPTION
18 -----------
19 The `lttng track` commands adds one or more entries to a
20 resource tracker.
21
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)).
25
26 Tracker entries can be removed from the whitelist with
27 linklttng:lttng-untrack(1).
28
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).
34
35 With the PID tracker, it is possible, for example, to record all system
36 calls called by a given process:
37
38 -------------------------------------------
39 lttng enable-event --kernel --all --syscall
40 lttng track --kernel --pid=2345
41 lttng start
42 -------------------------------------------
43
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
48 specified PIDs.
49
50
51 Example
52 ~~~~~~~
53 Assume the maximum system PID is 7 for this example.
54
55 Initial whitelist:
56
57 -------------------------------
58 [0] [1] [2] [3] [4] [5] [6] [7]
59 -------------------------------
60
61 Command:
62
63 -----------------------------------
64 lttng track --userspace --pid=3,6,7
65 -----------------------------------
66
67 Whitelist:
68
69 -------------------------------
70 [ ] [ ] [ ] [3] [ ] [ ] [6] [7]
71 -------------------------------
72
73 Command:
74
75 ---------------------------------
76 lttng untrack --userspace --pid=7
77 ---------------------------------
78
79 Whitelist:
80
81 -------------------------------
82 [ ] [ ] [ ] [3] [ ] [ ] [6] [ ]
83 -------------------------------
84
85 Command:
86
87 ---------------------------------
88 lttng track --userspace --pid=1,5
89 ---------------------------------
90
91 Whitelist:
92
93 -------------------------------
94 [ ] [1] [ ] [3] [ ] [5] [6] [ ]
95 -------------------------------
96
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.
100
101 See the linklttng:lttng-untrack(1) for more details about removing
102 entries.
103
104
105 include::common-cmd-options-head.txt[]
106
107
108 Domain
109 ~~~~~~
110 One of:
111
112 option:-k, option:--kernel::
113 Track resources in the Linux kernel domain.
114
115 option:-u, option:--userspace::
116 Track resources in the user space domain.
117
118
119 Target
120 ~~~~~~
121 option:-s, option:--session='SESSION'::
122 Track resources in the tracing session named 'SESSION' instead of
123 the current tracing session.
124
125
126 Tracking
127 ~~~~~~~~
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).
131
132 option:-p, option:--pid[='PID'[,'PID']...]::
133 Track process IDs 'PID' (add them to the current whitelist).
134 +
135 The 'PID' argument must be omitted when also using the option:--all
136 option.
137
138
139 include::common-cmd-help-options.txt[]
140
141
142 include::common-cmd-footer.txt[]
143
144
145 SEE ALSO
146 --------
147 linklttng:lttng-untrack(1),
148 linklttng:lttng(1)
This page took 0.034567 seconds and 5 git commands to generate.