From f45c52690483e02dcd6dfe60eec67ef578e50986 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 23 Sep 2020 12:09:06 +0200 Subject: [hardware-stats] Fix awk output format for numbers > 2^31 --- .../hardware-stats/data/opt/openslx/scripts/cron-system_usage_update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/modules/hardware-stats') 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 08338808..5b8362e8 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 @@ -45,7 +45,7 @@ fi # CPU temp and load set -- if $full; then - current="$( awk '$1 == "cpu" {print ($5+$6) " " ($2+$3+$4+$5+$6+$7+$8)}' /proc/stat )" + current="$( awk '$1 == "cpu" {printf "%.0f %.0f", ($5+$6), ($2+$3+$4+$5+$6+$7+$8)}' /proc/stat )" c_count=${current#* } write=false if [ -s "/run/openslx/usage.state" ]; then -- cgit v1.2.3-55-g7522