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
This commit is contained in:
ShevAbam
2015-01-16 18:14:07 +01:00
parent c3ec82dd6f
commit 3ed4c1d633
6 changed files with 42 additions and 26 deletions
+2 -1
View File
@@ -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);