OpenClaw Status Check
Check the health and status of the entire OpenClaw deployment.
Setup Detection
bashOPENCLAW_REPO=$(readlink ~/.openclaw/openclaw.json 2>/dev/null | sed 's|/.openclaw/openclaw.json||')
Detect deployment mode — multi-gateway or single-gateway:
bashTIER_CONFIGS=(~/.openclaw/configs/openclaw-*.json) [[ -f "${TIER_CONFIGS[0]}" ]] && MULTI_GATEWAY=true || MULTI_GATEWAY=false
Steps — Multi-Gateway Mode
If MULTI_GATEWAY=true, check each tier independently:
- Discover tiers and ports:
For each config in
~/.openclaw/configs/openclaw-*.json:
bashTIER=$(basename "$cfg" | sed 's/openclaw-//;s/.json//') PORT=$(grep -o '"port": *[0-9]*' "$cfg" | grep -o '[0-9]*')
- Gateway health per tier:
bashcurl -s http://localhost:$PORT/health
- LaunchAgent status per tier:
bashlaunchctl print gui/$(id -u)/ai.openclaw.gateway.$TIER 2>&1 | head -5
- Channel connectivity per tier — check each tier's log:
bashtail -50 ~/.openclaw-$TIER/gateway.log | grep -E "telegram|slack|whatsapp|starting provider|socket mode|error"
- WhatsApp restart loop — check any tier whose config contains
"whatsapp":
bashtail -50 ~/.openclaw-$TIER/gateway.log | grep -c "auto-restart attempt"
If count > 3, WhatsApp is in a restart loop (needs re-auth: delete ~/.openclaw/credentials/whatsapp/default/ and restart).
-
Agent count per tier: Read each tier's config and count entries in
agents.list. -
Cron job status: Read
~/.openclaw/cron/jobs.jsonand for each enabled job, report:- Job name
- Agent ID (and which tier it belongs to)
- Last run time and status
- Consecutive errors (if any)
- Next scheduled run
-
Recent errors per tier:
bashtail -100 ~/.openclaw-$TIER/gateway.log | grep -i "error\|fail\|crash" | tail -10
- Present results as a per-tier summary table:
- Each tier: name, port, running/stopped (PID), channel connectivity
- Agents: total per tier, which have channel bindings
- Cron: jobs with errors or that haven't run recently
Steps — Single-Gateway Mode
If MULTI_GATEWAY=false, fall back to single-gateway checks:
- Read port from config:
bashPORT=$(grep -o '"port": *[0-9]*' ~/.openclaw/openclaw.json | grep -o '[0-9]*')
- Gateway health:
bashcurl -s http://localhost:$PORT/health
- LaunchAgent status:
bashlaunchctl print gui/$(id -u)/ai.openclaw.gateway 2>&1 | head -5
- Channel connectivity:
bashtail -50 ~/.openclaw/logs/gateway.log | grep -E "telegram|slack|whatsapp|starting provider|socket mode|error"
- WhatsApp restart loop check:
bashtail -50 ~/.openclaw/logs/gateway.log | grep -c "auto-restart attempt"
-
Agent count: Read
~/.openclaw/openclaw.jsonand count entries inagents.list. -
Cron job status: Read
~/.openclaw/cron/jobs.json— same as multi-gateway. -
Recent errors:
bashtail -100 ~/.openclaw/logs/gateway.log | grep -i "error\|fail\|crash" | tail -10
- Present results in a clear summary table:
- Gateway: running/stopped (PID, uptime)
- Channels: which are connected, which are failing
- Agents: total count, which have channel bindings
- Cron: jobs with errors or that haven't run recently


