Extend API and remove lttng_uri from lttng.h
[lttng-tools.git] / include / lttng / lttng.h
CommitLineData
826d496d 1/*
b7384347
DG
2 * lttng.h
3 *
4 * Linux Trace Toolkit Control Library Header File
5 *
826d496d 6 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
fac6795d 7 *
1e46a50f 8 * This library is free software; you can redistribute it and/or modify it
d14d33bf
AM
9 * under the terms of the GNU Lesser General Public License, version 2.1 only,
10 * as published by the Free Software Foundation.
82a3637f 11 *
1e46a50f
TD
12 * This library is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15 * for more details.
82a3637f 16 *
1e46a50f
TD
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
fac6795d
DG
20 */
21
b7384347
DG
22#ifndef _LTTNG_H
23#define _LTTNG_H
fac6795d 24
57167058 25#include <limits.h>
1e307fab
DG
26#include <stdint.h>
27#include <sys/types.h>
57167058 28
b7384347 29/*
e6ddca71 30 * Event symbol length. Copied from LTTng kernel ABI.
1657e9bb 31 */
8d326ab9 32#define LTTNG_SYMBOL_NAME_LEN 256
f3ed775e 33
3a5713da
DG
34/*
35 * Maximum length of a domain name. This is the limit for the total length of a
36 * domain name specified by the RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt)
37 */
38#define LTTNG_MAX_DNNAME 255
39
e6ddca71
DG
40/*
41 * Every lttng_event_* structure both apply to kernel event and user-space
42 * event.
e6ddca71
DG
43 */
44
7d29a247 45/*
1e46a50f 46 * Domain types: the different possible tracers.
7d29a247
DG
47 */
48enum lttng_domain_type {
0d0c377a
DG
49 LTTNG_DOMAIN_KERNEL = 1,
50 LTTNG_DOMAIN_UST = 2,
d78d6610
DG
51
52 /*
53 * For now, the domains below are not implemented. However, we keep them
54 * here in order to retain their enum values for future development. Note
55 * that it is on the roadmap to implement them.
56 *
0d0c377a
DG
57 LTTNG_DOMAIN_UST_EXEC_NAME = 3,
58 LTTNG_DOMAIN_UST_PID = 4,
59 LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN = 5,
d78d6610 60 */
7d29a247
DG
61};
62
7d29a247
DG
63/*
64 * Instrumentation type of tracing event.
65 */
f3ed775e 66enum lttng_event_type {
7a3d1328
MD
67 LTTNG_EVENT_ALL = -1,
68 LTTNG_EVENT_TRACEPOINT = 0,
69 LTTNG_EVENT_PROBE = 1,
70 LTTNG_EVENT_FUNCTION = 2,
71 LTTNG_EVENT_FUNCTION_ENTRY = 3,
72 LTTNG_EVENT_NOOP = 4,
73 LTTNG_EVENT_SYSCALL = 5,
0cda4f28
MD
74};
75
76/*
77 * Loglevel information.
78 */
79enum lttng_loglevel_type {
8005f29a
MD
80 LTTNG_EVENT_LOGLEVEL_ALL = 0,
81 LTTNG_EVENT_LOGLEVEL_RANGE = 1,
82 LTTNG_EVENT_LOGLEVEL_SINGLE = 2,
1657e9bb
DG
83};
84
46839cc2
MD
85/*
86 * Available loglevels.
87 */
88enum lttng_loglevel {
00e2e675
DG
89 LTTNG_LOGLEVEL_EMERG = 0,
90 LTTNG_LOGLEVEL_ALERT = 1,
91 LTTNG_LOGLEVEL_CRIT = 2,
92 LTTNG_LOGLEVEL_ERR = 3,
93 LTTNG_LOGLEVEL_WARNING = 4,
94 LTTNG_LOGLEVEL_NOTICE = 5,
95 LTTNG_LOGLEVEL_INFO = 6,
96 LTTNG_LOGLEVEL_DEBUG_SYSTEM = 7,
97 LTTNG_LOGLEVEL_DEBUG_PROGRAM = 8,
98 LTTNG_LOGLEVEL_DEBUG_PROCESS = 9,
99 LTTNG_LOGLEVEL_DEBUG_MODULE = 10,
100 LTTNG_LOGLEVEL_DEBUG_UNIT = 11,
101 LTTNG_LOGLEVEL_DEBUG_FUNCTION = 12,
102 LTTNG_LOGLEVEL_DEBUG_LINE = 13,
103 LTTNG_LOGLEVEL_DEBUG = 14,
46839cc2
MD
104};
105
e6ddca71
DG
106/*
107 * LTTng consumer mode
108 */
109enum lttng_event_output {
d78d6610
DG
110 LTTNG_EVENT_SPLICE = 0,
111 LTTNG_EVENT_MMAP = 1,
e6ddca71
DG
112};
113
7d29a247
DG
114/* Event context possible type */
115enum lttng_event_context_type {
d78d6610
DG
116 LTTNG_EVENT_CONTEXT_PID = 0,
117 LTTNG_EVENT_CONTEXT_PERF_COUNTER = 1,
9197c5c4 118 LTTNG_EVENT_CONTEXT_PROCNAME = 2,
d78d6610
DG
119 LTTNG_EVENT_CONTEXT_PRIO = 3,
120 LTTNG_EVENT_CONTEXT_NICE = 4,
121 LTTNG_EVENT_CONTEXT_VPID = 5,
122 LTTNG_EVENT_CONTEXT_TID = 6,
123 LTTNG_EVENT_CONTEXT_VTID = 7,
124 LTTNG_EVENT_CONTEXT_PPID = 8,
125 LTTNG_EVENT_CONTEXT_VPPID = 9,
9197c5c4 126 LTTNG_EVENT_CONTEXT_PTHREAD_ID = 10,
d65106b1
DG
127};
128
d0254c7c 129enum lttng_calibrate_type {
d78d6610 130 LTTNG_CALIBRATE_FUNCTION = 0,
d0254c7c
MD
131};
132
44a5e5eb
DG
133/* Health component for the health check function. */
134enum lttng_health_component {
135 LTTNG_HEALTH_CMD,
139ac872 136 LTTNG_HEALTH_APP_MANAGE,
44a5e5eb
DG
137 LTTNG_HEALTH_APP_REG,
138 LTTNG_HEALTH_KERNEL,
139 LTTNG_HEALTH_CONSUMER,
140 LTTNG_HEALTH_ALL,
141};
142
ece640c8
RB
143/*
144 * The structures should be initialized to zero before use.
145 */
8d326ab9
DG
146#define LTTNG_DOMAIN_PADDING1 16
147#define LTTNG_DOMAIN_PADDING2 LTTNG_SYMBOL_NAME_LEN + 32
9f19cc17
DG
148struct lttng_domain {
149 enum lttng_domain_type type;
8d326ab9
DG
150 char padding[LTTNG_DOMAIN_PADDING1];
151
9f19cc17
DG
152 union {
153 pid_t pid;
154 char exec_name[NAME_MAX];
8d326ab9 155 char padding[LTTNG_DOMAIN_PADDING2];
9f19cc17
DG
156 } attr;
157};
158
ece640c8
RB
159/*
160 * Perf counter attributes
161 *
162 * The structures should be initialized to zero before use.
163 */
8d326ab9 164#define LTTNG_PERF_EVENT_PADDING1 16
7d29a247 165struct lttng_event_perf_counter_ctx {
d65106b1
DG
166 uint32_t type;
167 uint64_t config;
168 char name[LTTNG_SYMBOL_NAME_LEN];
8d326ab9
DG
169
170 char padding[LTTNG_PERF_EVENT_PADDING1];
d65106b1
DG
171};
172
ece640c8
RB
173/*
174 * Event/channel context
175 *
176 * The structures should be initialized to zero before use.
177 */
8d326ab9
DG
178#define LTTNG_EVENT_CONTEXT_PADDING1 16
179#define LTTNG_EVENT_CONTEXT_PADDING2 LTTNG_SYMBOL_NAME_LEN + 32
7d29a247
DG
180struct lttng_event_context {
181 enum lttng_event_context_type ctx;
8d326ab9
DG
182 char padding[LTTNG_EVENT_CONTEXT_PADDING1];
183
d65106b1 184 union {
7d29a247 185 struct lttng_event_perf_counter_ctx perf_counter;
8d326ab9 186 char padding[LTTNG_EVENT_CONTEXT_PADDING2];
d65106b1
DG
187 } u;
188};
189
b7384347 190/*
7d29a247
DG
191 * Event probe.
192 *
193 * Either addr is used or symbol_name and offset.
ece640c8
RB
194 *
195 * The structures should be initialized to zero before use.
57167058 196 */
8d326ab9 197#define LTTNG_EVENT_PROBE_PADDING1 16
7d29a247 198struct lttng_event_probe_attr {
f3ed775e
DG
199 uint64_t addr;
200
201 uint64_t offset;
202 char symbol_name[LTTNG_SYMBOL_NAME_LEN];
8d326ab9
DG
203
204 char padding[LTTNG_EVENT_PROBE_PADDING1];
57167058
DG
205};
206
b7384347 207/*
f3ed775e 208 * Function tracer
ece640c8
RB
209 *
210 * The structures should be initialized to zero before use.
f3ed775e 211 */
8d326ab9 212#define LTTNG_EVENT_FUNCTION_PADDING1 16
f3ed775e
DG
213struct lttng_event_function_attr {
214 char symbol_name[LTTNG_SYMBOL_NAME_LEN];
8d326ab9
DG
215
216 char padding[LTTNG_EVENT_FUNCTION_PADDING1];
f3ed775e
DG
217};
218
219/*
220 * Generic lttng event
ece640c8
RB
221 *
222 * The structures should be initialized to zero before use.
f3ed775e 223 */
fceb65df 224#define LTTNG_EVENT_PADDING1 15
8d326ab9 225#define LTTNG_EVENT_PADDING2 LTTNG_SYMBOL_NAME_LEN + 32
f3ed775e 226struct lttng_event {
0cda4f28 227 enum lttng_event_type type;
f3ed775e 228 char name[LTTNG_SYMBOL_NAME_LEN];
0cda4f28
MD
229
230 enum lttng_loglevel_type loglevel_type;
8005f29a 231 int loglevel;
0cda4f28 232
35dc4d62 233 int32_t enabled; /* Does not apply: -1 */
b551a063 234 pid_t pid;
fceb65df 235 unsigned char filter; /* filter enabled ? */
8d326ab9
DG
236
237 char padding[LTTNG_EVENT_PADDING1];
238
f3ed775e
DG
239 /* Per event type configuration */
240 union {
7d29a247 241 struct lttng_event_probe_attr probe;
f3ed775e 242 struct lttng_event_function_attr ftrace;
8d326ab9
DG
243
244 char padding[LTTNG_EVENT_PADDING2];
f3ed775e
DG
245 } attr;
246};
247
f37d259d
MD
248enum lttng_event_field_type {
249 LTTNG_EVENT_FIELD_OTHER = 0,
250 LTTNG_EVENT_FIELD_INTEGER = 1,
251 LTTNG_EVENT_FIELD_ENUM = 2,
252 LTTNG_EVENT_FIELD_FLOAT = 3,
253 LTTNG_EVENT_FIELD_STRING = 4,
254};
255
256#define LTTNG_EVENT_FIELD_PADDING LTTNG_SYMBOL_NAME_LEN + 32
257struct lttng_event_field {
258 char field_name[LTTNG_SYMBOL_NAME_LEN];
259 enum lttng_event_field_type type;
260 char padding[LTTNG_EVENT_FIELD_PADDING];
261 struct lttng_event event;
262};
263
e6ddca71
DG
264/*
265 * Tracer channel attributes. For both kernel and user-space.
ece640c8
RB
266 *
267 * The structures should be initialized to zero before use.
e6ddca71 268 */
8d326ab9 269#define LTTNG_CHANNEL_ATTR_PADDING1 LTTNG_SYMBOL_NAME_LEN + 32
f3ed775e 270struct lttng_channel_attr {
8ce37aa5
DG
271 int overwrite; /* 1: overwrite, 0: discard */
272 uint64_t subbuf_size; /* bytes */
273 uint64_t num_subbuf; /* power of 2 */
274 unsigned int switch_timer_interval; /* usec */
275 unsigned int read_timer_interval; /* usec */
f05b5f07 276 enum lttng_event_output output; /* splice, mmap */
8d326ab9
DG
277
278 char padding[LTTNG_CHANNEL_ATTR_PADDING1];
f3ed775e
DG
279};
280
281/*
e6ddca71 282 * Channel information structure. For both kernel and user-space.
ece640c8
RB
283 *
284 * The structures should be initialized to zero before use.
1657e9bb 285 */
8d326ab9 286#define LTTNG_CHANNEL_PADDING1 16
e6ddca71 287struct lttng_channel {
045e5491 288 char name[LTTNG_SYMBOL_NAME_LEN];
9f19cc17 289 uint32_t enabled;
e6ddca71 290 struct lttng_channel_attr attr;
8d326ab9
DG
291
292 char padding[LTTNG_CHANNEL_PADDING1];
f3ed775e
DG
293};
294
8d326ab9 295#define LTTNG_CALIBRATE_PADDING1 16
d0254c7c
MD
296struct lttng_calibrate {
297 enum lttng_calibrate_type type;
8d326ab9
DG
298
299 char padding[LTTNG_CALIBRATE_PADDING1];
d0254c7c
MD
300};
301
e6ddca71
DG
302/*
303 * Basic session information.
304 *
305 * This is an 'output data' meaning that it only comes *from* the session
306 * daemon *to* the lttng client. It's basically a 'human' representation of
307 * tracing entities (here a session).
ece640c8
RB
308 *
309 * The structures should be initialized to zero before use.
e6ddca71 310 */
8d326ab9 311#define LTTNG_SESSION_PADDING1 16
e6ddca71 312struct lttng_session {
f3ed775e 313 char name[NAME_MAX];
e6ddca71
DG
314 /* The path where traces are written */
315 char path[PATH_MAX];
464dd62d 316 uint32_t enabled; /* enabled/started: 1, disabled/stopped: 0 */
8d326ab9
DG
317
318 char padding[LTTNG_SESSION_PADDING1];
1657e9bb
DG
319};
320
cd80958d
DG
321/*
322 * Handle used as a context for commands.
ece640c8
RB
323 *
324 * The structures should be initialized to zero before use.
cd80958d 325 */
8d326ab9 326#define LTTNG_HANDLE_PADDING1 16
cd80958d
DG
327struct lttng_handle {
328 char session_name[NAME_MAX];
329 struct lttng_domain domain;
8d326ab9
DG
330
331 char padding[LTTNG_HANDLE_PADDING1];
cd80958d
DG
332};
333
7d29a247
DG
334/*
335 * Public LTTng control API
336 *
1e46a50f 337 * For functions having an lttng domain type as parameter, if a bad value is
7d29a247
DG
338 * given, NO default is applied and an error is returned.
339 *
340 * On success, all functions of the API return 0 or the size of the allocated
1e46a50f 341 * array (in bytes).
7d29a247
DG
342 *
343 * On error, a negative value is returned being a specific lttng-tools error
9a745bc7 344 * code which can be humanly interpreted with lttng_strerror(err).
1e46a50f
TD
345 *
346 * Exceptions to this are noted below.
7d29a247
DG
347 */
348
b7384347 349/*
1e46a50f 350 * Create a handle used as a context for every request made to the library.
cd80958d
DG
351 *
352 * This handle contains the session name and lttng domain on which the command
1e46a50f
TD
353 * will be executed.
354 * The returned pointer will be NULL in case of malloc() error.
cd80958d
DG
355 */
356extern struct lttng_handle *lttng_create_handle(const char *session_name,
357 struct lttng_domain *domain);
358
359/*
1e46a50f
TD
360 * Destroy a handle. This will simply free(3) the data pointer returned by
361 * lttng_create_handle(), rendering it unusable.
b7384347 362 */
cd80958d 363extern void lttng_destroy_handle(struct lttng_handle *handle);
7d29a247
DG
364
365/*
a4b92340
DG
366 * Create a tracing session using a name and an optional URL.
367 *
368 * If _url_ is NULL, no consumer is created for the session.
00e2e675 369 */
a4b92340 370extern int lttng_create_session(const char *name, const char *url);
00e2e675 371
7d29a247 372/*
1e46a50f 373 * Destroy a tracing session.
7d29a247 374 *
1e46a50f
TD
375 * The session will not be usable anymore, tracing will be stopped for all
376 * registered traces, and the tracing buffers will be flushed.
7d29a247 377 */
843f5df9 378extern int lttng_destroy_session(const char *name);
f3ed775e 379
e6ddca71 380/*
1e46a50f 381 * List all the tracing sessions.
7d29a247 382 *
1e46a50f
TD
383 * Return the size (number of entries) of the "lttng_session" array. Caller
384 * must free(3).
e6ddca71 385 */
ca95a216 386extern int lttng_list_sessions(struct lttng_session **sessions);
f3ed775e 387
9f19cc17 388/*
1e46a50f 389 * List the registered domain(s) of a session.
9f19cc17 390 *
1e46a50f
TD
391 * Return the size (number of entries) of the "lttng_domain" array. Caller
392 * must free(3).
9f19cc17 393 */
330be774 394extern int lttng_list_domains(const char *session_name,
9f19cc17
DG
395 struct lttng_domain **domains);
396
397/*
1e46a50f 398 * List the channel(s) of a session.
9f19cc17 399 *
1e46a50f
TD
400 * Return the size (number of entries) of the "lttng_channel" array. Caller
401 * must free(3).
9f19cc17 402 */
cd80958d
DG
403extern int lttng_list_channels(struct lttng_handle *handle,
404 struct lttng_channel **channels);
9f19cc17
DG
405
406/*
1e46a50f 407 * List the event(s) of a session channel.
9f19cc17 408 *
1e46a50f
TD
409 * Return the size (number of entries) of the "lttng_event" array.
410 * Caller must free(3).
9f19cc17 411 */
cd80958d
DG
412extern int lttng_list_events(struct lttng_handle *handle,
413 const char *channel_name, struct lttng_event **events);
9f19cc17
DG
414
415/*
1e46a50f 416 * List the available tracepoints of a specific lttng domain.
9f19cc17 417 *
1e46a50f
TD
418 * Return the size (number of entries) of the "lttng_event" array.
419 * Caller must free(3).
9f19cc17 420 */
cd80958d 421extern int lttng_list_tracepoints(struct lttng_handle *handle,
2a71efd5 422 struct lttng_event **events);
9f19cc17 423
f37d259d
MD
424/*
425 * List the available tracepoints fields of a specific lttng domain.
426 *
427 * Return the size (number of entries) of the "lttng_event_field" array.
428 * Caller must free(3).
429 */
430extern int lttng_list_tracepoint_fields(struct lttng_handle *handle,
431 struct lttng_event_field **fields);
432
7d29a247
DG
433/*
434 * Check if a session daemon is alive.
1e46a50f
TD
435 *
436 * Return 1 if alive or 0 if not. On error returns a negative value.
7d29a247 437 */
947308c4 438extern int lttng_session_daemon_alive(void);
f3ed775e 439
7d29a247 440/*
1e46a50f
TD
441 * Set the tracing group for the *current* flow of execution.
442 *
443 * On success, returns 0, on error, returns -1 (null name) or -ENOMEM.
7d29a247 444 */
b7384347 445extern int lttng_set_tracing_group(const char *name);
f3ed775e 446
7d29a247 447/*
1e46a50f 448 * Return a human-readable error message for an lttng-tools error code.
7d29a247
DG
449 *
450 * Parameter MUST be a negative value or else you'll get a generic message.
451 */
9a745bc7 452extern const char *lttng_strerror(int code);
b7384347 453
d9800920 454/*
1e46a50f
TD
455 * This call registers an "outside consumer" for a session and an lttng domain.
456 * No consumer will be spawned and all fds/commands will go through the socket
457 * path given (socket_path).
d9800920 458 *
3bd1e081 459 * NOTE: At the moment, if you use the liblttng-kconsumer, you can only use the
d9800920
DG
460 * command socket. The error socket is not supported yet for roaming consumers.
461 */
462extern int lttng_register_consumer(struct lttng_handle *handle,
463 const char *socket_path);
464
7d29a247 465/*
1e46a50f 466 * Start tracing for *all* registered traces (kernel and user-space).
7d29a247 467 */
6a4f824d 468extern int lttng_start_tracing(const char *session_name);
f3ed775e 469
7d29a247 470/*
1e46a50f 471 * Stop tracing for *all* registered traces (kernel and user-space).
7d29a247 472 */
6a4f824d 473extern int lttng_stop_tracing(const char *session_name);
f3ed775e 474
b7384347 475/*
1e46a50f 476 * Add context to event(s) for a specific channel (or for all).
7d29a247 477 *
1e46a50f 478 * If event_name is NULL, the context is applied to all events of the channel.
7d29a247 479 * If channel_name is NULL, a lookup of the event's channel is done.
1e46a50f 480 * If both are NULL, the context is applied to all events of all channels.
b7384347 481 */
cd80958d 482extern int lttng_add_context(struct lttng_handle *handle,
38057ed1
DG
483 struct lttng_event_context *ctx, const char *event_name,
484 const char *channel_name);
f3ed775e 485
7d29a247 486/*
c8f61fc6 487 * Create or enable an event (or events) for a channel.
7d29a247
DG
488 *
489 * If the event you are trying to enable does not exist, it will be created,
490 * else it is enabled.
1e46a50f 491 * If event_name is NULL, all events are enabled.
7d29a247
DG
492 * If channel_name is NULL, the default channel is used (channel0).
493 */
cd80958d
DG
494extern int lttng_enable_event(struct lttng_handle *handle,
495 struct lttng_event *ev, const char *channel_name);
f3ed775e 496
53a80697
MD
497/*
498 * Apply a filter expression to an event.
499 *
500 * If event_name is NULL, the filter is applied to all events of the channel.
501 * If channel_name is NULL, a lookup of the event's channel is done.
502 * If both are NULL, the filter is applied to all events of all channels.
503 */
504extern int lttng_set_event_filter(struct lttng_handle *handle,
505 const char *event_name,
506 const char *channel_name,
507 const char *filter_expression);
7d29a247 508/*
c8f61fc6 509 * Create or enable a channel.
1e46a50f 510 * The channel name cannot be NULL.
7d29a247 511 */
cd80958d 512extern int lttng_enable_channel(struct lttng_handle *handle,
38057ed1 513 struct lttng_channel *chan);
f3ed775e 514
7d29a247 515/*
c8f61fc6 516 * Disable event(s) of a channel and domain.
7d29a247 517 *
1e46a50f 518 * If event_name is NULL, all events are disabled.
7d29a247
DG
519 * If channel_name is NULL, the default channel is used (channel0).
520 */
cd80958d
DG
521extern int lttng_disable_event(struct lttng_handle *handle,
522 const char *name, const char *channel_name);
fac6795d 523
1df4dedd 524/*
c8f61fc6 525 * Disable channel.
7d29a247 526 *
1e46a50f 527 * The channel name cannot be NULL.
1df4dedd 528 */
cd80958d 529extern int lttng_disable_channel(struct lttng_handle *handle,
38057ed1 530 const char *name);
1df4dedd 531
d0254c7c
MD
532/*
533 * Calibrate LTTng overhead.
534 */
cd80958d 535extern int lttng_calibrate(struct lttng_handle *handle,
d0254c7c
MD
536 struct lttng_calibrate *calibrate);
537
5edd7e09
DG
538/*
539 * Set the default channel attributes for a specific domain and an allocated
540 * lttng_channel_attr pointer.
1e46a50f
TD
541 *
542 * If either or both of the arguments are NULL, nothing happens.
5edd7e09
DG
543 */
544extern void lttng_channel_set_default_attr(struct lttng_domain *domain,
545 struct lttng_channel_attr *attr);
546
00e2e675 547/*
a4b92340
DG
548 * Set URL for a consumer for a session and domain.
549 *
550 * Both data and control URL must be defined. If both URLs are the same, only
551 * the control URL is used even for network streaming.
00e2e675 552 *
a4b92340
DG
553 * Default port are 5342 and 5343 respectively for control and data which uses
554 * the TCP protocol.
00e2e675 555 */
a4b92340
DG
556extern int lttng_set_consumer_url(struct lttng_handle *handle,
557 const char *control_url, const char *data_url);
00e2e675
DG
558
559/*
560 * Enable the consumer for a session and domain.
561 */
562extern int lttng_enable_consumer(struct lttng_handle *handle);
563
564/*
565 * Disable consumer for a session and domain.
566 */
567extern int lttng_disable_consumer(struct lttng_handle *handle);
568
44a5e5eb
DG
569/*
570 * Check session daemon health for a specific component.
571 *
572 * Return 0 if health is OK or 1 if BAD. A returned value of -1 indicate that
573 * the control library was not able to connect to the session daemon health
574 * socket.
575 *
576 * Any other positive value is an lttcomm error which can be translate with
577 * lttng_strerror().
578 */
579extern int lttng_health_check(enum lttng_health_component c);
580
b7384347 581#endif /* _LTTNG_H */
This page took 0.05568 seconds and 4 git commands to generate.