Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions bin/check_resources.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -euo pipefail

# Inspect memory and disk usage relevant to a running Base node.
# Useful to determine if your host meets minimum requirements or if cleanup is needed.

echo "== Base node resources =="

# Check available memory (Linux/macOS)
if command -v free >/dev/null 2>&1; then
free -h
else
echo "free command not found; skipping memory check"
fi

echo
# Check disk usage under data directories
DATA_DIRS=(
"${BASE_RETH_DATA_DIR:-./reth-data}"
"${BASE_GETH_DATA_DIR:-./geth-data}"
)

for dir in "${DATA_DIRS[@]}"; do
if [ -d "$dir" ]; then
du -sh "$dir"
fi
done

echo
df -h .
echo
echo "Consider pruning or moving data directories if disk space is low."