Skip to content

Commit a5c90f9

Browse files
committed
m/httpd: Adding config to nb of servers
1 parent 2f6a642 commit a5c90f9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

script/munin-httpd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,16 @@ my $debug = 0;
4343
my $stdout = 0;
4444
my $loglevel = 'info';
4545

46+
my $max_servers = 10;
47+
4648
print_usage_and_exit()
4749
unless GetOptions(
4850
"listen=s" => \$listen,
4951
"debug" => \$debug,
5052
"stdout" => \$stdout,
5153
"loglevel=s" => \$loglevel,
5254
"version" => \&print_version_and_exit,
55+
"max-servers=i" => \$max_servers,
5356
"help" => \&print_usage_and_exit,
5457
);
5558

@@ -77,7 +80,7 @@ if ($stdout) {
7780

7881
Munin::Common::Logger::INFO("Starting preforking munin http server at $host:$port");
7982

80-
Munin::Master::Http->new( { host => $host, port => $port } )->run( prefork => 1, max_servers => 10 );
83+
Munin::Master::Http->new( { host => $host, port => $port } )->run( prefork => ($max_servers > 0), max_servers => $max_servers );
8184

8285

8386
sub print_usage_and_exit {

0 commit comments

Comments
 (0)