lttng-add-trigger(1)
====================
-:revdate: 6 May 2021
+:revdate: 18 May 2021
NAME
specifiers>>. The order of the action specifiers is significant: LTTng
attempts to execute the actions of a firing trigger in this order.
+See the ``<<examples,EXAMPLES>>'' section below for usage examples.
+
List the triggers of your Unix user, or of all users if your
Unix user is `root`, with the man:lttng-list-triggers(1) command.
Remove a trigger with the man:lttng-remove-trigger(1) command.
-See the <<examples,EXAMPLES>> section below for usage examples.
-
[[cond-spec]]
Condition specifier
('ERSPEC' part).
+
Capture event record and context fields with one or more
-nloption:--capture options (see the <<capture-descr,Capture descriptor>>
-section below to learn more). When an `event-rule-matches` condition
-with capture descriptors is satisfied, the captured field values are
-available in the evaluation object of the condition using the
-liblttng-ctl C{nbsp}API.
+nloption:--capture options (see the ``<<capture-descr,Capture
+descriptor>>'' section below to learn more). When an
+`event-rule-matches` condition with capture descriptors is satisfied,
+the captured field values are available in the evaluation object of the
+condition using the liblttng-ctl C{nbsp}API.
+
IMPORTANT: Make sure to **single-quote** 'CDESCR' when you run the
`add-trigger` command from a shell, as capture descriptors can include
option:--condition='CONDTYPE'::
Introductory option for a condition specifier of type 'CONDTYPE'.
+
-See the <<cond-spec,Condition specifier>> section above to learn more.
+See the ``<<cond-spec,Condition specifier>>'' section above to learn
+more.
option:--action='ACTTYPE'::
Introductory option for an action specifier of type 'ACTTYPE'.
+
-See the <<action-spec,Action specifier>> section above to learn more.
+See the ``<<action-spec,Action specifier>>'' section above to learn
+more.
include::common-lttng-cmd-help-options.txt[]
[role="term"]
----
$ lttng add-trigger --condition=event-rule-matches \
- --domain=kernel --type=syscall:entry \
+ --type=syscall:entry \
--name='exec*' --action=notify
----
====
[role="term"]
----
$ lttng add-trigger --condition=event-rule-matches \
- --domain=user --name='my_app:*' \
+ --type=user --name='my_app:*' \
--log-level=TRACE_WARNING.. \
--action=stop-session my-session \
--action=rotate-session my-session
----
$ lttng add-trigger --name=my-trigger \
--condition=event-rule-matches \
- --domain=python --name=my-logger \
+ --type=python --name=my-logger \
--action=snapshot-session my-session
----
====
----
# lttng add-trigger --owner-uid=$(id --user mireille) \
--condition=event-rule-matches \
- --domain=kernel --name='sched*' \
+ --type=kernel --name='sched*' \
--action=notify
----
====
[role="term"]
----
$ lttng add-trigger --condition=event-rule-matches \
- --domain=user --action=notify \
+ --type=user --action=notify \
--rate-policy=every:10
----
====
[role="term"]
----
$ lttng add-trigger --condition=event-rule-matches \
- --domain=kernel --type=syscall \
- --filter='fd < 3' \
+ --type=syscall --filter='fd < 3' \
--action=start-session my-session \
--rate-policy=once-after:40
----