diff options
author | Simon Rettberg | 2020-04-25 20:49:12 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-04-25 20:49:12 +0200 |
commit | 4247bb518e3e6d1a2ec601ea4597edf5eb3cc72e (patch) | |
tree | 78bf5e51a019aa50acbdc95bbe03b1bb24d757f0 /modules-available/statistics/pages | |
parent | Minor tweaks and cleanups (diff) | |
download | slx-admin-4247bb518e3e6d1a2ec601ea4597edf5eb3cc72e.tar.gz slx-admin-4247bb518e3e6d1a2ec601ea4597edf5eb3cc72e.tar.xz slx-admin-4247bb518e3e6d1a2ec601ea4597edf5eb3cc72e.zip |
[statistics] Track CPU-load and standby failures of clients
Diffstat (limited to 'modules-available/statistics/pages')
-rw-r--r-- | modules-available/statistics/pages/machine.inc.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules-available/statistics/pages/machine.inc.php b/modules-available/statistics/pages/machine.inc.php index 7aa91c16..79166cd5 100644 --- a/modules-available/statistics/pages/machine.inc.php +++ b/modules-available/statistics/pages/machine.inc.php @@ -52,7 +52,7 @@ class SubPage private static function showMachine($uuid) { $client = Database::queryFirst('SELECT machineuuid, locationid, macaddr, clientip, firstseen, lastseen, logintime, lastboot, state, - mbram, live_tmpsize, live_tmpfree, live_swapsize, live_swapfree, live_memsize, live_memfree, Length(position) AS hasroomplan, + mbram, live_tmpsize, live_tmpfree, live_swapsize, live_swapfree, live_memsize, live_memfree, live_cpuload, Length(position) AS hasroomplan, kvmstate, cpumodel, id44mb, data, hostname, currentuser, currentsession, notes FROM machine WHERE machineuuid = :uuid', array('uuid' => $uuid)); if ($client === false) { @@ -125,6 +125,9 @@ class SubPage $client['live_' . $item . 'percent'] = round(($client['live_' . $item . 'free'] / $client['live_' . $item . 'size']) * 100, 2); $client['live_' . $item . 'free_s'] = Util::readableFileSize($client['live_' . $item . 'free'], -1, 2); } + if ($client['live_cpuload'] <= 100) { + $client['live_cpuload_s'] = $client['live_cpuload'] . "\xe2\x80\x89%"; + } $client['ramclass'] = StatisticsStyling::ramColorClass($client['mbram']); $client['kvmclass'] = StatisticsStyling::kvmColorClass($client['kvmstate']); $client['hddclass'] = StatisticsStyling::hddColorClass($client['gbtmp']); |