Machine Operations
Lifecycle Management
You can check and control the machine instance state:
- get_machine_lifecycle_status → current state (Running, Paused, Stopped), PID, uptime
- restart_machine → restart the instance (requires user approval)
- pause_machine → pause the instance (requires user approval)
- resume_machine → resume a paused instance (requires user approval)
Always check get_machine_lifecycle_status before performing restart/pause/resume.
Metrics & Events
- get_machine_metrics → historical time-series metrics (CPU, memory, disk, network)
- get_machine_metrics_summary → summarized averages, peaks, and trends
- get_machine_events → lifecycle events (restarts, failures, state changes)
Use metrics for trend analysis and incident correlation. Use get_machine_stats for a point-in-time snapshot.
Backups
- get_backup_schedule → current backup schedule configuration
- update_backup_schedule → modify backup frequency, retention, timing
- list_machine_backups → list available backups with timestamps and status
- trigger_machine_backup → create an immediate backup (requires approval)
Diagnostic Layers (IN ORDER, stop on root cause)
- get_servers_ssh_status → reachable?
- get_machine_stats → CPU, RAM, disk, load, uptime
- Anomalies: mem>90% → host_exec "ps aux --sort=-%mem | head -20". disk>85% → "du -sh /var/lib/docker/* 2>/dev/null | sort -rh | head -10". cpu>80% → "ps aux --sort=-%cpu | head -20". load>2x cores → overloaded.
- Docker → host_exec "systemctl status docker --no-pager", "docker info 2>&1 | head -30"
- System logs → host_exec "dmesg | tail -30", "journalctl -u docker --since '30 min ago' --no-pager | tail -50"
- Proxy/domain: follow domain-tls-routing skill. Caddy status/logs/validate via host_exec. For domain CRUD or reachability checks, defer to Infrastructure Agent.
- Network → host_exec "ss -tlnp"
- Cleanup → host_exec "docker system df"
Root cause: bold summary, evidence in code block, fix in 1-2 sentences.
No anomalies: report healthy with key metrics.
1---2name: machine-ops3description: Machine-level diagnostic layers, lifecycle management (restart/pause/resume), metrics analysis, and backup operations. Load when investigating server health or managing machine state.4---56# Machine Operations78## Lifecycle Management9You can check and control the machine instance state:10- get_machine_lifecycle_status → current state (Running, Paused, Stopped), PID, uptime11- restart_machine → restart the instance (requires user approval)12- pause_machine → pause the instance (requires user approval)13- resume_machine → resume a paused instance (requires user approval)1415Always check get_machine_lifecycle_status before performing restart/pause/resume.1617## Metrics & Events18- get_machine_metrics → historical time-series metrics (CPU, memory, disk, network)19- get_machine_metrics_summary → summarized averages, peaks, and trends20- get_machine_events → lifecycle events (restarts, failures, state changes)2122Use metrics for trend analysis and incident correlation. Use get_machine_stats for a point-in-time snapshot.2324## Backups25- get_backup_schedule → current backup schedule configuration26- update_backup_schedule → modify backup frequency, retention, timing27- list_machine_backups → list available backups with timestamps and status28- trigger_machine_backup → create an immediate backup (requires approval)2930## Diagnostic Layers (IN ORDER, stop on root cause)311. get_servers_ssh_status → reachable?322. get_machine_stats → CPU, RAM, disk, load, uptime333. Anomalies: mem>90% → host_exec "ps aux --sort=-%mem | head -20". disk>85% → "du -sh /var/lib/docker/* 2>/dev/null | sort -rh | head -10". cpu>80% → "ps aux --sort=-%cpu | head -20". load>2x cores → overloaded.344. Docker → host_exec "systemctl status docker --no-pager", "docker info 2>&1 | head -30"355. System logs → host_exec "dmesg | tail -30", "journalctl -u docker --since '30 min ago' --no-pager | tail -50"366. Proxy/domain: follow domain-tls-routing skill. Caddy status/logs/validate via host_exec. For domain CRUD or reachability checks, defer to Infrastructure Agent.377. Network → host_exec "ss -tlnp"388. Cleanup → host_exec "docker system df"3940Root cause: bold summary, evidence in code block, fix in 1-2 sentences.41No anomalies: report healthy with key metrics.