mirror of
https://github.com/ShaYmez/ezservermonitor-web.git
synced 2026-06-11 18:28:47 -04:00
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:
+2
-4
@@ -5,11 +5,10 @@ $Config = new Config();
|
||||
|
||||
$datas = array();
|
||||
|
||||
if (!(exec('/usr/bin/lastlog --time 365 | /usr/bin/awk \'{print $1","$3","$4" "$5" "$6" "$7" "$8}\'', $users)))
|
||||
if (!(exec('/usr/bin/lastlog --time 365 | /usr/bin/awk -F\' \' \'{ print $1";"$5, $4, $8, $6}\'', $users)))
|
||||
{
|
||||
$datas[] = array(
|
||||
'user' => 'N.A',
|
||||
'host' => 'N.A',
|
||||
'date' => 'N.A',
|
||||
);
|
||||
}
|
||||
@@ -19,11 +18,10 @@ else
|
||||
|
||||
for ($i = 1; $i < count($users) && $i <= $max; $i++)
|
||||
{
|
||||
list($user, $host, $date) = explode(',', $users[$i]);
|
||||
list($user, $date) = explode(';', $users[$i]);
|
||||
|
||||
$datas[] = array(
|
||||
'user' => $user,
|
||||
'host' => $host,
|
||||
'date' => $date,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user