From 22b4ecd042b32c7c00fac2f6ebf29698f4e5fca3 Mon Sep 17 00:00:00 2001 From: goldsquid Date: Sat, 7 Feb 2026 22:33:30 +0700 Subject: [PATCH] total node size --- show-size.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/show-size.sh b/show-size.sh index e7c9c10b..74c82b92 100755 --- a/show-size.sh +++ b/show-size.sh @@ -34,7 +34,7 @@ for part in "${parts[@]}"; do if $include; then echo "Checking ${part%.yml}..." >&2 - # Capture stdout (ratio) while letting stderr display naturally + # Capture stdout (ratio) while letting stderr (per-file paths) display static_ratio="$($BASEPATH/show-static-file-size.sh ${part%.yml})" static_ratio="0$static_ratio" total_kb=$($BASEPATH/show-file-size.sh ${part%.yml}) @@ -48,10 +48,10 @@ for part in "${parts[@]}"; do 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 + # When called without parameters, show per-node total (same format as path lines) if [ $# -eq 0 ]; then node_total=$(echo "$(( total_kb * 1024 ))" | numfmt --to=iec --suffix=B --format="%.2f") - echo " Total chaindata: $node_total" >&2 + echo " $node_total total chaindata" >&2 fi echo "" >&2 fi