summaryrefslogtreecommitdiff
path: root/libs/load_average.php
diff options
context:
space:
mode:
authorShevAbam <shevabam@gmail.com>2015-01-16 18:14:07 +0100
committerShevAbam <shevabam@gmail.com>2015-01-16 18:14:07 +0100
commit3ed4c1d633f3ddfc50d921c5d5c19ebf7cf640c4 (patch)
treefe135c5868a41cecfae98294facb61accea76912 /libs/load_average.php
parentc3ec82dd6f60ac8057cc50d9bf6274738db9c02e (diff)
CPU : changes on retrieving CPU information
Load Average and CPU : fix on recovery the number of CPU cores Last login : the datas are retrieved differently
Diffstat (limited to 'libs/load_average.php')
-rw-r--r--libs/load_average.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/load_average.php b/libs/load_average.php
index 6251c0e..2e1947d 100644
--- a/libs/load_average.php
+++ b/libs/load_average.php
@@ -1,4 +1,5 @@
<?php
+require 'Utils/Misc.class.php';
if (!($load_tmp = shell_exec('cat /proc/loadavg | awk \'{print $1","$2","$3}\'')))
{
@@ -7,7 +8,7 @@ if (!($load_tmp = shell_exec('cat /proc/loadavg | awk \'{print $1","$2","$3}\'')
else
{
// Number of cores
- $cores = (int)shell_exec('grep -c ^processor /proc/cpuinfo');
+ $cores = Misc::getCpuCoresNumber();
$load_exp = explode(',', $load_tmp);