Merge pull request #156 from emilio-aburto/patch-1

Fix issue when parsing the number of cpu value
This commit is contained in:
Jordi Sanfeliu 2016-08-16 17:01:29 +02:00 committed by GitHub
commit c2e070284c
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") {