mirror of https://github.com/mikaku/Monitorix.git
Merge pull request #156 from emilio-aburto/patch-1
Fix issue when parsing the number of cpu value
This commit is contained in:
commit
c2e070284c
|
@ -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") {
|
||||
|
|
Loading…
Reference in New Issue