LTTng control library C API
Loading...
Searching...
No Matches
session-descriptor.h
1/*
2 * SPDX-FileCopyrightText: 2019 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8#ifndef LTTNG_SESSION_DESCRIPTOR_H
9#define LTTNG_SESSION_DESCRIPTOR_H
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#include <lttng/lttng-export.h>
16
29
46
68
106LTTNG_EXPORT extern struct lttng_session_descriptor *
107lttng_session_descriptor_create(const char *session_name);
108
174LTTNG_EXPORT extern struct lttng_session_descriptor *
175lttng_session_descriptor_local_create(const char *session_name, const char *trace_dir);
176
272 const char *session_name, const char *control_url, const char *data_url);
273
317LTTNG_EXPORT extern struct lttng_session_descriptor *
319
394LTTNG_EXPORT extern struct lttng_session_descriptor *
395lttng_session_descriptor_snapshot_local_create(const char *session_name, const char *trace_dir);
396
511LTTNG_EXPORT extern struct lttng_session_descriptor *
513 const char *control_url,
514 const char *data_url);
515
516/*
517 * NOTE: Not documented with Doxygen as what lttng_create_session_ext()
518 * creates from such a descriptor is useless (a live recording session
519 * without any output). Original documentation follows.
520 *
521 * Create a live session descriptor without an output.
522 *
523 * The 'name' parameter can be left NULL to auto-generate a session name.
524 *
525 * The 'live_timer_interval_us' parameter is the live timer's period, specified
526 * in microseconds.
527 *
528 * This parameter can't be 0. There is no default value defined for a live
529 * timer's period.
530 *
531 * Returns an lttng_session_descriptor instance on success, NULL on error.
532 */
533LTTNG_EXPORT extern struct lttng_session_descriptor *
534lttng_session_descriptor_live_create(const char *name, unsigned long long live_timer_interval_us);
535
635LTTNG_EXPORT extern struct lttng_session_descriptor *
637 const char *control_url,
638 const char *data_url,
639 unsigned long long live_timer_period);
640
681LTTNG_EXPORT extern enum lttng_session_descriptor_status
683 const char **session_name);
684
707LTTNG_EXPORT extern enum lttng_session_descriptor_status
709 enum lttng_trace_format format);
710
731LTTNG_EXPORT extern void
733
735
736#ifdef __cplusplus
737}
738#endif
739
740#endif /* LTTNG_SESSION_DESCRIPTOR_H */
lttng_session_descriptor_status
Return type of recording session descriptor functions.
Definition session-descriptor.h:36
struct lttng_session_descriptor * lttng_session_descriptor_local_create(const char *session_name, const char *trace_dir)
Creates a recording session descriptor to create a local recording session named session_name.
struct lttng_session_descriptor * lttng_session_descriptor_snapshot_network_create(const char *session_name, const char *control_url, const char *data_url)
Creates a recording session descriptor to create a snapshot recording session named session_name and ...
struct lttng_session_descriptor * lttng_session_descriptor_create(const char *session_name)
Creates a recording session descriptor to create a no-output, local recording session named session_n...
void lttng_session_descriptor_destroy(struct lttng_session_descriptor *session_descriptor)
Destroys the recording session descriptor session_descriptor.
struct lttng_session_descriptor * lttng_session_descriptor_live_network_create(const char *session_name, const char *control_url, const char *data_url, unsigned long long live_timer_period)
Creates a recording session descriptor to create a live recording session named session_name.
enum lttng_session_descriptor_status lttng_session_descriptor_get_session_name(const struct lttng_session_descriptor *session_descriptor, const char **session_name)
Sets *session_name to the name of the recording session which lttng_create_session_ext() created from...
enum lttng_session_descriptor_status lttng_session_descriptor_set_trace_format(struct lttng_session_descriptor *descriptor, enum lttng_trace_format format)
Sets the trace format of the recording session descriptor session_descriptor to format.
struct lttng_session_descriptor * lttng_session_descriptor_snapshot_create(const char *session_name)
Creates a recording session descriptor to create a snapshot recording session named session_name with...
struct lttng_session_descriptor * lttng_session_descriptor_network_create(const char *session_name, const char *control_url, const char *data_url)
Creates a recording session descriptor to create a network streaming recording session named session_...
struct lttng_session_descriptor * lttng_session_descriptor_snapshot_local_create(const char *session_name, const char *trace_dir)
Creates a recording session descriptor to create a snapshot recording session named session_name and ...
lttng_trace_format
Trace format of a recording session.
Definition session-descriptor.h:51
@ LTTNG_SESSION_DESCRIPTOR_STATUS_OK
Success.
Definition session-descriptor.h:38
@ LTTNG_SESSION_DESCRIPTOR_STATUS_UNSET
Recording session descriptor property is not set.
Definition session-descriptor.h:44
@ LTTNG_SESSION_DESCRIPTOR_STATUS_INVALID
Unsatisfied precondition.
Definition session-descriptor.h:41
@ LTTNG_TRACE_FORMAT_CTF_2
Common Trace Format version&#160;2.
Definition session-descriptor.h:66
@ LTTNG_TRACE_FORMAT_DEFAULT
Use the default trace format of the connected session daemon.
Definition session-descriptor.h:60
@ LTTNG_TRACE_FORMAT_CTF_1_8
Common Trace Format version&#160;1.8.
Definition session-descriptor.h:63
Recording session descriptor (opaque type).