From 6fc8181272f6a456f61f45d943541bc779420063 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 10 Oct 2026 19:07:36 -0700 Subject: [PATCH] swap-stopper, prevent restart loops if swap does not go down after it started to rise, also fix log consistency with newlines between loops. --- files/scripts/llm_swap_stopper.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/scripts/llm_swap_stopper.sh b/files/scripts/llm_swap_stopper.sh index 9c64ac9..dd302d8 100755 --- a/files/scripts/llm_swap_stopper.sh +++ b/files/scripts/llm_swap_stopper.sh @@ -52,6 +52,8 @@ while [[ true ]]; do if [ $used_ram_pct -gt $ram_pct_restart ]; then echo "WARNING: RAM is over ${ram_pct_restart}% used. Restarting LLMs." restart_llms + echo -e "Done, setting last RAM to 100 and continuing.\n" + last_ram_pct=100 continue fi @@ -70,6 +72,8 @@ while [[ true ]]; do if [ $used_swap_pct -gt $last_swap_pct ]; then echo "WARNING: Swap is growing. Restarting LLMs." restart_llms + echo -e "Done, setting last swap to 100 and continuing.\n" + last_swap_pct=100 continue fi