perf: mem and disk size calc from %d to %.1f (#662)

Co-authored-by: 周晓明 <zhouxiaoming@star-net.cn>
This commit is contained in:
joyexpr 2021-04-20 19:04:40 +08:00 committed by GitHub
parent 6693b131d8
commit bdb15aa0bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -43,8 +43,8 @@ report:
fields:
cpu: cat /proc/cpuinfo | grep processor | wc -l
mem: cat /proc/meminfo | grep MemTotal | awk '{printf "%dGi", $2/1024/1024}'
disk: df -m | grep '/dev/' | grep -v '/var/lib' | grep -v tmpfs | awk '{sum += $2};END{printf "%dGi", sum/1024}'
mem: cat /proc/meminfo | grep MemTotal | awk '{printf "%.1fGi", $2/1024/1024}'
disk: df -m | grep '/dev/' | grep -v '/var/lib' | grep -v tmpfs | awk '{sum += $2};END{printf "%.1fGi", sum/1024}'
sys:
# timeout in ms