diff --git a/show-size.sh b/show-size.sh index 2ae6171d..e7c9c10b 100755 --- a/show-size.sh +++ b/show-size.sh @@ -43,11 +43,16 @@ for part in "${parts[@]}"; do #output=$(echo "$((total_kb * 1024))" | numfmt --to=iec --suffix=B --format="%.2f") #echo "$output" - static_part=$(echo "$total_kb * $static_ratio" | bc) + static_part=$(echo "$total_kb * $static_ratio" | bc) static_size=$(echo "$static_size + $static_part" | bc) #output=$(echo "$static_size" | numfmt --to=iec --suffix=B --format="%.2f") #echo "$output" + # When called without parameters, show total chaindata per node + if [ $# -eq 0 ]; then + node_total=$(echo "$(( total_kb * 1024 ))" | numfmt --to=iec --suffix=B --format="%.2f") + echo " Total chaindata: $node_total" >&2 + fi echo "" >&2 fi done