|
| enum lttng_condition_status | lttng_condition_buffer_usage_get_channel_name (const struct lttng_condition *condition, const char **channel_name) |
| | Sets *channel_name to the target event record channel name of the “event record channel buffer usage becomes greater/less than” trigger condition condition.
|
| |
| enum lttng_condition_status | lttng_condition_buffer_usage_get_domain_type (const struct lttng_condition *condition, enum lttng_domain_type *domain) |
| | Sets *domain to the target tracing domain of the “event record channel buffer usage becomes greater/less than” trigger condition condition.
|
| |
| enum lttng_condition_status | lttng_condition_buffer_usage_get_session_name (const struct lttng_condition *condition, const char **session_name) |
| | Sets *session_name to the target recording session name of the “event record channel buffer usage becomes greater/less than” trigger condition condition.
|
| |
| enum lttng_condition_status | lttng_condition_buffer_usage_get_threshold (const struct lttng_condition *condition, uint64_t *threshold) |
| | Sets *threshold to the event record channel buffer usage size (bytes) threshold of the “event record channel buffer usage becomes greater/less than” trigger condition condition.
|
| |
| enum lttng_condition_status | lttng_condition_buffer_usage_get_threshold_ratio (const struct lttng_condition *condition, double *threshold) |
| | Sets *threshold to the \lt_obj_event record channel buffer usage ratio threshold of the “event record channel buffer usage becomes greater/less than” trigger condition condition.
|
| |
| struct lttng_condition * | lttng_condition_buffer_usage_high_create (void) |
| | Creates an initial “event record channel buffer usage becomes greater than” trigger condition to execute an action when the ring buffer usage of a given event record channel becomes greater than some configured threshold.
|
| |
| struct lttng_condition * | lttng_condition_buffer_usage_low_create (void) |
| | Creates an initial “event record channel buffer usage becomes less than” trigger condition to execute an action when the ring buffer usage of a given event record channel becomes less than some configured threshold.
|
| |
| enum lttng_condition_status | lttng_condition_buffer_usage_set_channel_name (struct lttng_condition *condition, const char *channel_name) |
| | Sets the target event record channel name of the “event record channel buffer usage becomes greater/less than” trigger condition condition to channel_name.
|
| |
| enum lttng_condition_status | lttng_condition_buffer_usage_set_domain_type (struct lttng_condition *condition, enum lttng_domain_type domain) |
| | Sets the target tracing domain of the “event record channel buffer usage becomes greater/less than” trigger condition condition to domain.
|
| |
| enum lttng_condition_status | lttng_condition_buffer_usage_set_session_name (struct lttng_condition *condition, const char *session_name) |
| | Sets the target recording session name of the “event record channel buffer usage becomes greater/less than” trigger condition condition to session_name.
|
| |
| enum lttng_condition_status | lttng_condition_buffer_usage_set_threshold (struct lttng_condition *condition, uint64_t threshold) |
| | Sets the \lt_obj_event record channel buffer usage size threshold of the “event record channel buffer usage becomes greater/less than” trigger condition condition to threshold.
|
| |
| enum lttng_condition_status | lttng_condition_buffer_usage_set_threshold_ratio (struct lttng_condition *condition, double threshold) |
| | Sets the \lt_obj_event record channel buffer usage ratio threshold of the “event record channel buffer usage becomes greater/less than” trigger condition condition to threshold.
|
| |
| enum lttng_evaluation_status | lttng_evaluation_buffer_usage_get_usage (const struct lttng_evaluation *evaluation, uint64_t *usage) |
| | Sets *usage to the captured event record channel buffer usage size of the “event record channel buffer usage becomes greater/less than” trigger condition evaluation evaluation.
|
| |
| enum lttng_evaluation_status | lttng_evaluation_buffer_usage_get_usage_ratio (const struct lttng_evaluation *evaluation, double *usage) |
| | Sets *usage to the captured event record channel buffer usage ratio of the “event record channel buffer usage becomes greater/less than” trigger condition evaluation evaluation.
|
| |
A “event record channel buffer usage becomes greater/less than” trigger condition is considered satisfied when the ring buffer usage of a given event record channel becomes greater or less than some configured threshold.
An “event record channel buffer usage becomes greater than” trigger condition has the type LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH.
An “event record channel buffer usage becomes less than” trigger condition has the type LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW.
Every time the monitor timer of an event record channel expires, LTTng updates its statistics, including its buffer usage. This is when LTTng tries to evaluate “event record channel buffer usage becomes greater/less than” conditions.
To create a valid “event record channel buffer usage becomes greater/less than” trigger condition:
Create the initial trigger condition with one of:
- Event record channel buffer usage becomes greater than
lttng_condition_buffer_usage_high_create()
- Event record channel buffer usage becomes less than
- lttng_condition_buffer_usage_low_create()
Set a buffer usage threshold with one of:
- By ratio (0 to 1)
lttng_condition_buffer_usage_set_threshold_ratio()
- By size (bytes)
- lttng_condition_buffer_usage_set_threshold()
- Set a target recording session name with lttng_condition_buffer_usage_set_session_name().
- Set a target tracing domain with lttng_condition_buffer_usage_set_domain_type().
- Set a target event record channel name with lttng_condition_buffer_usage_set_channel_name().
Get the buffer usage threshold of an “event record channel buffer usage becomes greater/less than” trigger condition with lttng_condition_buffer_usage_get_threshold_ratio() or lttng_condition_buffer_usage_get_threshold().
Get the target recording session name, tracing domain, and event record channel name of an “event record channel buffer usage becomes greater/less than” trigger condition with lttng_condition_buffer_usage_get_session_name(), lttng_condition_buffer_usage_get_domain_type(), and lttng_condition_buffer_usage_get_channel_name().
Evaluation
When a trigger with an “event record channel buffer usage becomes greater/less than” condition fires, LTTng captures the current ring buffer usage. With the “notify” action, a user may then read the captured value from the condition evaluation with lttng_evaluation_buffer_usage_get_usage_ratio() and lttng_evaluation_buffer_usage_get_usage().
◆ lttng_condition_buffer_usage_get_channel_name()
Sets *channel_name to the target event record channel name of the “event record channel buffer usage becomes greater/less than” trigger condition condition.
- Parameters
-
| [in] | condition | “Event record channel buffer usage becomes greater/less than” trigger condition of which to get the target event record channel name. |
| [out] | channel_name | On success, this function sets *channel_name to the target event record channel name of condition.
condition owns *channel_name.
*channel_name remains valid until the next function call with condition.
|
- Return values
-
- Precondition
-
- See also
- lttng_condition_buffer_usage_set_channel_name() – Set the target event record channel name of a “event record channel buffer usage becomes greater/less than” trigger condition.
◆ lttng_condition_buffer_usage_get_domain_type()
Sets *domain to the target tracing domain of the “event record channel buffer usage becomes greater/less than” trigger condition condition.
- Parameters
-
| [in] | condition | “Event record channel buffer usage becomes greater/less than” trigger condition of which to get the target tracing domain. |
| [out] | domain | On success, this function sets *domain to the target tracing domain of condition.
condition owns *domain.
*domain remains valid until the next function call with condition.
|
- Return values
-
- Precondition
-
- See also
- lttng_condition_buffer_usage_set_domain_type() – Set the target tracing domain of a “event record channel buffer usage becomes greater/less than” trigger condition.
◆ lttng_condition_buffer_usage_get_session_name()
Sets *session_name to the target recording session name of the “event record channel buffer usage becomes greater/less than” trigger condition condition.
- Parameters
-
| [in] | condition | “Event record channel buffer usage becomes greater/less than” trigger condition of which to get the target recording session name. |
| [out] | session_name | On success, this function sets *session_name to the target recording session name of condition.
condition owns *session_name.
*session_name remains valid until the next function call with condition.
|
- Return values
-
- Precondition
-
- See also
- lttng_condition_buffer_usage_set_session_name() – Set the target recording session name of a “event record channel buffer usage becomes greater/less than” trigger condition.
◆ lttng_condition_buffer_usage_get_threshold()
Sets *threshold to the event record channel buffer usage size (bytes) threshold of the “event record channel buffer usage becomes greater/less than” trigger condition condition.
- Parameters
-
| [in] | condition | “Event record channel buffer usage becomes greater/less than” trigger condition of which to get the event record channel buffer usage size threshold. |
| [out] | threshold | On success, this function sets *threshold to the buffer usage size (bytes) threshold of condition. |
- Return values
-
- Precondition
-
- See also
- lttng_condition_buffer_usage_set_threshold() – Set the event record channel buffer usage size threshold of a “event record channel buffer usage becomes greater/less than” trigger condition.
-
lttng_condition_buffer_usage_get_threshold_ratio() – Get the event record channel buffer usage ratio threshold of a “event record channel buffer usage becomes greater/less than” trigger condition.
◆ lttng_condition_buffer_usage_get_threshold_ratio()
Sets *threshold to the \lt_obj_event record channel buffer usage ratio threshold of the “event record channel buffer usage becomes greater/less than” trigger condition condition.
- Parameters
-
| [in] | condition | “Event record channel buffer usage becomes greater/less than” trigger condition of which to get the event record channel buffer usage ratio threshold. |
| [out] | threshold | On success, this function sets *threshold to the event record channel buffer usage ratio (between 0 and 1) threshold of condition. |
- Return values
-
- Precondition
-
- See also
- lttng_condition_buffer_usage_set_threshold_ratio() – Set the event record channel buffer usage ratio threshold of a “event record channel buffer usage becomes greater/less than” trigger condition.
-
lttng_condition_buffer_usage_get_threshold() – Get the event record channel buffer usage size threshold of a “event record channel buffer usage becomes greater/less than” trigger condition.
◆ lttng_condition_buffer_usage_high_create()
Creates an initial “event record channel buffer usage becomes greater than” trigger condition to execute an action when the ring buffer usage of a given event record channel becomes greater than some configured threshold.
On success, the returned trigger condition isn't valid yet; you must:
- Returns
Trigger condition with the type LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH on success, or NULL on error.
Destroy the returned trigger condition with lttng_condition_destroy().
◆ lttng_condition_buffer_usage_low_create()
Creates an initial “event record channel buffer usage becomes less than” trigger condition to execute an action when the ring buffer usage of a given event record channel becomes less than some configured threshold.
On success, the returned trigger condition isn't valid yet; you must:
- Returns
Trigger condition with the type LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW on success, or NULL on error.
Destroy the returned trigger condition with lttng_condition_destroy().
◆ lttng_condition_buffer_usage_set_channel_name()
Sets the target event record channel name of the “event record channel buffer usage becomes greater/less than” trigger condition condition to channel_name.
- Parameters
-
| [in] | condition | “Event record channel buffer usage becomes greater/less than” trigger condition of which to set the target event record channel name. |
| [in] | channel_name | Target event record channel name of condition (copied). |
- Return values
-
- Precondition
-
- See also
- lttng_condition_buffer_usage_get_channel_name() – Get the target event record channel name of a “event record channel buffer usage becomes greater/less than” trigger condition.
◆ lttng_condition_buffer_usage_set_domain_type()
Sets the target tracing domain of the “event record channel buffer usage becomes greater/less than” trigger condition condition to domain.
- Parameters
-
| [in] | condition | “Event record channel buffer usage becomes greater/less than” trigger condition of which to set the target tracing domain. |
| [in] | domain | Target tracing domain of condition. |
- Return values
-
- Precondition
-
- See also
- lttng_condition_buffer_usage_get_domain_type() – Get the target tracing domain of a “event record channel buffer usage becomes greater/less than” trigger condition.
◆ lttng_condition_buffer_usage_set_session_name()
Sets the target recording session name of the “event record channel buffer usage becomes greater/less than” trigger condition condition to session_name.
- Parameters
-
| [in] | condition | “Event record channel buffer usage becomes greater/less than” trigger condition of which to set the target recording session name. |
| [in] | session_name | Target recording session name of condition (copied). |
- Return values
-
- Precondition
-
- See also
- lttng_condition_buffer_usage_get_session_name() – Get the target recording session name of a “event record channel buffer usage becomes greater/less than” trigger condition.
◆ lttng_condition_buffer_usage_set_threshold()
Sets the \lt_obj_event record channel buffer usage size threshold of the “event record channel buffer usage becomes greater/less than” trigger condition condition to threshold.
This function overrides any current event record channel buffer usage threshold of condition.
- Parameters
-
| [in] | condition | “Event record channel buffer usage becomes greater/less than” trigger condition of which to set the event record channel buffer usage size threshold. |
| [in] | threshold | Event record channel buffer usage size (bytes) threshold of condition. |
- Return values
-
- Precondition
-
- See also
- lttng_condition_buffer_usage_get_threshold() – Get the event record channel buffer usage size threshold of a “event record channel buffer usage becomes greater/less than” trigger condition.
-
lttng_condition_buffer_usage_set_threshold_ratio() – Set the event record channel buffer usage ratio threshold of a “event record channel buffer usage becomes greater/less than” trigger condition.
◆ lttng_condition_buffer_usage_set_threshold_ratio()
Sets the \lt_obj_event record channel buffer usage ratio threshold of the “event record channel buffer usage becomes greater/less than” trigger condition condition to threshold.
This function overrides any current event record channel buffer usage threshold of condition.
- Parameters
-
| [in] | condition | “Event record channel buffer usage becomes greater/less than” trigger condition of which to set the event record channel buffer usage ratio threshold. |
| [in] | threshold | Event record channel buffer usage ratio (between 0 and 1) threshold of condition. |
- Return values
-
- Precondition
-
- See also
- lttng_condition_buffer_usage_get_threshold_ratio() – Get the event record channel buffer usage ratio threshold of a “event record channel buffer usage becomes greater/less than” trigger condition.
-
lttng_condition_buffer_usage_set_threshold() – Set the event record channel buffer usage size threshold of a “event record channel buffer usage becomes greater/less than” trigger condition.
◆ lttng_evaluation_buffer_usage_get_usage()
Sets *usage to the captured event record channel buffer usage size of the “event record channel buffer usage becomes greater/less than” trigger condition evaluation evaluation.
- Parameters
-
| [in] | evaluation | “Event record channel buffer usage becomes greater/less than” trigger condition evaluation of which to get the captured event record channel buffer usage size. |
| [out] | usage | On success, this function sets *usage to the captured event record channel buffer usage size (bytes) of evaluation. |
- Return values
-
- Precondition
-
- See also
- lttng_evaluation_buffer_usage_get_usage_ratio() – Get the captured event record channel buffer usage ratio of a “event record channel buffer usage becomes greater/less than” trigger condition evaluation.
◆ lttng_evaluation_buffer_usage_get_usage_ratio()
Sets *usage to the captured event record channel buffer usage ratio of the “event record channel buffer usage becomes greater/less than” trigger condition evaluation evaluation.
- Parameters
-
| [in] | evaluation | “Event record channel buffer usage becomes greater/less than” trigger condition evaluation of which to get the captured event record channel buffer usage ratio. |
| [out] | usage | On success, this function sets *usage to the captured event record channel buffer usage ratio (between 0 and 1) of evaluation. |
- Return values
-
- Precondition
-
- See also
- lttng_evaluation_buffer_usage_get_usage() – Get the captured event record channel buffer usage size of a “event record channel buffer usage becomes greater/less than” trigger condition evaluation.