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