Real-time system health monitoring for the gateway host. Zero external dependencies.
bash
# Full status report (human-readable)
python3 scripts/monitor.py
# JSON output (for programmatic use)
python3 scripts/monitor.py --json
# Check alert thresholds
python3 scripts/monitor.py --check-alerts
# Top N processes
python3 scripts/monitor.py --top 10
MetricSourceCPU usage %/proc/statRAM used/total/available/proc/meminfoSwap used/total/proc/meminfoDisk usage per mountdf -hCPU temperature/sys/class/thermal/thermal_zone0/tempUptime/proc/uptimeLoad average (1/5/15m)/proc/loadavgTop processes by CPUps aux
Default (configurable in SKILL.md or via code):
AlertThresholdRAM> 90% usedSwap> 500MB usedCPU temp> 75°CDisk> 90% full
/proc, /sys, ps, dfUse with cron for periodic health checks:
bash
# Every 30 minutes via OpenClaw cron → alerts to Telegram
# Or via HEARTBEAT.md