doc/man: put short option's argument too
[lttng-tools.git] / doc / man / lttng-add-context.1.txt
CommitLineData
2e4886b8
PP
1lttng-add-context(1)
2====================
3
4
5NAME
6----
7lttng-add-context - Add context fields to an LTTng channel
8
9
10SYNOPSIS
11--------
12Add context fields to a channel:
13
14[verse]
ce19b9ed 15*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *add-context*
2e4886b8
PP
16 (option:--kernel | option:--userspace | option:--jul | option:--log4j)
17 [option:--session='SESSION'] [option:--channel='CHANNEL']
18 option:--type='TYPE' [option:--type='TYPE']...
19
20List the available context fields:
21
22[verse]
d1cff337 23*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *add-context* option:--list
2e4886b8
PP
24
25
26DESCRIPTION
27-----------
28The `lttng add-context` command adds one or more context fields to a
29channel.
30
7c1a4458 31Channels are created with the man:lttng-enable-channel(1) command.
2e4886b8
PP
32
33When context fields are added to a channel, all the events emitted
34within this channel contain the dynamic values of those context fields.
35
36If the option:--session option is omitted, the current tracing session
37is used. If the option:--channel option is omitted, the context fields
38are added to all the selected tracing session's channels.
39
40Many context fields can be added to a channel at once by repeating the
41option:--type option.
42
43perf counters are available as per-CPU (`perf:cpu:` prefix) as well as
44per-thread (`perf:thread:` prefix) counters. Currently, per-CPU counters
45can only be used in the Linux kernel tracing domain, while per-thread
46counters can only be used in the user space tracing domain.
47
4fe444da
JD
48It is also possible to enable PMU counters by raw ID using the
49`perf:cpu:raw:r<N>:<name>` or `perf:thread:raw:r<N>:<name>` format for
50the kernel and user-space respectively. `<N>` is a hexadecimal event
51descriptor which is the same format as used by perf-record(1): a
52concatenation of the `Umask value` and `Event number` provided by the
53processor's manufacturer. The possible values for this field are
54processor-specific. The `<name>` field is used to associate a clearer
55name to the counter.
56
2e4886b8
PP
57Application-specific context fields can be added to a channel using the
58following syntax:
59
60[verse]
61$app.'PROVIDER':__TYPE__
62
63with:
64
65'PROVIDER'::
66 Provider name.
67
68'TYPE'::
69 Context type name.
70
60f7980c
PP
71NOTE: Make sure to **single-quote** the type when running the command
72from a shell, as `$` is a special character for variable substitution in
73most shells.
74
2e4886b8
PP
75Use the option:--list option without other arguments to list the
76available context field names.
77
78
79include::common-cmd-options-head.txt[]
80
81
82Domain
83~~~~~~
84One of:
85
86option:-j, option:--jul::
87 Add context to channel in the `java.util.logging` (JUL) domain.
88
89option:-k, option:--kernel::
90 Add context to channel in the Linux kernel domain.
91
92option:-l, option:--log4j::
93 Add context to channel in the Apache log4j domain.
94
95option:-u, option:--userspace::
96 Add context to channel in the user space domain.
97
98
99Target
100~~~~~~
59b19c3c 101option:-c 'CHANNEL', option:--channel='CHANNEL'::
2e4886b8
PP
102 Add context fields to a channel named 'CHANNEL' instead of adding
103 them to all the channels.
104
59b19c3c 105option:-s 'SESSION', option:--session='SESSION'::
2e4886b8
PP
106 Add context fields to a channel in the tracing session named 'SESSION'
107 instead of the current tracing session.
108
109
110Context
111~~~~~~~
112option:--list::
113 List the available context fields. Use this option alone.
114
59b19c3c 115option:-t 'TYPE', option:--type='TYPE'::
2e4886b8
PP
116 Add context field named 'TYPE'. This option can be repeated as
117 many times as needed on the command-line.
118
119
120include::common-cmd-help-options.txt[]
121
122
123include::common-cmd-footer.txt[]
124
125
126SEE ALSO
127--------
7c1a4458 128man:lttng(1)
This page took 0.028355 seconds and 4 git commands to generate.