From 4ae053438c336095d5c223decf305dae9e2d4143 Mon Sep 17 00:00:00 2001 From: goldsquid Date: Sat, 7 Feb 2026 22:29:01 +0700 Subject: [PATCH] total node size --- show-size.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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