From 1fd9f1302715093dafb1a6e03ffd6ece769b823b Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 04 Mar 2009 06:28:27 -0500
Subject: [PATCH] Fixed a bug in cpu info in the monitor module.

---
 server/mods-available/monitor_core_module.inc.php |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/server/mods-available/monitor_core_module.inc.php b/server/mods-available/monitor_core_module.inc.php
index db0e27f..717e378 100644
--- a/server/mods-available/monitor_core_module.inc.php
+++ b/server/mods-available/monitor_core_module.inc.php
@@ -312,12 +312,15 @@
         */
         $cpuData = shell_exec("cat /proc/cpuinfo");
         $cpuInfo = explode("\n", $cpuData);
+		$processor = 0;
 
         foreach($cpuInfo as $line){
-            $part = preg_split("/:/", $line);
+            
+			$part = preg_split("/:/", $line);
             $key = trim($part[0]);
             $value = trim($part[1]);
-            $data[$key] = $value;
+			if($key == 'processor') $processor = intval($value);
+            $data[$key.' '.$processor] = $value;
         }
 
         /* the cpu has no state. It is, what it is */

--
Gitblit v1.9.1