A terminal dashboard for monitoring OpenClaw agents, cron jobs, Docker containers, and system resources in real-time on Linux/WSL or MacOS.
- Live session tracking β Watch sub-agents work in real-time with status updates
- Session labels β Shows spawn labels for easy identification
- Tool activity β Displays the current tool being executed and total tool calls
- Elapsed time β Track how long each session has been running
- Agent detail view β Select agents with arrow keys and press Enter to expand (recent tools, errors, full label)
- Toggle modes β Switch between "running only" and "all recent" views (
akey)
- Process monitoring β Detects running Claude Code, Copilot CLI, and Codex processes
- Attach commands β Jump into any coding agent's interactive tmux session
- PID and runtime β See process IDs and cumulative CPU time
- OpenClaw cron jobs β Lists every job with name, schedule, model, next run, and last duration
- System cron jobs β Shows root crontab entries with schedule, next run, and last run
- Human-readable schedules β Translates cron expressions to readable format (
Mon 13:00,every 15m,Tue,Fri 06:00) - Relative next-run times β Shows when each job fires next (
in 8m,in 4d) - Error tracking β Highlights failing jobs with consecutive error counts
- Running indicator β Shows which jobs are actively executing
- Sorted by next run β Soonest jobs appear first
- CPU / Memory / Disk β Color-coded bar charts with usage percentages and details
- GPU monitoring β NVIDIA GPU usage via
nvidia-smi(auto-detected) - Docker containers β Shows running container names and status
- Kubernetes pods β Shows k8s/k3s pods (auto-detected, system namespaces filtered)
- Systemd services β Monitors key system services (auto-detected)
- Two-column layout β Resource gauges on the left, containers/pods/services on the right
- Color thresholds β Green (healthy), yellow (β₯70%), red (β₯90%) β configurable via env vars
- Auto-sizing β Dashboard width adapts to your terminal (60β120 columns)
- Resize handling β Responds to terminal resize events in real-time
- Internal scrolling β PgUp/PgDn/Home/End scroll when content exceeds terminal height
- Alternate screen β Uses alternate screen buffer so your scrollback is preserved on exit
git clone https://github.com/DanWahlin/claw-monitor.git
cd claw-monitor
npm install
npm run build./bin/claw-monitor.jsOr add to your PATH for global access (run from the project root):
npm linkThen run from anywhere:
claw-monitor| Key | Action |
|---|---|
q or Ctrl+C |
Quit |
a |
Toggle between running-only and all sessions |
β β |
Select agent (when agents are running) |
Enter |
Expand/collapse agent details |
PgUp / PgDn |
Scroll dashboard when content exceeds terminal height |
Home / End |
Jump to top / bottom of dashboard |
Cmd+-/+ or Ctrl+-/+ |
Zoom terminal font size |
claw-monitor detects running coding agents (Claude Code, Copilot CLI, Codex) via process monitoring. To jump into an agent's interactive terminal session, use the attach commands included in bin/:
# Symlink to PATH (one-time)
sudo ln -sf "$(pwd)/bin/cc-attach" /usr/local/bin/cc-attach
sudo ln -sf "$(pwd)/bin/copilot-attach" /usr/local/bin/copilot-attach
sudo ln -sf "$(pwd)/bin/codex-attach" /usr/local/bin/codex-attach| Command | Attaches to |
|---|---|
cc-attach |
Claude Code |
copilot-attach |
Copilot CLI |
codex-attach |
Codex |
Detach from any session with Ctrl+B then D β the agent keeps running in the background.
Note: These commands attach to tmux sessions named
cc,ghcp, andcodex. The sessions are created by your OpenClaw agent when it launches coding tasks. If no session is running, you'll see a message telling you to start one.
All settings can be overridden with environment variables:
| Variable | Default | Description |
|---|---|---|
OPENCLAW_DIR |
~/.openclaw/agents/main/sessions |
Path to OpenClaw sessions directory |
POLL_AGENTS |
500 |
Sub-agent poll interval (ms) |
POLL_CODING |
5000 |
Coding agent poll interval (ms) |
POLL_STATS |
10000 |
System stats poll interval (ms) |
POLL_CRON |
15000 |
OpenClaw cron poll interval (ms) |
POLL_SYSCRON |
60000 |
System cron poll interval (ms) |
MAX_SESSIONS |
10 |
Maximum sessions to display |
WARN_THRESHOLD |
70 |
Yellow threshold for resource bars (%) |
CRIT_THRESHOLD |
90 |
Red threshold for resource bars (%) |
BAR_WIDTH |
20 |
Width of resource bar charts |
Example:
POLL_STATS=5000 WARN_THRESHOLD=60 claw-monitor- Node.js 18+
- OpenClaw installed and running
- tmux (for coding agent attach/detach)
Optional (auto-detected):
nvidia-smiβ for GPU monitoring- Docker β for container monitoring
kubectlβ for Kubernetes/k3s pod monitoring
Watches OpenClaw's session directory (~/.openclaw/agents/main/sessions/) and sessions.json metadata to identify sub-agent sessions, parse JSONL logs for tool usage, and track activity via updatedAt timestamps.
Polls ps aux to detect running coding agent processes:
| Agent | Process pattern | Icon |
|---|---|---|
| Claude Code | claude --dangerously |
π€ |
| Copilot CLI | gh copilot |
π |
| Codex | codex |
π¦ |
Filters out wrapper processes (sudo, bash, node shims) and deduplicates to one entry per agent type.
- OpenClaw β Runs
openclaw cron list --jsonto fetch scheduled jobs - System β Parses
crontab -lfor root crontab entries
Both parse cron expressions into human-readable schedules, calculate relative next-run times, and handle day-of-month / day-of-week OR logic per the cron spec.
- CPU β Parsed from
topoutput - Memory β
os.totalmem()/os.freemem() - Disk β Parsed from
df -BG / - GPU β Parsed from
nvidia-smi --query-gpu(when available) - Docker β Parsed from
docker ps --format(when available) - Kubernetes β Parsed from
kubectl get pods(when available); auto-detects k3s via/etc/rancher/k3s/k3s.yaml - Systemd β Parsed from
systemctl list-units(when available); filters system-internal services
- Raw ANSI terminal rendering with TypeScript
- tmux β Terminal multiplexing for coding agent sessions
MIT Β© Dan Wahlin