BUG 11786 - squid: Remove setting for filter processes the number of Squid processes
[ipfire-2.x.git] / config / cfgroot / general-functions.pl
index 0577afe..e8495e8 100644 (file)
@@ -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;