fix: swap threshold — only P0 if swap >3GB AND avail <2GB
High swap with healthy available RAM is normal (dockerd pages out). Only alert when both swap is high and available RAM is low.
This commit is contained in:
parent
19ef44f5b9
commit
d48b0f17ac
1 changed files with 1 additions and 1 deletions
|
|
@ -60,7 +60,7 @@ status "P0: checking memory"
|
|||
AVAIL_MB=$(free -m | awk '/Mem:/{print $7}')
|
||||
SWAP_USED_MB=$(free -m | awk '/Swap:/{print $3}')
|
||||
|
||||
if [ "${AVAIL_MB:-9999}" -lt 500 ] || [ "${SWAP_USED_MB:-0}" -gt 3000 ]; then
|
||||
if [ "${AVAIL_MB:-9999}" -lt 500 ] || { [ "${SWAP_USED_MB:-0}" -gt 3000 ] && [ "${AVAIL_MB:-9999}" -lt 2000 ]; }; then
|
||||
flog "MEMORY CRISIS: avail=${AVAIL_MB}MB swap_used=${SWAP_USED_MB}MB — auto-fixing"
|
||||
|
||||
# Kill stale claude processes (>3h old)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue