Real-time system health monitoring for the gateway host. Zero external dependencies.
# 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
| Metric | Source |
|---|---|
| -------- | -------- |
| CPU usage % | /proc/stat |
| RAM used/total/available | /proc/meminfo |
| Swap used/total | /proc/meminfo |
| Disk usage per mount | df -h |
| CPU temperature | /sys/class/thermal/thermal_zone0/temp |
| Uptime | /proc/uptime |
| Load average (1/5/15m) | /proc/loadavg |
| Top processes by CPU | ps aux |
Default (configurable in SKILL.md or via code):
| Alert | Threshold |
|---|---|
| ------- | ----------- |
| RAM | > 90% used |
| Swap | > 500MB used |
| CPU temp | > 75°C |
| Disk | > 90% full |
/proc, /sys, ps, dfUse with cron for periodic health checks:
# Every 30 minutes via OpenClaw cron → alerts to Telegram
# Or via HEARTBEAT.md
共 1 个版本