summaryrefslogtreecommitdiffstats
path: root/modules-available/systemstatus/hooks/main-warning.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/systemstatus/hooks/main-warning.inc.php')
-rw-r--r--modules-available/systemstatus/hooks/main-warning.inc.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules-available/systemstatus/hooks/main-warning.inc.php b/modules-available/systemstatus/hooks/main-warning.inc.php
index 406ae73c..5707c7d2 100644
--- a/modules-available/systemstatus/hooks/main-warning.inc.php
+++ b/modules-available/systemstatus/hooks/main-warning.inc.php
@@ -4,4 +4,13 @@ if (file_exists('/run/reboot-required.pkgs')) {
$lines = file('/run/reboot-required.pkgs', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$lines = array_unique($lines);
Message::addInfo('systemstatus.update-reboot-required', true, implode(', ', $lines));
+}
+
+if (SystemStatus::diskStat($systemUsage, $storeUsage, $current, $wanted)) {
+ if ($current === $wanted && isset($storeUsage['freeKb']) && $storeUsage['freeKb'] < 60000000) { // 60GB
+ Message::addWarning('systemstatus.storage-low-vmstore', true, Util::readableFileSize($storeUsage['freeKb'], -1 , 1));
+ }
+ if (isset($systemUsage['freeKb']) && $systemUsage['freeKb'] < 600000) { // 600MB
+ Message::addWarning('systemstatus.storage-low-system', true, Util::readableFileSize($systemUsage['freeKb'], -1 , 1));
+ }
} \ No newline at end of file