38 lines
2 KiB
Text
38 lines
2 KiB
Text
# freeze-watcher configuration
|
|
# Sourced by /usr/local/bin/freeze-watcher.sh at startup.
|
|
# Lines are bash variable assignments. Restart the service after editing:
|
|
# sudo systemctl restart freeze-watcher.service
|
|
|
|
# --- thresholds ----------------------------------------------------------
|
|
# A snapshot is captured when ANY of these is exceeded.
|
|
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
|
|
|
|
# --- timing --------------------------------------------------------------
|
|
SAMPLE_INTERVAL=1 # seconds between samples
|
|
COOLDOWN=30 # min seconds between captures
|
|
|
|
# --- retention -----------------------------------------------------------
|
|
MAX_SNAPSHOTS=200 # auto-delete oldest beyond this count (0 = no cap)
|
|
MAX_SNAPSHOT_AGE_DAYS=30 # auto-delete older than this (0 = no age cap)
|
|
|
|
# --- notifications -------------------------------------------------------
|
|
# Send a desktop notification when a snapshot is captured.
|
|
# Comma-separated list of users to notify (must be logged into a graphical session).
|
|
NOTIFY_USERS="" # e.g. "luna" or "luna,alice"
|
|
NOTIFY_URGENCY=normal # low, normal, critical
|
|
|
|
# --- capture options -----------------------------------------------------
|
|
CAPTURE_KERNEL_STACKS=1 # dump /proc/[pid]/stack for D-state procs (free, very useful)
|
|
CAPTURE_BPFTRACE=0 # run bpftrace one-shot during capture (requires bpftrace)
|
|
CAPTURE_CGROUP_PSI=1 # walk /sys/fs/cgroup for top PSI cgroups
|
|
|
|
# --- output formats ------------------------------------------------------
|
|
# Text snapshot is always written. These add sidecar files (.json / .html)
|
|
# next to each snap-*.log. The HTML version has color-coded metrics and
|
|
# collapsible sections, useful for sharing or browsing.
|
|
OUTPUT_JSON=0 # write snap-*.json
|
|
OUTPUT_HTML=0 # write snap-*.html
|