Backport: trackers: update lttng-sessiond
[lttng-tools.git] / src / bin / lttng-sessiond / cmd.h
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
24 /*
25 * Init the command subsystem. Must be called before using any of the functions
26 * above. This is called in the main() of the session daemon.
27 */
28 void cmd_init(void);
29
30 /* Session commands */
31 int cmd_create_session_uri(char *name, struct lttng_uri *uris,
32 size_t nb_uri, lttng_sock_cred *creds, unsigned int live_timer);
33 int cmd_create_session_snapshot(char *name, struct lttng_uri *uris,
34 size_t nb_uri, lttng_sock_cred *creds);
35 int cmd_destroy_session(struct ltt_session *session, int wpipe);
36
37 /* Channel commands */
38 int cmd_disable_channel(struct ltt_session *session,
39 enum lttng_domain_type domain, char *channel_name);
40 int cmd_enable_channel(struct ltt_session *session,
41 struct lttng_domain *domain, struct lttng_channel *attr,
42 int wpipe);
43 int cmd_track_id(struct ltt_session *session,
44 enum lttng_tracker_type tracker_type,
45 enum lttng_domain_type domain,
46 struct lttng_tracker_id *id);
47 int cmd_untrack_id(struct ltt_session *session,
48 enum lttng_tracker_type tracker_type,
49 enum lttng_domain_type domain,
50 struct lttng_tracker_id *id);
51
52 /* Event commands */
53 int cmd_disable_event(struct ltt_session *session,
54 enum lttng_domain_type domain,
55 char *channel_name,
56 struct lttng_event *event);
57 int cmd_add_context(struct ltt_session *session, enum lttng_domain_type domain,
58 char *channel_name, struct lttng_event_context *ctx, int kwpipe);
59 int cmd_set_filter(struct ltt_session *session, enum lttng_domain_type domain,
60 char *channel_name, struct lttng_event *event,
61 struct lttng_filter_bytecode *bytecode);
62 int cmd_enable_event(struct ltt_session *session, struct lttng_domain *domain,
63 char *channel_name, struct lttng_event *event,
64 char *filter_expression,
65 struct lttng_filter_bytecode *filter,
66 struct lttng_event_exclusion *exclusion,
67 int wpipe);
68
69 /* Trace session action commands */
70 int cmd_start_trace(struct ltt_session *session);
71 int cmd_stop_trace(struct ltt_session *session);
72
73 /* Consumer commands */
74 int cmd_register_consumer(struct ltt_session *session,
75 enum lttng_domain_type domain,
76 const char *sock_path, struct consumer_data *cdata);
77 int cmd_set_consumer_uri(struct ltt_session *session, size_t nb_uri,
78 struct lttng_uri *uris);
79 int cmd_setup_relayd(struct ltt_session *session);
80
81 /* Listing commands */
82 ssize_t cmd_list_domains(struct ltt_session *session,
83 struct lttng_domain **domains);
84 ssize_t cmd_list_events(enum lttng_domain_type domain,
85 struct ltt_session *session, char *channel_name,
86 struct lttng_event **events, size_t *total_size);
87 ssize_t cmd_list_channels(enum lttng_domain_type domain,
88 struct ltt_session *session, struct lttng_channel **channels);
89 ssize_t cmd_list_domains(struct ltt_session *session,
90 struct lttng_domain **domains);
91 void cmd_list_lttng_sessions(struct lttng_session *sessions, uid_t uid,
92 gid_t gid);
93 ssize_t cmd_list_tracepoint_fields(enum lttng_domain_type domain,
94 struct lttng_event_field **fields);
95 ssize_t cmd_list_tracepoints(enum lttng_domain_type domain,
96 struct lttng_event **events);
97 ssize_t cmd_snapshot_list_outputs(struct ltt_session *session,
98 struct lttng_snapshot_output **outputs);
99 ssize_t cmd_list_syscalls(struct lttng_event **events);
100 ssize_t cmd_list_tracker_ids(enum lttng_tracker_type tracker_type,
101 struct ltt_session *session,
102 enum lttng_domain_type domain,
103 struct lttng_tracker_id **ids);
104
105 int cmd_data_pending(struct ltt_session *session);
106
107 /* Snapshot */
108 int cmd_snapshot_add_output(struct ltt_session *session,
109 struct lttng_snapshot_output *output, uint32_t *id);
110 int cmd_snapshot_del_output(struct ltt_session *session,
111 struct lttng_snapshot_output *output);
112 int cmd_snapshot_record(struct ltt_session *session,
113 struct lttng_snapshot_output *output, int wait);
114
115 int cmd_set_session_shm_path(struct ltt_session *session,
116 const char *shm_path);
117 int cmd_regenerate_metadata(struct ltt_session *session);
118 int cmd_regenerate_statedump(struct ltt_session *session);
119
120 #endif /* CMD_H */
This page took 0.033793 seconds and 5 git commands to generate.