tbrehm
2009-03-04 5518df67f0408f489bcd208503cf1d3bfeeb8a98
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);
            if($key != '') $data[$key.' '.$processor] = $value;
        }
        /* the cpu has no state. It is, what it is */
@@ -1233,7 +1236,7 @@
    function _checkTcp ($host,$port) {
        $fp = @fsockopen ($host, $port, &$errno, &$errstr, 2);
        $fp = @fsockopen ($host, $port, $errno, $errstr, 2);
        if ($fp) {
            fclose($fp);
@@ -1245,7 +1248,7 @@
    function _checkUdp ($host,$port) {
        $fp = @fsockopen ('udp://'.$host, $port, &$errno, &$errstr, 2);
        $fp = @fsockopen ('udp://'.$host, $port, $errno, $errstr, 2);
        if ($fp) {
            fclose($fp);