Files
proxmox/scripts/health/check-node-health.sh
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands
- CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround
- CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check
- NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere
- MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates
- LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 15:46:57 -08:00

38 lines
856 B
Bash
Executable File

#!/usr/bin/env bash
# Check Besu/node health for a given container VMID. Run on Proxmox host.
# Usage: ./scripts/health/check-node-health.sh <VMID>
set -euo pipefail
VMID="${1:-}"
if [ -z "$VMID" ]; then
echo "Usage: $0 <VMID>"
exit 1
fi
if ! command -v pct >/dev/null 2>&1; then
echo "Error: pct not found. Run on Proxmox host."
exit 1
fi
STATUS=$(pct status "$VMID" 2>/dev/null | awk '{print $2}' || echo "unknown")
if [ "$STATUS" != "running" ]; then
echo "VMID $VMID: container not running ($STATUS)"
exit 0
fi
SVC=""
for s in besu-validator besu; do
if pct exec "$VMID" -- systemctl is-active "$s" 2>/dev/null | grep -q "active"; then
SVC="$s"
break
fi
done
if [ -n "$SVC" ]; then
echo "VMID $VMID: $SVC active"
else
echo "VMID $VMID: no besu service active (container running)"
fi
exit 0