Cleanup: ust_session_id unused by buffer_reg_uid_consumer_channel_key
[lttng-tools.git] / src / bin / lttng-sessiond / cmd.h
... / ...
CommitLineData
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"
22#include "session.h"
23
24struct notification_thread_handle;
25
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,
34 size_t nb_uri, lttng_sock_cred *creds, unsigned int live_timer);
35int cmd_create_session_snapshot(char *name, struct lttng_uri *uris,
36 size_t nb_uri, lttng_sock_cred *creds);
37int cmd_destroy_session(struct ltt_session *session, int wpipe,
38 struct notification_thread_handle *notification_thread_handle);
39
40/* Channel commands */
41int cmd_disable_channel(struct ltt_session *session,
42 enum lttng_domain_type domain, char *channel_name);
43int cmd_enable_channel(struct ltt_session *session,
44 struct lttng_domain *domain, struct lttng_channel *attr,
45 int wpipe);
46int cmd_track_pid(struct ltt_session *session, enum lttng_domain_type domain,
47 int pid);
48int cmd_untrack_pid(struct ltt_session *session, enum lttng_domain_type domain,
49 int pid);
50
51/* Event commands */
52int cmd_disable_event(struct ltt_session *session,
53 enum lttng_domain_type domain,
54 char *channel_name,
55 struct lttng_event *event);
56int cmd_add_context(struct ltt_session *session, enum lttng_domain_type domain,
57 char *channel_name, struct lttng_event_context *ctx, int kwpipe);
58int cmd_set_filter(struct ltt_session *session, enum lttng_domain_type domain,
59 char *channel_name, struct lttng_event *event,
60 struct lttng_filter_bytecode *bytecode);
61int cmd_enable_event(struct ltt_session *session, struct lttng_domain *domain,
62 char *channel_name, struct lttng_event *event,
63 char *filter_expression,
64 struct lttng_filter_bytecode *filter,
65 struct lttng_event_exclusion *exclusion,
66 int wpipe);
67
68/* Trace session action commands */
69int cmd_start_trace(struct ltt_session *session);
70int cmd_stop_trace(struct ltt_session *session);
71
72/* Consumer commands */
73int cmd_register_consumer(struct ltt_session *session,
74 enum lttng_domain_type domain,
75 const char *sock_path, struct consumer_data *cdata);
76int cmd_set_consumer_uri(struct ltt_session *session, size_t nb_uri,
77 struct lttng_uri *uris);
78int cmd_setup_relayd(struct ltt_session *session);
79
80/* Listing commands */
81ssize_t cmd_list_domains(struct ltt_session *session,
82 struct lttng_domain **domains);
83ssize_t cmd_list_events(enum lttng_domain_type domain,
84 struct ltt_session *session, char *channel_name,
85 struct lttng_event **events, size_t *total_size);
86ssize_t cmd_list_channels(enum lttng_domain_type domain,
87 struct ltt_session *session, struct lttng_channel **channels);
88ssize_t cmd_list_domains(struct ltt_session *session,
89 struct lttng_domain **domains);
90void cmd_list_lttng_sessions(struct lttng_session *sessions, uid_t uid,
91 gid_t gid);
92ssize_t cmd_list_tracepoint_fields(enum lttng_domain_type domain,
93 struct lttng_event_field **fields);
94ssize_t cmd_list_tracepoints(enum lttng_domain_type domain,
95 struct lttng_event **events);
96ssize_t cmd_snapshot_list_outputs(struct ltt_session *session,
97 struct lttng_snapshot_output **outputs);
98ssize_t cmd_list_syscalls(struct lttng_event **events);
99ssize_t cmd_list_tracker_pids(struct ltt_session *session,
100 enum lttng_domain_type domain, int32_t **pids);
101
102int cmd_data_pending(struct ltt_session *session);
103
104/* Snapshot */
105int cmd_snapshot_add_output(struct ltt_session *session,
106 struct lttng_snapshot_output *output, uint32_t *id);
107int cmd_snapshot_del_output(struct ltt_session *session,
108 struct lttng_snapshot_output *output);
109int cmd_snapshot_record(struct ltt_session *session,
110 struct lttng_snapshot_output *output, int wait);
111
112int cmd_set_session_shm_path(struct ltt_session *session,
113 const char *shm_path);
114int cmd_regenerate_metadata(struct ltt_session *session);
115int cmd_regenerate_statedump(struct ltt_session *session);
116
117int cmd_register_trigger(struct command_ctx *cmd_ctx, int sock,
118 struct notification_thread_handle *notification_thread_handle);
119int cmd_unregister_trigger(struct command_ctx *cmd_ctx, int sock,
120 struct notification_thread_handle *notification_thread_handle);
121
122int cmd_rotate_session(struct ltt_session *session,
123 struct lttng_rotate_session_return *rotate_return);
124int cmd_rotate_get_info(struct ltt_session *session,
125 struct lttng_rotation_get_info_return *info_return,
126 uint64_t rotate_id);
127int cmd_session_get_current_output(struct ltt_session *session,
128 struct lttng_session_get_current_output_return *output_return);
129int cmd_rotation_set_schedule(struct ltt_session *session, uint64_t timer_us,
130 uint64_t size,
131 struct notification_thread_handle *notification_thread_handle);
132
133#endif /* CMD_H */
This page took 0.022766 seconds and 4 git commands to generate.