From 3ed4c1d633f3ddfc50d921c5d5c19ebf7cf640c4 Mon Sep 17 00:00:00 2001 From: ShevAbam Date: Fri, 16 Jan 2015 18:14:07 +0100 Subject: 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 --- libs/last_login.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libs/last_login.php') diff --git a/libs/last_login.php b/libs/last_login.php index 5a8887e..e93bbf8 100644 --- a/libs/last_login.php +++ b/libs/last_login.php @@ -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, ); } -- cgit v1.3