mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
BUG 11786 - squid: Remove setting for filter processes the number of Squid processes
I added a function to determine the number of cores. Now the number of squid processes will be equal to the number of logical cores. Further I removed the possibility of changing the number of squid processes in the proxy.cgi Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org> Signed-off-by: root <root@ipfire.test>
This commit is contained in:
@@ -1165,5 +1165,12 @@ sub dnssec_status() {
|
||||
|
||||
return $status;
|
||||
}
|
||||
sub number_cpu_cores() {
|
||||
open my $cpuinfo, "/proc/cpuinfo" or die "Can't open cpuinfo: $!\n";
|
||||
my $cores = scalar (map /^processor/, <$cpuinfo>);
|
||||
close $cpuinfo;
|
||||
|
||||
return $cores;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user