tracetools_trace.tools.lttng module
Interface for tracing with LTTng.
- tracetools_trace.tools.lttng.get_lttng_version() Version | None
Get version of lttng-ctl.
- Returns:
the version of lttng-ctl, or None if it is not available
- tracetools_trace.tools.lttng.is_lttng_installed(*, minimum_version: str | None = None) bool
Check if LTTng is installed.
It first checks if the OS can support LTTng. If so, it then checks if lttng-ctl is installed.
Optionally, a minimum version can also be specified for lttng-ctl.
- Parameters:
minimum_version – the minimum required lttng-ctl version
- Returns:
True if lttng-ctl is installed, and optionally if the version of lttng-ctl is sufficient, False otherwise
- tracetools_trace.tools.lttng.lttng_fini(**kwargs) None
Stop and destroy LTTng session.
Raises RuntimeError on failure.
- Parameters:
session_name – the name of the session
- tracetools_trace.tools.lttng.lttng_init(**kwargs) str | None
Set up and start LTTng session.
For the full list of kwargs, see lttng_impl.setup().
Raises RuntimeError on failure, in which case the tracing session might still exist.
- Returns:
the full path to the trace directory, or None if initialization failed
- tracetools_trace.tools.lttng.lttng_start(**kwargs) None
Start tracing.
Raises RuntimeError on failure.
- Parameters:
session_name – the name of the session
- tracetools_trace.tools.lttng.lttng_stop(**kwargs) None
Stop tracing.
Raises RuntimeError on failure.
- Parameters:
session_name – the name of the session