LTTng control library C API
Loading...
Searching...
No Matches
General API

Macros

#define LTTNG_NAME_MAX
 Maximum name length.
 
#define LTTNG_SYMBOL_NAME_LEN
 Maximum symbol length.
 

Enumerations

enum  lttng_error_code {
  LTTNG_OK , LTTNG_ERR_UNK , LTTNG_ERR_UND , LTTNG_ERR_SESSION_STARTED ,
  LTTNG_ERR_UNKNOWN_DOMAIN , LTTNG_ERR_NOT_SUPPORTED , LTTNG_ERR_NO_SESSION , LTTNG_ERR_CREATE_DIR_FAIL ,
  LTTNG_ERR_SESSION_FAIL , LTTNG_ERR_NO_SESSIOND , LTTNG_ERR_SET_URL , LTTNG_ERR_URL_EXIST ,
  LTTNG_ERR_BUFFER_NOT_SUPPORTED , LTTNG_ERR_SESS_NOT_FOUND , LTTNG_ERR_BUFFER_TYPE_MISMATCH , LTTNG_ERR_FATAL ,
  LTTNG_ERR_NOMEM , LTTNG_ERR_EXIST_SESS , LTTNG_ERR_NO_EVENT , LTTNG_ERR_CONNECT_FAIL ,
  LTTNG_ERR_SNAPSHOT_OUTPUT_EXIST , LTTNG_ERR_EPERM , LTTNG_ERR_KERN_NA , LTTNG_ERR_KERN_VERSION ,
  LTTNG_ERR_KERN_EVENT_EXIST , LTTNG_ERR_KERN_SESS_FAIL , LTTNG_ERR_KERN_CHAN_EXIST , LTTNG_ERR_KERN_CHAN_FAIL ,
  LTTNG_ERR_KERN_CHAN_NOT_FOUND , LTTNG_ERR_KERN_CHAN_DISABLE_FAIL , LTTNG_ERR_KERN_CHAN_ENABLE_FAIL , LTTNG_ERR_KERN_CONTEXT_FAIL ,
  LTTNG_ERR_KERN_ENABLE_FAIL , LTTNG_ERR_KERN_DISABLE_FAIL , LTTNG_ERR_KERN_META_FAIL , LTTNG_ERR_KERN_START_FAIL ,
  LTTNG_ERR_KERN_STOP_FAIL , LTTNG_ERR_KERN_CONSUMER_FAIL , LTTNG_ERR_KERN_STREAM_FAIL , LTTNG_ERR_START_SESSION_ONCE ,
  LTTNG_ERR_SNAPSHOT_FAIL , LTTNG_ERR_KERN_LIST_FAIL , LTTNG_ERR_UST_EVENT_ENABLED , LTTNG_ERR_UST_SESS_FAIL ,
  LTTNG_ERR_UST_CHAN_EXIST , LTTNG_ERR_UST_CHAN_FAIL , LTTNG_ERR_UST_CHAN_NOT_FOUND , LTTNG_ERR_UST_CHAN_DISABLE_FAIL ,
  LTTNG_ERR_UST_ENABLE_FAIL , LTTNG_ERR_UST_DISABLE_FAIL , LTTNG_ERR_UST_START_FAIL , LTTNG_ERR_UST_STOP_FAIL ,
  LTTNG_ERR_UST_CONSUMER64_FAIL , LTTNG_ERR_UST_CONSUMER32_FAIL , LTTNG_ERR_NO_CHANNEL , LTTNG_ERR_SESSION_INVALID_CHAR ,
  LTTNG_ERR_UST_LIST_FAIL , LTTNG_ERR_UST_EVENT_EXIST , LTTNG_ERR_UST_EVENT_NOT_FOUND , LTTNG_ERR_UST_CONTEXT_EXIST ,
  LTTNG_ERR_UST_CONTEXT_INVAL , LTTNG_ERR_NEED_ROOT_SESSIOND , LTTNG_ERR_TRACE_ALREADY_STARTED , LTTNG_ERR_TRACE_ALREADY_STOPPED ,
  LTTNG_ERR_KERN_EVENT_ENOSYS , LTTNG_ERR_NEED_CHANNEL_NAME , LTTNG_ERR_NO_UST , LTTNG_ERR_SAVE_FILE_EXIST ,
  LTTNG_ERR_SAVE_IO_FAIL , LTTNG_ERR_LOAD_INVALID_CONFIG , LTTNG_ERR_LOAD_IO_FAIL , LTTNG_ERR_LOAD_SESSION_NOENT ,
  LTTNG_ERR_MAX_SIZE_INVALID , LTTNG_ERR_INVALID , LTTNG_ERR_NO_USTCONSUMERD , LTTNG_ERR_NO_KERNCONSUMERD ,
  LTTNG_ERR_URL_DATA_MISS , LTTNG_ERR_URL_CTRL_MISS , LTTNG_ERR_ENABLE_CONSUMER_FAIL , LTTNG_ERR_RELAYD_CONNECT_FAIL ,
  LTTNG_ERR_RELAYD_VERSION_FAIL , LTTNG_ERR_FILTER_INVAL , LTTNG_ERR_FILTER_NOMEM , LTTNG_ERR_NO_CONSUMER ,
  LTTNG_ERR_EXCLUSION_INVAL , LTTNG_ERR_EXCLUSION_NOMEM , LTTNG_ERR_INVALID_EVENT_NAME , LTTNG_ERR_INVALID_CHANNEL_NAME ,
  LTTNG_ERR_PROCESS_ATTR_EXISTS , LTTNG_ERR_PROCESS_ATTR_MISSING , LTTNG_ERR_INVALID_CHANNEL_DOMAIN , LTTNG_ERR_OVERFLOW ,
  LTTNG_ERR_SESSION_NOT_STARTED , LTTNG_ERR_LIVE_SESSION , LTTNG_ERR_PER_PID_SESSION , LTTNG_ERR_KERN_CONTEXT_UNAVAILABLE ,
  LTTNG_ERR_REGEN_STATEDUMP_FAIL , LTTNG_ERR_REGEN_STATEDUMP_NOMEM , LTTNG_ERR_NOT_SNAPSHOT_SESSION , LTTNG_ERR_INVALID_TRIGGER ,
  LTTNG_ERR_TRIGGER_EXISTS , LTTNG_ERR_TRIGGER_NOT_FOUND , LTTNG_ERR_ROTATION_PENDING , LTTNG_ERR_ROTATION_NOT_AVAILABLE ,
  LTTNG_ERR_ROTATION_SCHEDULE_SET , LTTNG_ERR_ROTATION_SCHEDULE_NOT_SET , LTTNG_ERR_ROTATION_MULTIPLE_AFTER_STOP , LTTNG_ERR_ROTATION_WRONG_VERSION ,
  LTTNG_ERR_NO_SESSION_OUTPUT , LTTNG_ERR_ROTATION_NOT_AVAILABLE_RELAY , LTTNG_ERR_AGENT_TRACING_DISABLED , LTTNG_ERR_PROBE_LOCATION_INVAL ,
  LTTNG_ERR_ELF_PARSING , LTTNG_ERR_SDT_PROBE_SEMAPHORE , LTTNG_ERR_ROTATION_FAIL_CONSUMER , LTTNG_ERR_CHAN_NOT_FOUND ,
  LTTNG_ERR_SNAPSHOT_UNSUPPORTED , LTTNG_ERR_SESSION_NOT_EXIST , LTTNG_ERR_CREATE_TRACE_CHUNK_FAIL_CONSUMER , LTTNG_ERR_CLOSE_TRACE_CHUNK_FAIL_CONSUMER ,
  LTTNG_ERR_INVALID_PROTOCOL , LTTNG_ERR_FILE_CREATION_ERROR , LTTNG_ERR_TIMER_STOP_ERROR , LTTNG_ERR_ROTATION_NOT_AVAILABLE_KERNEL ,
  LTTNG_ERR_CLEAR_RELAY_DISALLOWED , LTTNG_ERR_CLEAR_NOT_AVAILABLE_RELAY , LTTNG_ERR_CLEAR_FAIL_CONSUMER , LTTNG_ERR_ROTATION_AFTER_STOP_CLEAR ,
  LTTNG_ERR_USER_NOT_FOUND , LTTNG_ERR_GROUP_NOT_FOUND , LTTNG_ERR_UNSUPPORTED_DOMAIN , LTTNG_ERR_PROCESS_ATTR_TRACKER_INVALID_TRACKING_POLICY ,
  LTTNG_ERR_EVENT_NOTIFIER_GROUP_NOTIFICATION_FD , LTTNG_ERR_INVALID_CAPTURE_EXPRESSION , LTTNG_ERR_EVENT_NOTIFIER_REGISTRATION , LTTNG_ERR_EVENT_NOTIFIER_ERROR_ACCOUNTING ,
  LTTNG_ERR_EVENT_NOTIFIER_ERROR_ACCOUNTING_FULL , LTTNG_ERR_INVALID_ERROR_QUERY_TARGET , LTTNG_ERR_BUFFER_FLUSH_FAILED , LTTNG_ERR_INVALID_RECLAMATION_POLICY ,
  LTTNG_ERR_UNSUPPORTED_TRACE_FORMAT , LTTNG_ERR_PID_TRACKED , LTTNG_ERR_PID_NOT_TRACKED
}
 General error codes. More...
 
enum  lttng_kernel_tracer_status {
  LTTNG_KERNEL_TRACER_STATUS_INITIALIZED , LTTNG_KERNEL_TRACER_STATUS_ERR_UNKNOWN , LTTNG_KERNEL_TRACER_STATUS_ERR_NEED_ROOT , LTTNG_KERNEL_TRACER_STATUS_ERR_NOTIFIER ,
  LTTNG_KERNEL_TRACER_STATUS_ERR_OPEN_PROC_LTTNG , LTTNG_KERNEL_TRACER_STATUS_ERR_VERSION_MISMATCH , LTTNG_KERNEL_TRACER_STATUS_ERR_MODULES_UNKNOWN , LTTNG_KERNEL_TRACER_STATUS_ERR_MODULES_MISSING ,
  LTTNG_KERNEL_TRACER_STATUS_ERR_MODULES_SIGNATURE
}
 The status of an LTTng kernel tracer. More...
 

Functions

enum lttng_error_code lttng_get_kernel_tracer_status (enum lttng_kernel_tracer_status *status)
 Sets *status to the current status of the LTTng kernel tracer.
 
int lttng_session_daemon_alive (void)
 Returns whether or not liblttng-ctl is able to connect to a listening session daemon.
 
int lttng_set_tracing_group (const char *group)
 Sets the current Unix tracing group of liblttng-ctl to group.
 
const char * lttng_strerror (int error_code)
 Returns a human-readable message for the general error code error_code.
 

Detailed Description

The general LTTng control library C API offers:

Session daemon connection

Many functions of the LTTng control library C API require a connection to a listening LTTng session daemon (see lttng-sessiond(8)) to control LTTng tracing.

liblttng-ctl connects to a session daemon through a Unix domain socket when you call some of its public functions, not when it loads.

Each Unix user may have its own independent running session daemon. However, liblttng-ctl must connect to the session daemon of the root user (the root session daemon) to control Linux kernel tracing.

How liblttng-ctl chooses which session daemon to connect to is as follows, considering U is the Unix user of the process running liblttng-ctl:

U is root

Connect to the root session daemon.

U is not root
If U is part of the current liblttng-ctl Unix tracing group

Try to connect to the root session daemon.

If the root session daemon isn't running, then connect to the session daemon of U.

If U is not part of the tracing group
Connect to the session daemon of U.

The Unix tracing group of the root session daemon is one of:

With the --group=GROUP option of the root session daemon

Exactly GROUP.

In that case, you must call lttng_set_tracing_group(), passing exactly GROUP, before you call a liblttng-ctl function which needs to connect to a session daemon.

Without the --group option of the root session daemon
Exactly tracing (also the default Unix tracing group of liblttng-ctl, therefore you don't need to call lttng_set_tracing_group()).

Check that your application can successfully connect to a session daemon with lttng_session_daemon_alive().

LTTng-instrumented user applications automatically register to both the root and user session daemons. This makes it possible for both session daemons to list the available instrumented applications and their instrumentation points.

Enumeration Type Documentation

◆ lttng_error_code

General error codes.

Many functions, most of them dating from older liblttng-ctl versions, return this type (or an int value which is equal to the negation of one of those enumerators).

Not all error codes are relevant to a given function: this API documentation makes an effort to document the most relevant status codes for each function. This is not always possible, however, as LTTng is made of multiple interacting components (tracers, consumer daemons, session daemons, and the rest); those error codes can move from one to another and the possible error codes of a given liblttng-ctl function can change from version to version.

See also
lttng_strerror() – Returns a human-readable message for a general error code, positive or negative.
Enumerator
LTTNG_OK 

Success.

LTTNG_ERR_UNK 

Unknown error.

LTTNG_ERR_UND 

Undefined command.

LTTNG_ERR_SESSION_STARTED 

Recording session already started (active).

LTTNG_ERR_UNKNOWN_DOMAIN 

Unknown tracing domain.

LTTNG_ERR_NOT_SUPPORTED 

Unsupported operation.

LTTNG_ERR_NO_SESSION 

No recording session found.

LTTNG_ERR_CREATE_DIR_FAIL 

Failed to create a directory.

LTTNG_ERR_SESSION_FAIL 

Failed to create a recording session.

LTTNG_ERR_NO_SESSIOND 

No available session daemon to connect to.

LTTNG_ERR_SET_URL 

Failed to set an URL.

LTTNG_ERR_URL_EXIST 

URL already exists.

LTTNG_ERR_BUFFER_NOT_SUPPORTED 

Unsupported buffer ownership model.

LTTNG_ERR_SESS_NOT_FOUND 

Nonexistent recording session name.

LTTNG_ERR_BUFFER_TYPE_MISMATCH 

An event record channel within the given tracing domain already exists and is configured with another buffer ownership model.

LTTNG_ERR_FATAL 

Fatal error.

LTTNG_ERR_NOMEM 

Failed to allocate memory.

LTTNG_ERR_EXIST_SESS 

Recording session name already exists.

LTTNG_ERR_NO_EVENT 

Recording event rule not found.

LTTNG_ERR_CONNECT_FAIL 

Failed to connect to Unix socket.

LTTNG_ERR_SNAPSHOT_OUTPUT_EXIST 

Snapshot output already exists.

LTTNG_ERR_EPERM 

Permission denied.

LTTNG_ERR_KERN_NA 

Linux kernel tracer isn't available.

LTTNG_ERR_KERN_VERSION 

Incompatible Linux kernel tracer.

LTTNG_ERR_KERN_EVENT_EXIST 

Linux kernel recording event rule already exists.

LTTNG_ERR_KERN_SESS_FAIL 

Linux kernel tracer: failed to create a recording session.

LTTNG_ERR_KERN_CHAN_EXIST 

Linux kernel event record channel already exists.

LTTNG_ERR_KERN_CHAN_FAIL 

Failed to create a Linux kernel event record channel.

LTTNG_ERR_KERN_CHAN_NOT_FOUND 

Linux kernel event record channel not found.

LTTNG_ERR_KERN_CHAN_DISABLE_FAIL 

Failed to disable a Linux kernel event record channel.

LTTNG_ERR_KERN_CHAN_ENABLE_FAIL 

Failed to create/enable a Linux kernel event record channel.

LTTNG_ERR_KERN_CONTEXT_FAIL 

Failed to add a context field to be recorded to the event records of a Linux kernel event record channel.

LTTNG_ERR_KERN_ENABLE_FAIL 

Failed to create/enable a Linux kernel recording event rule.

LTTNG_ERR_KERN_DISABLE_FAIL 

Failed to disable a Linux kernel recording event rule.

LTTNG_ERR_KERN_META_FAIL 

Failed to open a Linux kernel trace metadata stream.

LTTNG_ERR_KERN_START_FAIL 

Linux kernel tracer: failed to start tracing.

LTTNG_ERR_KERN_STOP_FAIL 

Linux kernel tracer: failed to stop tracing.

LTTNG_ERR_KERN_CONSUMER_FAIL 

Failed to start a Linux kernel consumer daemon.

LTTNG_ERR_KERN_STREAM_FAIL 

Failed to create a Linux kernel trace data stream.

LTTNG_ERR_START_SESSION_ONCE 

The recording session never became active.

LTTNG_ERR_SNAPSHOT_FAIL 

Failed to take a recording session snapshot.

LTTNG_ERR_KERN_LIST_FAIL 

Failed to list Linux kernel recording event rules.

LTTNG_ERR_UST_EVENT_ENABLED 

User space recording event rule already enabled.

LTTNG_ERR_UST_SESS_FAIL 

User space tracer: failed to create a recording session.

LTTNG_ERR_UST_CHAN_EXIST 

User space event record channel already exists.

LTTNG_ERR_UST_CHAN_FAIL 

Failed to create a user space event record channel.

LTTNG_ERR_UST_CHAN_NOT_FOUND 

User space event record channel not found.

LTTNG_ERR_UST_CHAN_DISABLE_FAIL 

Failed to disable a user space event record channel.

LTTNG_ERR_UST_ENABLE_FAIL 

Failed to create/enable a user space recording event rule.

LTTNG_ERR_UST_DISABLE_FAIL 

Failed to disable a user space recording event rule.

LTTNG_ERR_UST_START_FAIL 

User space tracer: failed to start tracing.

LTTNG_ERR_UST_STOP_FAIL 

User space tracer: failed to stop tracing.

LTTNG_ERR_UST_CONSUMER64_FAIL 

Failed to start a 64-bit user space consumer daemon.

LTTNG_ERR_UST_CONSUMER32_FAIL 

Failed to start a 32-bit user space consumer daemon.

LTTNG_ERR_NO_CHANNEL 

Recording session has no event record channels.

LTTNG_ERR_SESSION_INVALID_CHAR 

Recording session name contains an invalid character.

LTTNG_ERR_UST_LIST_FAIL 

Failed to list user space recording event rules.

LTTNG_ERR_UST_EVENT_EXIST 

User space recording event rule already exists.

LTTNG_ERR_UST_EVENT_NOT_FOUND 

User space recording event rule not found.

LTTNG_ERR_UST_CONTEXT_EXIST 

Context field to be recorded to the event records of a user space event record channel already exists.

LTTNG_ERR_UST_CONTEXT_INVAL 

Invalid/unknown context field type.

LTTNG_ERR_NEED_ROOT_SESSIOND 

A root session daemon is required, but isn't available.

See Session daemon connection.

LTTNG_ERR_TRACE_ALREADY_STARTED 

Recording session is already active (started).

LTTNG_ERR_TRACE_ALREADY_STOPPED 

Recording session is already inactive (stopped).

LTTNG_ERR_KERN_EVENT_ENOSYS 

Linux kernel instrumentation point type not supported.

LTTNG_ERR_NEED_CHANNEL_NAME 

An event record channel name is required because a non-default event record channel exists within the selected recording session and tracing domain.

LTTNG_ERR_NO_UST 

Event record channel name is required because a non-default event record channel exists within the recording session.

LTTNG_ERR_SAVE_FILE_EXIST 

Recording session configuration file already exists.

LTTNG_ERR_SAVE_IO_FAIL 

I/O error while writing a recording session configuration file.

LTTNG_ERR_LOAD_INVALID_CONFIG 

Invalid recording session configuration file.

LTTNG_ERR_LOAD_IO_FAIL 

I/O error while reading a recording session configuration file.

LTTNG_ERR_LOAD_SESSION_NOENT 

Recording session configuration file not found.

LTTNG_ERR_MAX_SIZE_INVALID 

Maximum total size of all the snapshot trace files is invalid.

LTTNG_ERR_INVALID 

Unsatisfied precondition (invalid parameter, for example).

LTTNG_ERR_NO_USTCONSUMERD 

No user space consumer daemon available.

LTTNG_ERR_NO_KERNCONSUMERD 

No Linux kernel consumer daemon available.

LTTNG_ERR_URL_DATA_MISS 

Missing network data URL.

LTTNG_ERR_URL_CTRL_MISS 

Missing network control URL.

LTTNG_ERR_ENABLE_CONSUMER_FAIL 

Failed to communicate with a consumer daemon.

LTTNG_ERR_RELAYD_CONNECT_FAIL 

Failed to connect to or communicate with a relay daemon (see lttng-relayd(8)).

LTTNG_ERR_RELAYD_VERSION_FAIL 

Incompatible relay daemon (see lttng-relayd(8)) version.

LTTNG_ERR_FILTER_INVAL 

Invalid context and event payload filter expression.

LTTNG_ERR_FILTER_NOMEM 

Failed to allocate memory for a context and event payload filter object.

LTTNG_ERR_NO_CONSUMER 

No available consumer daemon.

LTTNG_ERR_EXCLUSION_INVAL 

Invalid event name exclusion data.

LTTNG_ERR_EXCLUSION_NOMEM 

Failed to allocate memory for an event name exclusion object.

LTTNG_ERR_INVALID_EVENT_NAME 

Invalid event name condition part of a recording event rule.

LTTNG_ERR_INVALID_CHANNEL_NAME 

Invalid event record channel name.

LTTNG_ERR_PROCESS_ATTR_EXISTS 

Process attribute is already part of an inclusion set.

LTTNG_ERR_PROCESS_ATTR_MISSING 

Process attribute isn't part of an inclusion set.

LTTNG_ERR_INVALID_CHANNEL_DOMAIN 

Invalid tracing domain for event record channel.

LTTNG_ERR_OVERFLOW 

Overflow.

LTTNG_ERR_SESSION_NOT_STARTED 

Recording session isn't active (started).

LTTNG_ERR_LIVE_SESSION 

Unsupported LTTng live recording session mode.

LTTNG_ERR_PER_PID_SESSION 

Unsupported process buffer ownership model.

LTTNG_ERR_KERN_CONTEXT_UNAVAILABLE 

Context field type isn't available on the current Linux kernel.

LTTNG_ERR_REGEN_STATEDUMP_FAIL 

Failed to regenerate the LTTng state dump event records.

LTTNG_ERR_REGEN_STATEDUMP_NOMEM 

Failed to allocate memory to regenerate the LTTng state dump event records.

LTTNG_ERR_NOT_SNAPSHOT_SESSION 

Recording session isn't in snapshot mode.

LTTNG_ERR_INVALID_TRIGGER 

Invalid trigger.

LTTNG_ERR_TRIGGER_EXISTS 

Trigger already exists (registered).

LTTNG_ERR_TRIGGER_NOT_FOUND 

Trigger not found.

LTTNG_ERR_ROTATION_PENDING 

Recording session rotation operation already in progress.

LTTNG_ERR_ROTATION_NOT_AVAILABLE 

Recording session rotation feature isn't available for the mode of the given recording session.

LTTNG_ERR_ROTATION_SCHEDULE_SET 

Recording session rotation schedule already set.

LTTNG_ERR_ROTATION_SCHEDULE_NOT_SET 

Recording session rotation schedule isn't set.

LTTNG_ERR_ROTATION_MULTIPLE_AFTER_STOP 

LTTng already archived the current trace chunk of the recording session since it became inactive (stopped).

LTTNG_ERR_ROTATION_WRONG_VERSION 

Linux kernel tracer: unavailable recording session rotation feature.

LTTNG_ERR_NO_SESSION_OUTPUT 

Recording session has no configured output.

LTTNG_ERR_ROTATION_NOT_AVAILABLE_RELAY 

Relay daemon: unavailable recording session rotation feature.

LTTNG_ERR_AGENT_TRACING_DISABLED 

Unavailable logging instrumentation point feature.

LTTNG_ERR_PROBE_LOCATION_INVAL 

Invalid user space probe location.

LTTNG_ERR_ELF_PARSING 

Failed to parse ELF file.

LTTNG_ERR_SDT_PROBE_SEMAPHORE 

SystemTap User-level Statically Defined Tracing (USDT) probe guarded by a semaphore.

LTTNG_ERR_ROTATION_FAIL_CONSUMER 

Consumer daemon failed to perform a recording session rotation operation.

LTTNG_ERR_CHAN_NOT_FOUND 

Event record channel not found.

LTTNG_ERR_SNAPSHOT_UNSUPPORTED 

Cannot take a snapshot with the current recording session configuration.

LTTNG_ERR_SESSION_NOT_EXIST 

Nonexistent recording session.

LTTNG_ERR_CREATE_TRACE_CHUNK_FAIL_CONSUMER 

Consumer daemon failed to create a trace chunk archive.

LTTNG_ERR_CLOSE_TRACE_CHUNK_FAIL_CONSUMER 

Consumer daemon failed to close a trace chunk archive.

LTTNG_ERR_INVALID_PROTOCOL 

Invalid protocol.

LTTNG_ERR_FILE_CREATION_ERROR 

Failed to create a file.

LTTNG_ERR_TIMER_STOP_ERROR 

Failed to stop a timer.

LTTNG_ERR_ROTATION_NOT_AVAILABLE_KERNEL 

Linux kernel tracer: recording session rotation feature isn't available.

LTTNG_ERR_CLEAR_RELAY_DISALLOWED 

The relay daemon (see lttng-relayd(8)) doesn't allow recording session clearing operations.

LTTNG_ERR_CLEAR_NOT_AVAILABLE_RELAY 

The relay daemon (see lttng-relayd(8)) doesn't support the recording session clearing operation.

LTTNG_ERR_CLEAR_FAIL_CONSUMER 

Consumer daemon failed to clear the recording session.

LTTNG_ERR_ROTATION_AFTER_STOP_CLEAR 

LTTng already cleared the recording session since it became inactive (stopped).

LTTNG_ERR_PROCESS_ATTR_TRACKER_INVALID_TRACKING_POLICY 

Invalid operation considering the policy of the process filter.

LTTNG_ERR_EVENT_NOTIFIER_GROUP_NOTIFICATION_FD 

Failed to initialize the file descriptor of the event notifier group notification.

LTTNG_ERR_INVALID_CAPTURE_EXPRESSION 

Invalid event field capture expression.

LTTNG_ERR_EVENT_NOTIFIER_REGISTRATION 

Failed to register the event notifier to the tracer.

LTTNG_ERR_EVENT_NOTIFIER_ERROR_ACCOUNTING 

Failed to initialize the event notifier error accounting.

LTTNG_ERR_EVENT_NOTIFIER_ERROR_ACCOUNTING_FULL 

Event notifier error accouting is full.

LTTNG_ERR_INVALID_ERROR_QUERY_TARGET 

Invalid error query target.

LTTNG_ERR_BUFFER_FLUSH_FAILED 

Failed to flush a buffer.

LTTNG_ERR_INVALID_RECLAMATION_POLICY 

Invalid reclamation policy.

LTTNG_ERR_UNSUPPORTED_TRACE_FORMAT 

Trace format is not supported.

LTTNG_ERR_PID_TRACKED 

Process attribute is already part of an inclusion set.

Deprecated:
Use LTTNG_ERR_PROCESS_ATTR_EXISTS.
LTTNG_ERR_PID_NOT_TRACKED 

Process attribute isn't part of an inclusion set.

Deprecated:
Use LTTNG_ERR_PROCESS_ATTR_MISSING.

◆ lttng_kernel_tracer_status

The status of an LTTng kernel tracer.

See also
lttng_get_kernel_tracer_status() – Get the current LTTng kernel tracer status.
Enumerator
LTTNG_KERNEL_TRACER_STATUS_INITIALIZED 

Loaded without error.

LTTNG_KERNEL_TRACER_STATUS_ERR_UNKNOWN 

Unknown error.

LTTNG_KERNEL_TRACER_STATUS_ERR_NEED_ROOT 

liblttng-ctl cannot connect to the session daemon of the root user (the root session daemon).

See Session daemon connection.

LTTNG_KERNEL_TRACER_STATUS_ERR_NOTIFIER 

Notifier setup failed.

LTTNG_KERNEL_TRACER_STATUS_ERR_OPEN_PROC_LTTNG 

Failed to open /proc/lttng.

LTTNG_KERNEL_TRACER_STATUS_ERR_VERSION_MISMATCH 

Version mismatch between kernel tracer and kernel tracer ABI.

LTTNG_KERNEL_TRACER_STATUS_ERR_MODULES_UNKNOWN 

LTTng kernel module loading failed.

LTTNG_KERNEL_TRACER_STATUS_ERR_MODULES_MISSING 

Missing LTTng kernel modules.

LTTNG_KERNEL_TRACER_STATUS_ERR_MODULES_SIGNATURE 

LTTng kernel module signature error.

Function Documentation

◆ lttng_get_kernel_tracer_status()

enum lttng_error_code lttng_get_kernel_tracer_status ( enum lttng_kernel_tracer_status status)
extern

Sets *status to the current status of the LTTng kernel tracer.

Parameters
[out]statusOn success, this function sets *status to the current status of the kernel tracer.
Return values
LTTNG_OKSuccess.
LTTNG_ERR_INVALIDUnsatisfied precondition.
Precondition

◆ lttng_session_daemon_alive()

int lttng_session_daemon_alive ( void  )
extern

Returns whether or not liblttng-ctl is able to connect to a listening session daemon.

How this function tries to connect to a session daemon depends on the current Unix tracing group (initially tracing) of the library. Set the tracing group with lttng_set_tracing_group().

Returns

One of:

1

liblttng-ctl is able to connect to a session daemon.

0

liblttng-ctl isn't able to connect to a session daemon.

Negative lttng_error_code enumerator
Error.
See also
lttng_set_tracing_group() – Sets the current Unix tracing group of liblttng-ctl.

◆ lttng_set_tracing_group()

int lttng_set_tracing_group ( const char *  group)
extern

Sets the current Unix tracing group of liblttng-ctl to group.

How the liblttng-ctl functions connect to a session daemon depends on the current Unix tracing group (initially tracing) of the library.

Parameters
[in]groupNew Unix tracing group of liblttng-ctl (copied).
Returns
0

Success.

-LTTNG_ERR_INVALID (negative)

Unsatisfied precondition.

-LTTNG_ERR_FATAL (negative)
Out of memory.
Precondition
  • group is not NULL.
  • group names an existing Unix group.

◆ lttng_strerror()

const char * lttng_strerror ( int  error_code)
extern

Returns a human-readable message for the general error code error_code.

Parameters
[in]error_codeError code (one of the lttng_error_code enumerators), positive or negative, for which to get a corresponding human-readable message.
Returns
Human-readable message which corresponds to error_code.
Precondition