mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Prevent CPU number showing more than once on BSD
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
if (is_numeric($value)) { $percent_cpu = $percent_cpu + $value; }
|
||||
}
|
||||
if (stristr(PHP_OS, 'BSD')) {
|
||||
$result = system("dmesg | grep -i --max-count 1 CPUs | sed 's/[^0-9]*//g'");
|
||||
$result = shell_exec("dmesg | grep -i --max-count 1 CPUs | sed 's/[^0-9]*//g'");
|
||||
$cpu_cores = trim($result);
|
||||
}
|
||||
if (stristr(PHP_OS, 'Linux')) {
|
||||
@@ -162,4 +162,4 @@
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_system_cpu_status_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
echo "</div>\n";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user