doc/man: linklttng macro -> man macro
[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
48Application-specific context fields can be added to a channel using the
49following syntax:
50
51[verse]
52$app.'PROVIDER':__TYPE__
53
54with:
55
56'PROVIDER'::
57 Provider name.
58
59'TYPE'::
60 Context type name.
61
60f7980c
PP
62NOTE: Make sure to **single-quote** the type when running the command
63from a shell, as `$` is a special character for variable substitution in
64most shells.
65
2e4886b8
PP
66Use the option:--list option without other arguments to list the
67available context field names.
68
69
70include::common-cmd-options-head.txt[]
71
72
73Domain
74~~~~~~
75One of:
76
77option:-j, option:--jul::
78 Add context to channel in the `java.util.logging` (JUL) domain.
79
80option:-k, option:--kernel::
81 Add context to channel in the Linux kernel domain.
82
83option:-l, option:--log4j::
84 Add context to channel in the Apache log4j domain.
85
86option:-u, option:--userspace::
87 Add context to channel in the user space domain.
88
89
90Target
91~~~~~~
92option:-c, option:--channel='CHANNEL'::
93 Add context fields to a channel named 'CHANNEL' instead of adding
94 them to all the channels.
95
96option:-s, option:--session='SESSION'::
97 Add context fields to a channel in the tracing session named 'SESSION'
98 instead of the current tracing session.
99
100
101Context
102~~~~~~~
103option:--list::
104 List the available context fields. Use this option alone.
105
106option:-t, option:--type='TYPE'::
107 Add context field named 'TYPE'. This option can be repeated as
108 many times as needed on the command-line.
109
110
111include::common-cmd-help-options.txt[]
112
113
114include::common-cmd-footer.txt[]
115
116
117SEE ALSO
118--------
7c1a4458 119man:lttng(1)
This page took 0.027725 seconds and 5 git commands to generate.