![]() |
LTTng control library C API
|

Functions | |
| struct lttng_action * | lttng_action_snapshot_session_create (void) |
| Creates an initial “take recording session snapshot” trigger action. | |
| enum lttng_action_status | lttng_action_snapshot_session_get_output (const struct lttng_action *action, const struct lttng_snapshot_output **output) |
Sets *output to the recording session snapshot output of the “take recording session snapshot” trigger action action. | |
| enum lttng_action_status | lttng_action_snapshot_session_get_rate_policy (const struct lttng_action *action, const struct lttng_rate_policy **policy) |
Sets *policy to the rate policy of the “take recording session snapshot” trigger action action. | |
| enum lttng_action_status | lttng_action_snapshot_session_get_session_name (const struct lttng_action *action, const char **session_name) |
Sets *session_name to the target recording session name of the “take recording session snapshot” trigger action action. | |
| enum lttng_action_status | lttng_action_snapshot_session_set_output (struct lttng_action *action, struct lttng_snapshot_output *output) |
Sets the recording session snapshot output of the “take recording session snapshot” trigger action action to output. | |
| enum lttng_action_status | lttng_action_snapshot_session_set_rate_policy (struct lttng_action *action, const struct lttng_rate_policy *policy) |
Sets the rate policy of the “take recording session snapshot” trigger action action to policy. | |
| enum lttng_action_status | lttng_action_snapshot_session_set_session_name (struct lttng_action *action, const char *session_name) |
Sets the target recording session name (of which to take a snapshot) of the “take recording session snapshot” trigger action action to session_name. | |
A “take recording session snapshot” trigger action takes a snapshot of a specific recording session when its containing trigger fires.
LTTng finds the recording session of which to take a snapshot by name when it executes the action.
Executing this action is equivalent to calling lttng_snapshot_record() with the same recording session name.
A “start recording session” trigger action has the type LTTNG_ACTION_TYPE_SNAPSHOT_SESSION.
To create a valid “take recording session snapshot” trigger action:
The initial recording snapshot output of a “take recording session snapshot” trigger action is the default snapshot output of the target recording session. Override the snapshot output of the action with lttng_action_snapshot_session_set_output().
Get the target recording session name of a “take recording session snapshot” trigger action with lttng_action_snapshot_session_get_session_name().
Set and get the rate policy of a “take recording session snapshot” trigger action with lttng_action_snapshot_session_set_rate_policy() and lttng_action_snapshot_session_get_rate_policy().
|
extern |
Creates an initial “take recording session snapshot” trigger action.
On success, the returned trigger action isn't valid yet; you must set a target recording session name with lttng_action_snapshot_session_set_session_name().
The initial recording session snapshot output of the returned trigger action is the default snapshot output of the target recording session. Set a new snapshot output with lttng_action_snapshot_session_set_output().
The initial rate policy of the returned trigger action is “every time”. Set a new rate policy with lttng_action_snapshot_session_set_rate_policy().
Trigger action with the type LTTNG_ACTION_TYPE_SNAPSHOT_SESSION on success, or NULL on error.
Destroy the returned trigger action with lttng_action_destroy().
|
extern |
Sets *output to the recording session snapshot output of the “take recording session snapshot” trigger action action.
| [in] | action | “Take recording session snapshot” trigger action of which to get the recording session snapshot output. |
| [out] | output | On success, this function sets
|
| LTTNG_ACTION_STATUS_OK | Success. |
| LTTNG_ACTION_STATUS_INVALID | Unsatisfied precondition. |
action is not NULL.action has the type LTTNG_ACTION_TYPE_SNAPSHOT_SESSION.output is not NULL.
|
extern |
Sets *policy to the rate policy of the “take recording session snapshot” trigger action action.
| [in] | action | “Take recording session snapshot” trigger action of which to get the rate policy. |
| [out] | policy | On success, this function sets
|
| LTTNG_ACTION_STATUS_OK | Success. |
| LTTNG_ACTION_STATUS_INVALID | Unsatisfied precondition. |
action is not NULL.action has the type LTTNG_ACTION_TYPE_SNAPSHOT_SESSION.policy is not NULL.
|
extern |
Sets *session_name to the target recording session name of the “take recording session snapshot” trigger action action.
| [in] | action | “Take recording session snapshot” trigger action of which to get the target recording session name. |
| [out] | session_name | On success, this function sets
|
| LTTNG_ACTION_STATUS_OK | Success. |
| LTTNG_ACTION_STATUS_INVALID | Unsatisfied precondition. |
action is not NULL.action has the type LTTNG_ACTION_TYPE_SNAPSHOT_SESSION.session_name is not NULL.
|
extern |
Sets the recording session snapshot output of the “take recording session snapshot” trigger action action to output.
| [in] | action | “Take recording session snapshot” trigger action of which to set the snapshot output. |
| [in] | output | Recording session snapshot output of action (moved). |
| LTTNG_ACTION_STATUS_OK | Success. |
| LTTNG_ACTION_STATUS_INVALID | Unsatisfied precondition. |
| LTTNG_ACTION_STATUS_ERROR | Memory error. |
action is not NULL.action has the type LTTNG_ACTION_TYPE_SNAPSHOT_SESSION.output is not NULL.output is a valid recording session snapshot output.
|
extern |
Sets the rate policy of the “take recording session snapshot” trigger action action to policy.
| [in] | action | “Take recording session snapshot” trigger action of which to set the rate policy. |
| [in] | policy | Rate policy of action (copied). |
| LTTNG_ACTION_STATUS_OK | Success. |
| LTTNG_ACTION_STATUS_INVALID | Unsatisfied precondition. |
| LTTNG_ACTION_STATUS_ERROR | Memory error. |
action is not NULL.action has the type LTTNG_ACTION_TYPE_SNAPSHOT_SESSION.policy is not NULL.
|
extern |
Sets the target recording session name (of which to take a snapshot) of the “take recording session snapshot” trigger action action to session_name.
| [in] | action | “Take recording session snapshot” trigger action of which to set the target recording session name. |
| [in] | session_name | Target recording session name of action (copied). |
| LTTNG_ACTION_STATUS_OK | Success. |
| LTTNG_ACTION_STATUS_INVALID | Unsatisfied precondition. |
| LTTNG_ACTION_STATUS_ERROR | Memory error. |
action is not NULL.action has the type LTTNG_ACTION_TYPE_SNAPSHOT_SESSION.session_name is not NULL.