diff options
author | Simon Rettberg | 2020-09-23 12:09:06 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-09-23 12:09:06 +0200 |
commit | f45c52690483e02dcd6dfe60eec67ef578e50986 (patch) | |
tree | f908a5606f60ed9886039049cb6d94e534abe1ef /core/modules/hardware-stats | |
parent | [run-virt] fix math (diff) | |
download | mltk-f45c52690483e02dcd6dfe60eec67ef578e50986.tar.gz mltk-f45c52690483e02dcd6dfe60eec67ef578e50986.tar.xz mltk-f45c52690483e02dcd6dfe60eec67ef578e50986.zip |
[hardware-stats] Fix awk output format for numbers > 2^31
Diffstat (limited to 'core/modules/hardware-stats')
-rwxr-xr-x | core/modules/hardware-stats/data/opt/openslx/scripts/cron-system_usage_update | 2 |
1 files changed, 1 insertions, 1 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 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 |