0a45133d28
- Add dedicated watchers/ project folder with box-stability-watcher.py supervisor - Monitor host load, memory, swap saturation, and crash-looping services - Implement tiered mitigations: yellow renicing, orange SIGSTOP pause with 60s grace, red shedding - Distinguish user-launched agents (allowed on desktop default socket) from automated box workloads - Wire first-class box stability CLI subcommand and top-line host status in fleet status - Harden tmux.service with cgroup memory limits to prevent OS freeze and OOM avalanches - Add 10-test unit test suite covering thresholds, safety whitelist, pause/resume, and isolation
45 lines
870 B
JSON
45 lines
870 B
JSON
{
|
|
"thresholds": {
|
|
"load_warning": 20.0,
|
|
"load_critical": 35.0,
|
|
"load_emergency": 60.0,
|
|
"ram_warning_pct": 80.0,
|
|
"ram_critical_pct": 90.0,
|
|
"swap_warning_pct": 75.0,
|
|
"swap_critical_pct": 85.0,
|
|
"process_rss_warning_mb": 2000,
|
|
"process_rss_critical_mb": 3000
|
|
},
|
|
"protected_commands": [
|
|
"sshd",
|
|
"tailscaled",
|
|
"tailscale",
|
|
"systemd",
|
|
"dbus-broker",
|
|
"pipewire",
|
|
"wireplumber",
|
|
"tmux",
|
|
"bash",
|
|
"zsh",
|
|
"ghostty",
|
|
"alacritty"
|
|
],
|
|
"monitored_targets": [
|
|
"muse-bin",
|
|
"chromium",
|
|
"python3",
|
|
"parec"
|
|
],
|
|
"actions": {
|
|
"enable_renice": true,
|
|
"enable_cull_runaway": true,
|
|
"enable_service_freeze": true
|
|
},
|
|
"service_guardrails": {
|
|
"max_restarts_per_window": 10,
|
|
"window_seconds": 60
|
|
},
|
|
"interval_sec": 10,
|
|
"log_file": "logs/box-stability.jsonl"
|
|
}
|