0.2.0: config file, auto-prune, notify-send, cgroup PSI, kernel stacks, bpftrace, tray tooltip
This commit is contained in:
parent
d41f861802
commit
41dcb0f577
7 changed files with 206 additions and 39 deletions
37
README.md
37
README.md
|
|
@ -64,20 +64,33 @@ sudo systemctl restart freeze-watcher.service
|
|||
|
||||
If you're using the Arch package: `./packaging/build-package.sh && sudo pacman -U *.pkg.tar.zst` will rebuild and upgrade in place.
|
||||
|
||||
## Tuning thresholds
|
||||
## Configuration
|
||||
|
||||
Open `src/freeze-watcher.sh` and edit the constants at the top:
|
||||
Edit `/etc/freeze-watcher.conf`. After changes:
|
||||
|
||||
```
|
||||
PSI_IO_THRESHOLD=40 # io pressure avg10 % to trigger
|
||||
PSI_CPU_THRESHOLD=50 # cpu pressure avg10 % to trigger
|
||||
DSTATE_THRESHOLD=5 # processes in D state
|
||||
BLOCKED_THRESHOLD=5 # procs_blocked from /proc/stat
|
||||
LOAD_THRESHOLD=20 # 1-min load average
|
||||
COOLDOWN=30 # seconds between captures
|
||||
SAMPLE_INTERVAL=1 # seconds between samples
|
||||
sudo systemctl restart freeze-watcher.service
|
||||
```
|
||||
|
||||
Options:
|
||||
|
||||
| Variable | Default | Purpose |
|
||||
|---|---|---|
|
||||
| `PSI_IO_THRESHOLD` | 40 | io pressure avg10 % to trigger |
|
||||
| `PSI_CPU_THRESHOLD` | 50 | cpu pressure avg10 % to trigger |
|
||||
| `DSTATE_THRESHOLD` | 5 | processes in uninterruptible sleep |
|
||||
| `BLOCKED_THRESHOLD` | 5 | procs_blocked from /proc/stat |
|
||||
| `LOAD_THRESHOLD` | 20 | 1-min load average |
|
||||
| `SAMPLE_INTERVAL` | 1 | seconds between samples |
|
||||
| `COOLDOWN` | 30 | min seconds between captures |
|
||||
| `MAX_SNAPSHOTS` | 200 | auto-delete oldest beyond this count (0 disables) |
|
||||
| `MAX_SNAPSHOT_AGE_DAYS` | 30 | auto-delete older than this (0 disables) |
|
||||
| `NOTIFY_USERS` | "" | comma-separated users to notify-send on capture |
|
||||
| `NOTIFY_URGENCY` | normal | low / normal / critical |
|
||||
| `CAPTURE_KERNEL_STACKS` | 1 | dump /proc/[pid]/stack for D-state procs |
|
||||
| `CAPTURE_BPFTRACE` | 0 | run bpftrace one-shot (requires bpftrace) |
|
||||
| `CAPTURE_CGROUP_PSI` | 1 | walk cgroups for top per-cgroup PSI |
|
||||
|
||||
## GUI
|
||||
|
||||
Launch from app menu (search "Freeze Watcher") or `freeze-monitor-gui`.
|
||||
|
|
@ -105,13 +118,9 @@ Cross-reference `wchan` with PSI io and PSI cpu to distinguish lock contention (
|
|||
|
||||
## Future ideas
|
||||
|
||||
- Per-cgroup PSI capture
|
||||
- eBPF tracing for long-running syscalls
|
||||
- Web UI option (no Qt requirement)
|
||||
- Auto-prune old snapshots
|
||||
- Configurable `/etc/freeze-watcher.conf` instead of inline thresholds
|
||||
- Integration with desktop notifications via `notify-send`
|
||||
- Optional perf-profile capture during event
|
||||
- HTML/JSON snapshot output mode
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue