Stop rotation pending check timer from the rotation thread
[lttng-tools.git] / src / bin / lttng-sessiond / sessiond-config.h
CommitLineData
e6142f2e
JG
1/*
2 * Copyright (C) 2017 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License, version 2 only,
6 * as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 */
17
18#ifndef LTTNG_SESSIOND_CONFIG_H
19#define LTTNG_SESSIOND_CONFIG_H
20
21#include <common/macros.h>
22#include <stdbool.h>
23
24struct config_string {
25 char *value;
26 bool should_free;
27};
28
2288467f
JG
29struct config_int_range {
30 int begin, end;
31};
32
e6142f2e
JG
33/* Config string takes ownership of value. */
34LTTNG_HIDDEN
35void config_string_set(struct config_string *string, char *value);
36
37struct sessiond_config {
38 int verbose;
39 int verbose_consumer;
2288467f
JG
40 /* Agent TCP port range for registration. Used by the agent thread. */
41 struct config_int_range agent_tcp_port;
e6142f2e
JG
42 /* Socket timeout for receiving and sending (in seconds). */
43 int app_socket_timeout;
44
45 bool quiet;
46 bool no_kernel;
47 bool background;
48 bool daemonize;
49 bool sig_parent;
50
51 struct config_string tracing_group_name;
52
53 struct config_string kmod_probes_list;
54 struct config_string kmod_extra_probes_list;
55
56 struct config_string rundir;
57
58 /* Global application Unix socket path */
59 struct config_string apps_unix_sock_path;
60 /* Global client Unix socket path */
61 struct config_string client_unix_sock_path;
62 /* Global wait shm path for UST */
63 struct config_string wait_shm_path;
64 /* Global health check unix path */
65 struct config_string health_unix_sock_path;
66 /*
67 * LTTNG_UST_CLOCK_PLUGIN environment variable to be passed to spawned
68 * consumer daemons.
69 */
70 struct config_string lttng_ust_clock_plugin;
71 struct config_string pid_file_path;
72 struct config_string lock_file_path;
73 struct config_string load_session_path;
74 struct config_string agent_port_file_path;
75
76 struct config_string consumerd32_path;
77 struct config_string consumerd32_bin_path;
78 struct config_string consumerd32_lib_dir;
79 struct config_string consumerd32_err_unix_sock_path;
80 struct config_string consumerd32_cmd_unix_sock_path;
81
82 struct config_string consumerd64_path;
83 struct config_string consumerd64_bin_path;
84 struct config_string consumerd64_lib_dir;
85 struct config_string consumerd64_err_unix_sock_path;
86 struct config_string consumerd64_cmd_unix_sock_path;
87
88 struct config_string kconsumerd_path;
89 struct config_string kconsumerd_err_unix_sock_path;
90 struct config_string kconsumerd_cmd_unix_sock_path;
91};
92
93/* Initialize the sessiond_config values to build-defaults. */
94LTTNG_HIDDEN
95int sessiond_config_init(struct sessiond_config *config);
96
97/* Override sessiond_config values with values specified by the environment. */
98LTTNG_HIDDEN
99int sessiond_config_apply_env_config(struct sessiond_config *config);
100
101LTTNG_HIDDEN
102void sessiond_config_fini(struct sessiond_config *config);
103
104LTTNG_HIDDEN
105int sessiond_config_resolve_paths(struct sessiond_config *config);
106
107LTTNG_HIDDEN
108void sessiond_config_log(struct sessiond_config *config);
109
110#endif /* LTTNG_SESSIOND_CONFIG_H */
This page took 0.030916 seconds and 4 git commands to generate.