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 4, 2023
1 parent 96598a3 commit 472ee92
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 472ee92

Please sign in to comment.