Fix issue when parsing the number of cpu value

Fix to issue #155
This commit is contained in:
Emilio Aburto L 2016-08-15 14:56:29 -03:00 committed by GitHub
parent c5703adee1
commit eee32623e8
1 changed files with 1 additions and 1 deletions

View File

@ -290,7 +290,7 @@ sub proc_cgi {
$title = !$silent ? $title : "";
if($config->{os} eq "Linux") {
$ncpu = `grep -w processor /proc/cpuinfo | tail -1 | awk '{ print \$3 }'`;
$ncpu = `grep -e '^processor[[:space:]]*: [0-9]*' /proc/cpuinfo | tail -1 | awk '{ print \$3 }'`
chomp($ncpu);
$ncpu++;
} elsif($config->{os} eq "FreeBSD") {