summaryrefslogtreecommitdiffstats
path: root/core/modules/hardware-stats/data
diff options
context:
space:
mode:
authorSimon Rettberg2018-03-19 11:30:15 +0100
committerSimon Rettberg2018-03-19 11:30:15 +0100
commitdd75235463a4e7ca2bc24d3219113456e6dab6f2 (patch)
tree8564b04c0113e0473e162cfca0b2d315e750ad10 /core/modules/hardware-stats/data
parent[rfs-stage32] Include NVMe drivers (diff)
downloadmltk-dd75235463a4e7ca2bc24d3219113456e6dab6f2.tar.gz
mltk-dd75235463a4e7ca2bc24d3219113456e6dab6f2.tar.xz
mltk-dd75235463a4e7ca2bc24d3219113456e6dab6f2.zip
[hardware-stats] Suppress local warnings about swap/tmp if flag-file is present
Diffstat (limited to 'core/modules/hardware-stats/data')
-rwxr-xr-xcore/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update b/core/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update
index bbcf8494..563f68b0 100755
--- a/core/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update
+++ b/core/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update
@@ -35,6 +35,10 @@ curl -s --data-urlencode "type=~runstate" --data-urlencode "uuid=$UUID" --data-u
--data-urlencode "swapfree=$SWAP_FREE" "$SLX_REMOTE_LOG" > /dev/null 2>&1
# Warn user if tmp or swap usage is high; system might crash soon
+
+# ..but not if flag to shut up is present
+[ -e "/run/openslx/no-ram-warning" ] && exit 0
+
WARN=
if [ "$SWAP_FREE" -gt 0 ] && [ "$SWAP_FREE" -lt 500000 ]; then # less than 500MB swap
WARN="$WARN