Skip to content

Commit

Permalink
m/httpd: Adding config to nb of servers
Browse files Browse the repository at this point in the history
  • Loading branch information
steveschnepp committed Jul 13, 2023
1 parent bd4f4a7 commit 3820225
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion script/munin-httpd
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,16 @@ my $debug = 0;
my $stdout = 0;
my $loglevel = 'info';

my $max_servers = 10;

print_usage_and_exit()
unless GetOptions(
"listen=s" => \$listen,
"debug" => \$debug,
"stdout" => \$stdout,
"loglevel=s" => \$loglevel,
"version" => \&print_version_and_exit,
"max-servers=i" => \$max_servers,
"help" => \&print_usage_and_exit,
);

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 3820225

Please sign in to comment.