summaryrefslogtreecommitdiffstats
path: root/modules-available/systemstatus
diff options
context:
space:
mode:
authorSimon Rettberg2019-01-30 13:24:03 +0100
committerSimon Rettberg2019-01-30 13:24:03 +0100
commit16c94742e46834336d77ca6825fa681db9c966bb (patch)
tree926f5108eb7ce4e11b419c35106c0f1c3c763592 /modules-available/systemstatus
parent[locationinfo] HisInOne: Properly handle multiple plannedDates (diff)
downloadslx-admin-16c94742e46834336d77ca6825fa681db9c966bb.tar.gz
slx-admin-16c94742e46834336d77ca6825fa681db9c966bb.tar.xz
slx-admin-16c94742e46834336d77ca6825fa681db9c966bb.zip
[systemstatus] Don't show swap warning too early
Diffstat (limited to 'modules-available/systemstatus')
-rw-r--r--modules-available/systemstatus/page.inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules-available/systemstatus/page.inc.php b/modules-available/systemstatus/page.inc.php
index 958e763f..04423eaf 100644
--- a/modules-available/systemstatus/page.inc.php
+++ b/modules-available/systemstatus/page.inc.php
@@ -209,7 +209,7 @@ class Page_SystemStatus extends Page
$data['swapTotal'] = Util::readableFileSize($info['SwapTotal'] * 1024);
$data['swapUsed'] = Util::readableFileSize(($info['SwapTotal'] - $info['SwapFree']) * 1024);
$data['swapPercent'] = 100 - round(($info['SwapFree'] / $info['SwapTotal']) * 100);
- $data['swapWarning'] = ($data['swapPercent'] > 50 || ($info['SwapTotal'] - $info['SwapFree']) > 200000);
+ $data['swapWarning'] = ($data['swapPercent'] > 50 || $info['SwapFree'] < 400000);
}
if (isset($info['CpuIdle']) && isset($info['CpuSystem']) && isset($info['CpuTotal'])) {
$data['cpuLoad'] = 100 - round(($info['CpuIdle'] / $info['CpuTotal']) * 100);