get($_SESSION['domain']['language']['code'], 'core/user_settings'); //system status echo "
\n"; $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; //cpu usage if (stristr(PHP_OS, 'Linux')) { $result = shell_exec('ps -A -o pcpu'); $percent_cpu = 0; foreach (explode("\n", $result) as $value) { if (is_numeric($value)) { $percent_cpu = $percent_cpu + $value; } } $result = trim(shell_exec("grep -P '^processor' /proc/cpuinfo")); $cores = count(explode("\n", $result)); if ($percent_cpu > 1) { $percent_cpu = $percent_cpu / $cores; } $percent_cpu = round($percent_cpu, 2); } //add half doughnut chart ?>
"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; //cpu usage if (stristr(PHP_OS, 'Linux')) { if ($percent_cpu != '') { echo "\n"; echo "\n"; echo "\n"; echo "\n"; $c = ($c) ? 0 : 1; } } echo "
".$text['label-item']."".$text['label-value']."
\n"; echo "
"; $n++; echo ""; echo "\n"; ?>