From 51b9fb06323c75da8e92f2d7635f27fe02ecd8b5 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 25 Jan 2019 16:59:46 +0100 Subject: [hardware-stats] God fucking dammit --- .../hardware-stats/data/opt/openslx/scripts/cron-system_usage_update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/modules') 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 c67b729c..84008785 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 @@ -32,7 +32,7 @@ SWAP_SIZE=$( awk '{if ($1 == "SwapTotal:") { print $2; exit; }}' /proc/meminfo ) SWAP_FREE=$( awk '{if ($1 == "SwapFree:") { print $2; exit; }}' /proc/meminfo ) MEM_SIZE=$( awk '{if ($1 == "MemTotal:") { print $2; exit; }}' /proc/meminfo ) MEM_FREE=$( awk '{if ($1 == "MemAvailable:") { print $2; exit; }}' /proc/meminfo ) -if [ -n "$MEM_FREE" ]; then +if [ -z "$MEM_FREE" ]; then MEM_FREE=$( awk 'BEGIN{n=0}{if ($1 == "MemFree:" || $1 == "Buffers:" || $1 == "Cached:") n += $2}END{print n}' /proc/meminfo ) fi if [ -n "$SLX_EXAM" ]; then -- cgit v1.2.3-55-g7522