swap-stopper, prevent restart loops if swap does not go down after it started to rise, also fix log consistency with newlines between loops.

This commit is contained in:
me
2026-10-10 19:07:36 -07:00
parent 487f1f46f3
commit 6fc8181272
+4
View File
@@ -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