Keep your workstation responsive under heavy AI agent load.
What Is SRPS?
SRPS (System Resource Protection Script) installs ananicy-cpp with 1700+ rules to automatically deprioritize background processes, plus sysmoni TUI for real-time monitoring. When AI agents run heavy builds, SRPS keeps your terminal responsive.
Think of it as automatic resource management: compilers, bundlers, and test runners get deprioritized so your interactive sessions stay snappy.
1700+ Rules
Pre-configured for compilers, bundlers, browsers, IDEs
sysmoni TUI
Real-time CPU/memory monitoring with ananicy status
Sysctl Tweaks
Kernel optimizations for responsiveness under memory pressure
Zero Config
Install once, benefits forever - no tuning needed
Installation
SRPS installs the ananicy-cpp daemon and sysmoni monitoring tool in one command.
# Install SRPS with all components$ curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/system_resource_protection_script/main/install.sh | bash -s -- --install# Verify daemon is running$ systemctl status ananicy-cpp> Active: active (running)
Real-Time Monitoring with sysmoni
The sysmoni TUI shows real-time CPU and memory usage per process, along with the ananicy rule being applied to each.
# Launch the monitoring TUI$ sysmoni# See per-process CPU/memory with ananicy rule status# q to quit, arrows to navigate, s to sort, f to filter
- Per-process CPU and memory usage
- ananicy rule status for each process
- Nice level and scheduling class
- Real-time updates (configurable interval)
Essential Commands
What Gets Managed
SRPS automatically deprioritizes resource-intensive processes while keeping interactive sessions responsive:
- Compilers: rustc, gcc, clang, tsc, swc
- Bundlers: webpack, esbuild, vite, rollup
- Test runners: cargo test, jest, pytest
- Browsers: Chrome, Firefox, Electron apps
- IDEs: VS Code, JetBrains, language servers
Adding Custom Rules
You can add rules for any process that SRPS does not know about.
# Example: add rule for a custom heavy process$ echo '{"name": "my-heavy-process", "nice": 19, "sched": "idle", "ioclass": "idle"}' | \sudo tee /etc/ananicy.d/00-default/99-custom.rules# Restart to apply$ sudo systemctl restart ananicy-cpp
Synergies with Other Tools
- ntm: Keeps tmux sessions responsive when agents spawn heavy builds
- slb: Prevents multiple agents from starving each other for CPU/memory
- dcg: Combined safety - DCG prevents destructive commands, SRPS prevents resource exhaustion
Troubleshooting
If SRPS is not working as expected, check these common issues:
# Check if daemon is running$ systemctl status ananicy-cpp# View recent logs$ journalctl -u ananicy-cpp -n 50# Validate all rule files$ ananicy-cpp --config-test# Uninstall if needed$ curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/system_resource_protection_script/main/install.sh | bash -s -- --uninstall