total node size
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user