Update the remaining manual pages for LTTng-tools 2.13
[lttng-tools.git] / doc / man / lttng-add-context.1.txt
... / ...
CommitLineData
1lttng-add-context(1)
2====================
3:revdate: 3 May 2021
4
5
6NAME
7----
8lttng-add-context - Add context fields to be recorded by LTTng
9
10
11SYNOPSIS
12--------
13Add context fields to be recorded to the event records of one or more
14channels:
15
16[verse]
17*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *add-context*
18 (option:--kernel | option:--userspace | option:--jul | option:--log4j)
19 [option:--session='SESSION'] [option:--channel='CHANNEL']
20 option:--type='TYPE' [option:--type='TYPE']...
21
22List the available context field types:
23
24[verse]
25*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *add-context* option:--list
26
27
28DESCRIPTION
29-----------
30The `lttng add-context` command can:
31
32Without the option:--list option::
33 Add one or more context fields to be recorded by LTTng to the event
34 records of a given channel, or of all the channels of:
35+
36With the option:--session='SESSION' option:::
37 The tracing session named 'SESSION'.
38
39Without the option:--session option:::
40 The current tracing session (see man:lttng-concepts(7) to learn more
41 about the current tracing session).
42
43With the option:--list option::
44 List the available context field types.
45
46See man:lttng-concepts(7) to learn more about tracing sessions and
47channels.
48
49Without the option:--channel option, LTTng adds context fields to be
50recorded to the event records of *all* the channels of the selected
51tracing session.
52
53Repeat the option:--type='TYPE' option to add more than one context
54field to be recorded. 'TYPE' is one of:
55
56* A statically-known, or built-in context field named.
57
58* A perf counter name:
59+
60--
61Per-CPU::
62 Prefix: `perf:cpu:`
63+
64Only available with the option:--kernel option.
65
66Per-thread::
67 Prefix: `perf:thread:`
68+
69Only available with the option:--userspace, option:--jul, or
70option:--log4j option.
71--
72+
73Add Performance Monitoring Unit (PMU) counter context fields by raw ID
74with the ++perf:cpu:raw:r++__N__++:++__NAME__ (option:--kernel option)
75or ++perf:thread:raw:r++__N__++:++__NAME__ (option:--userspace,
76option:--jul, or option:--log4j option) types, with:
77+
78--
79'N'::
80 A hexadecimal event descriptor which follows the man:perf-record(1)
81 format: a concatenation of the event number and umask value which
82 the manufacturer of the processor provides.
83+
84The possible values for this part are processor-specific.
85
86'NAME'::
87 Custom name to identify the counter.
88--
89
90* An LTTng application-specific context field name:
91+
92[verse]
93$app.'PROVIDER':__TYPE__
94+
95'PROVIDER'::
96 Provider name.
97
98'TYPE'::
99 Context type name.
100
101IMPORTANT: Make sure to **single-quote** 'TYPE' when you run the
102`add-context` command from a shell, as `$` is a special character for
103variable substitution in most shells.
104
105NOTE: As of LTTng{nbsp}{lttng_version}, you may :not: add context fields
106to be recorded to the event records of a given channel once its tracing
107session has been started (see man:lttng-start(1)) at least once.
108
109
110include::common-cmd-options-head.txt[]
111
112
113Tracing domain
114~~~~~~~~~~~~~~
115One of:
116
117option:-j, option:--jul::
118 Add context fields to be recorded to the event records of one or
119 more channels of the `java.util.logging` (JUL) tracing domain.
120
121option:-k, option:--kernel::
122 Add context fields to be recorded to the event records of one or
123 more channels of the Linux kernel tracing domain.
124
125option:-l, option:--log4j::
126 Add context fields to be recorded to the event records of one or
127 more channels of the Apache log4j tracing domain.
128
129option:-u, option:--userspace::
130 Add context fields to be recorded to the event records of one or
131 more channels of the user space tracing domain.
132
133
134Recording target
135~~~~~~~~~~~~~~~~
136option:-c 'CHANNEL', option:--channel='CHANNEL'::
137 Add context fields to be recorded to the event records of a channel
138 named 'CHANNEL' instead of all the channels of the selected
139 tracing session.
140
141option:-s 'SESSION', option:--session='SESSION'::
142 Add context fields to be recorded to the event records of one or
143 more channels of the tracing session named 'SESSION' instead of the
144 current tracing session.
145
146
147Context field type
148~~~~~~~~~~~~~~~~~~
149option:--list::
150 List the available context field types.
151+
152You may :not: use this option with the option:--channel,
153option:--session, or option:--type options.
154
155option:-t 'TYPE', option:--type='TYPE'::
156 Add a context field having the type 'TYPE' to be recorded.
157+
158Repeat this option to add more than one context field.
159
160
161include::common-cmd-help-options.txt[]
162
163
164include::common-cmd-footer.txt[]
165
166
167SEE ALSO
168--------
169man:lttng(1),
170man:lttng-concepts(7),
171man:lttng-enable-channel(1)
This page took 0.023462 seconds and 4 git commands to generate.