From 472ee925d236fc9ce9e59e81ebe98fe1e200af7d Mon Sep 17 00:00:00 2001 From: Steve Schnepp Date: Thu, 9 Mar 2023 21:12:54 +0100 Subject: [PATCH] m/httpd: Adding config to nb of servers --- script/munin-httpd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/script/munin-httpd b/script/munin-httpd index 406d68c35..ec3816114 100755 --- a/script/munin-httpd +++ b/script/munin-httpd @@ -43,6 +43,8 @@ my $debug = 0; my $stdout = 0; my $loglevel = 'info'; +my $max_servers = 10; + print_usage_and_exit() unless GetOptions( "listen=s" => \$listen, @@ -50,6 +52,7 @@ print_usage_and_exit() "stdout" => \$stdout, "loglevel=s" => \$loglevel, "version" => \&print_version_and_exit, + "max-servers=i" => \$max_servers, "help" => \&print_usage_and_exit, ); @@ -77,7 +80,7 @@ if ($stdout) { Munin::Common::Logger::INFO("Starting preforking munin http server at $host:$port"); -Munin::Master::Http->new( { host => $host, port => $port } )->run( prefork => 1, max_servers => 10 ); +Munin::Master::Http->new( { host => $host, port => $port } )->run( prefork => ($max_servers > 0), max_servers => $max_servers ); sub print_usage_and_exit {