relayd: add fd-cap option to limit the number of opened FDs
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 26 Nov 2019 20:08:01 +0000 (15:08 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 30 Jan 2020 06:55:34 +0000 (01:55 -0500)
commit896010e38f60e85d757a43778e25a51b890a7443
tree9c7dc10a2c005735cf9fac406c2447c0924385ad
parent79408a2bac87e03a9dd9674e10c1ec83ec1060cf
relayd: add fd-cap option to limit the number of opened FDs

Add an --fd-cap option to the relay daemon in order to allow the
launch of the relay daemon with a maximal number of file descriptors
to be open at any given moment.

When the value of the --fd-cap parameter is left unset, the maximal
number of file descriptors is set to the system's NOFILE soft limit
(see GETRLIMIT(3P)).

A minimal number of file descriptors of 30 is imposed, mainly to
prevent absurd configurations (someone setting 1 fd) which would not
even allow one target to connect and stream traces. This also allows
a bit of leverage to open file descriptors that could be needed by
future changes without "breaking" an existing configuration.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ibaf49b25ccf3e3a8013115c9478744ca3646e306
src/bin/lttng-relayd/main.c
src/common/defaults.h
This page took 0.025385 seconds and 4 git commands to generate.