diff options
Diffstat (limited to 'remote/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update')
-rwxr-xr-x | remote/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/remote/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update b/remote/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update index 38f1deb9..df8dab45 100755 --- a/remote/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update +++ b/remote/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update @@ -22,7 +22,7 @@ for SESSION in $(loginctl | awk '{print $1}'); do done # Also report usage of /tmp and swap -TMP=$(df -P /tmp | grep -m1 ^/tmp) +TMP=$(df -P /tmp | grep -m1 ' /tmp$') TMP_SIZE=$(echo $TMP | awk '{print $2}') TMP_FREE=$(echo $TMP | awk '{print $4}') SWAP_FREE=$(grep -m1 ^SwapFree: /proc/meminfo | awk '{print $2}') @@ -38,7 +38,7 @@ if [ "$SWAP_FREE" -gt 0 ] && [ "$SWAP_FREE" -lt 500000 ]; then # less than 500MB Der Arbeitsspeicher des Computers ist fast voll. The computer is running out of RAM." fi -if [ "$TMP_FREE" -lt 500000 ]; then +if [ -n "$TMP_FREE" ] && [ "$TMP_FREE" -lt 500000 ]; then WARN="$WARN Es verbleibt wenig temporärer Speicher für die Arbeitsdaten der laufenden VM. Little temporary storage is left for the current VM." |