trackers: update lttng-sessiond
[lttng-tools.git] / src / bin / lttng-sessiond / cmd.h
CommitLineData
2f77fc4b
DG
1/*
2 * Copyright (C) 2012 - David Goulet <dgoulet@efficios.com>
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License, version 2 only, as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 51
15 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 */
17
18#ifndef CMD_H
19#define CMD_H
20
21#include "context.h"
2f77fc4b
DG
22#include "session.h"
23
b0880ae5
JG
24struct notification_thread_handle;
25
2f77fc4b
DG
26/*
27 * Init the command subsystem. Must be called before using any of the functions
28 * above. This is called in the main() of the session daemon.
29 */
30void cmd_init(void);
31
32/* Session commands */
33int cmd_create_session_uri(char *name, struct lttng_uri *uris,
ecc48a90 34 size_t nb_uri, lttng_sock_cred *creds, unsigned int live_timer);
27babd3a
DG
35int cmd_create_session_snapshot(char *name, struct lttng_uri *uris,
36 size_t nb_uri, lttng_sock_cred *creds);
90936dcf
JD
37int cmd_destroy_session(struct ltt_session *session, int wpipe,
38 struct notification_thread_handle *notification_thread_handle);
2f77fc4b
DG
39
40/* Channel commands */
56a37563
JG
41int cmd_disable_channel(struct ltt_session *session,
42 enum lttng_domain_type domain, char *channel_name);
7972aab2 43int cmd_enable_channel(struct ltt_session *session,
56a37563
JG
44 struct lttng_domain *domain, struct lttng_channel *attr,
45 int wpipe);
a24248b3
MD
46int cmd_track_id(struct ltt_session *session,
47 enum lttng_tracker_type tracker_type,
48 enum lttng_domain_type domain,
49 struct lttng_tracker_id *id);
50int cmd_untrack_id(struct ltt_session *session,
51 enum lttng_tracker_type tracker_type,
52 enum lttng_domain_type domain,
53 struct lttng_tracker_id *id);
2f77fc4b
DG
54
55/* Event commands */
56a37563
JG
56int cmd_disable_event(struct ltt_session *session,
57 enum lttng_domain_type domain,
6e911cad
MD
58 char *channel_name,
59 struct lttng_event *event);
56a37563 60int cmd_add_context(struct ltt_session *session, enum lttng_domain_type domain,
601d5acf 61 char *channel_name, struct lttng_event_context *ctx, int kwpipe);
56a37563 62int cmd_set_filter(struct ltt_session *session, enum lttng_domain_type domain,
178191b3 63 char *channel_name, struct lttng_event *event,
2f77fc4b 64 struct lttng_filter_bytecode *bytecode);
7972aab2 65int cmd_enable_event(struct ltt_session *session, struct lttng_domain *domain,
025faf73 66 char *channel_name, struct lttng_event *event,
6b453b5e 67 char *filter_expression,
db8f1377
JI
68 struct lttng_filter_bytecode *filter,
69 struct lttng_event_exclusion *exclusion,
70 int wpipe);
2f77fc4b
DG
71
72/* Trace session action commands */
73int cmd_start_trace(struct ltt_session *session);
74int cmd_stop_trace(struct ltt_session *session);
75
76/* Consumer commands */
56a37563
JG
77int cmd_register_consumer(struct ltt_session *session,
78 enum lttng_domain_type domain,
2f77fc4b 79 const char *sock_path, struct consumer_data *cdata);
bda32d56
JG
80int cmd_set_consumer_uri(struct ltt_session *session, size_t nb_uri,
81 struct lttng_uri *uris);
ffe60014 82int cmd_setup_relayd(struct ltt_session *session);
2f77fc4b
DG
83
84/* Listing commands */
85ssize_t cmd_list_domains(struct ltt_session *session,
86 struct lttng_domain **domains);
56a37563
JG
87ssize_t cmd_list_events(enum lttng_domain_type domain,
88 struct ltt_session *session, char *channel_name,
b4e3ceb9 89 struct lttng_event **events, size_t *total_size);
56a37563
JG
90ssize_t cmd_list_channels(enum lttng_domain_type domain,
91 struct ltt_session *session, struct lttng_channel **channels);
2f77fc4b
DG
92ssize_t cmd_list_domains(struct ltt_session *session,
93 struct lttng_domain **domains);
94void cmd_list_lttng_sessions(struct lttng_session *sessions, uid_t uid,
95 gid_t gid);
56a37563 96ssize_t cmd_list_tracepoint_fields(enum lttng_domain_type domain,
2f77fc4b 97 struct lttng_event_field **fields);
56a37563
JG
98ssize_t cmd_list_tracepoints(enum lttng_domain_type domain,
99 struct lttng_event **events);
6dc3064a
DG
100ssize_t cmd_snapshot_list_outputs(struct ltt_session *session,
101 struct lttng_snapshot_output **outputs);
834978fd 102ssize_t cmd_list_syscalls(struct lttng_event **events);
a24248b3
MD
103ssize_t cmd_list_tracker_ids(enum lttng_tracker_type tracker_type,
104 struct ltt_session *session,
105 enum lttng_domain_type domain,
106 struct lttng_tracker_id **ids);
2f77fc4b 107
6d805429 108int cmd_data_pending(struct ltt_session *session);
2f77fc4b 109
6dc3064a
DG
110/* Snapshot */
111int cmd_snapshot_add_output(struct ltt_session *session,
112 struct lttng_snapshot_output *output, uint32_t *id);
113int cmd_snapshot_del_output(struct ltt_session *session,
114 struct lttng_snapshot_output *output);
115int cmd_snapshot_record(struct ltt_session *session,
116 struct lttng_snapshot_output *output, int wait);
117
d7ba1388
MD
118int cmd_set_session_shm_path(struct ltt_session *session,
119 const char *shm_path);
eded6438 120int cmd_regenerate_metadata(struct ltt_session *session);
c2561365 121int cmd_regenerate_statedump(struct ltt_session *session);
d7ba1388 122
b0880ae5
JG
123int cmd_register_trigger(struct command_ctx *cmd_ctx, int sock,
124 struct notification_thread_handle *notification_thread_handle);
125int cmd_unregister_trigger(struct command_ctx *cmd_ctx, int sock,
126 struct notification_thread_handle *notification_thread_handle);
127
5c408ad8
JD
128int cmd_rotate_session(struct ltt_session *session,
129 struct lttng_rotate_session_return *rotate_return);
d68c9a04
JD
130int cmd_rotate_get_info(struct ltt_session *session,
131 struct lttng_rotation_get_info_return *info_return,
132 uint64_t rotate_id);
133int cmd_session_get_current_output(struct ltt_session *session,
134 struct lttng_session_get_current_output_return *output_return);
259c2674 135int cmd_rotation_set_schedule(struct ltt_session *session, uint64_t timer_us,
90936dcf
JD
136 uint64_t size,
137 struct notification_thread_handle *notification_thread_handle);
5c408ad8 138
2f77fc4b 139#endif /* CMD_H */
This page took 0.065622 seconds and 5 git commands to generate.