SoW-2020-0002: Trace Hit Counters: trigger error reporting integration
[lttng-tools.git] / src / bin / lttng-sessiond / sessiond-config.h
CommitLineData
e6142f2e 1/*
ab5be9fa 2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
e6142f2e 3 *
ab5be9fa 4 * SPDX-License-Identifier: GPL-2.0-only
e6142f2e 5 *
e6142f2e
JG
6 */
7
8#ifndef LTTNG_SESSIOND_CONFIG_H
9#define LTTNG_SESSIOND_CONFIG_H
10
11#include <common/macros.h>
12#include <stdbool.h>
13
14struct config_string {
15 char *value;
16 bool should_free;
17};
18
2288467f
JG
19struct config_int_range {
20 int begin, end;
21};
22
e6142f2e
JG
23/* Config string takes ownership of value. */
24LTTNG_HIDDEN
25void config_string_set(struct config_string *string, char *value);
26
27struct sessiond_config {
28 int verbose;
29 int verbose_consumer;
2288467f
JG
30 /* Agent TCP port range for registration. Used by the agent thread. */
31 struct config_int_range agent_tcp_port;
2463b787
JR
32
33 int trigger_error_counter_bucket;
e6142f2e
JG
34 /* Socket timeout for receiving and sending (in seconds). */
35 int app_socket_timeout;
36
37 bool quiet;
38 bool no_kernel;
39 bool background;
40 bool daemonize;
41 bool sig_parent;
42
43 struct config_string tracing_group_name;
44
45 struct config_string kmod_probes_list;
46 struct config_string kmod_extra_probes_list;
47
48 struct config_string rundir;
49
50 /* Global application Unix socket path */
51 struct config_string apps_unix_sock_path;
52 /* Global client Unix socket path */
53 struct config_string client_unix_sock_path;
54 /* Global wait shm path for UST */
55 struct config_string wait_shm_path;
56 /* Global health check unix path */
57 struct config_string health_unix_sock_path;
58 /*
59 * LTTNG_UST_CLOCK_PLUGIN environment variable to be passed to spawned
60 * consumer daemons.
61 */
62 struct config_string lttng_ust_clock_plugin;
63 struct config_string pid_file_path;
64 struct config_string lock_file_path;
65 struct config_string load_session_path;
66 struct config_string agent_port_file_path;
67
68 struct config_string consumerd32_path;
69 struct config_string consumerd32_bin_path;
70 struct config_string consumerd32_lib_dir;
71 struct config_string consumerd32_err_unix_sock_path;
72 struct config_string consumerd32_cmd_unix_sock_path;
73
74 struct config_string consumerd64_path;
75 struct config_string consumerd64_bin_path;
76 struct config_string consumerd64_lib_dir;
77 struct config_string consumerd64_err_unix_sock_path;
78 struct config_string consumerd64_cmd_unix_sock_path;
79
80 struct config_string kconsumerd_path;
81 struct config_string kconsumerd_err_unix_sock_path;
82 struct config_string kconsumerd_cmd_unix_sock_path;
83};
84
85/* Initialize the sessiond_config values to build-defaults. */
86LTTNG_HIDDEN
87int sessiond_config_init(struct sessiond_config *config);
88
89/* Override sessiond_config values with values specified by the environment. */
90LTTNG_HIDDEN
91int sessiond_config_apply_env_config(struct sessiond_config *config);
92
93LTTNG_HIDDEN
94void sessiond_config_fini(struct sessiond_config *config);
95
96LTTNG_HIDDEN
97int sessiond_config_resolve_paths(struct sessiond_config *config);
98
99LTTNG_HIDDEN
100void sessiond_config_log(struct sessiond_config *config);
101
102#endif /* LTTNG_SESSIOND_CONFIG_H */
This page took 0.067396 seconds and 5 git commands to generate.