diff options
author | Simon Rettberg | 2019-06-14 15:19:00 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-06-14 15:19:00 +0200 |
commit | 79cabf460de34d20af5e58d9ccbccd212470ec02 (patch) | |
tree | 8a726578a577699409d6d8775e21e645d4a2c8b3 /core/modules/hardware-stats/data/opt/openslx/scripts | |
parent | [nvidia-common] refine kernel module fail detection (diff) | |
download | mltk-79cabf460de34d20af5e58d9ccbccd212470ec02.tar.gz mltk-79cabf460de34d20af5e58d9ccbccd212470ec02.tar.xz mltk-79cabf460de34d20af5e58d9ccbccd212470ec02.zip |
[hardware-stats] Use slx-tools to determine free /tmp
Diffstat (limited to 'core/modules/hardware-stats/data/opt/openslx/scripts')
-rwxr-xr-x | core/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update | 6 |
1 files changed, 3 insertions, 3 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 14e08e68..0ddb6159 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 @@ -25,9 +25,9 @@ for SESSION in $(loginctl $LEGEND | awk '{print $1}'); do done # Also report usage of /tmp and swap -TMP=$(df -P /tmp | grep -m1 '^/dev') -TMP_SIZE=$(echo $TMP | awk '{print $2}') -TMP_FREE=$(echo $TMP | awk '{print $4}') +TMP="$( slx-tools fs_path_space /tmp )" +TMP_FREE="${TMP% *}" +TMP_SIZE="${TMP#* }" 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 ) |