From eee32623e83727630c2bcce93086e3a3efa42c81 Mon Sep 17 00:00:00 2001 From: Emilio Aburto L Date: Mon, 15 Aug 2016 14:56:29 -0300 Subject: [PATCH] Fix issue when parsing the number of cpu value Fix to issue #155 --- lib/proc.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/proc.pm b/lib/proc.pm index 0f462c9..56a5448 100644 --- a/lib/proc.pm +++ b/lib/proc.pm @@ -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") {