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:
@@ -52,6 +52,8 @@ while [[ true ]]; do
|
|||||||
if [ $used_ram_pct -gt $ram_pct_restart ]; then
|
if [ $used_ram_pct -gt $ram_pct_restart ]; then
|
||||||
echo "WARNING: RAM is over ${ram_pct_restart}% used. Restarting LLMs."
|
echo "WARNING: RAM is over ${ram_pct_restart}% used. Restarting LLMs."
|
||||||
restart_llms
|
restart_llms
|
||||||
|
echo -e "Done, setting last RAM to 100 and continuing.\n"
|
||||||
|
last_ram_pct=100
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -70,6 +72,8 @@ while [[ true ]]; do
|
|||||||
if [ $used_swap_pct -gt $last_swap_pct ]; then
|
if [ $used_swap_pct -gt $last_swap_pct ]; then
|
||||||
echo "WARNING: Swap is growing. Restarting LLMs."
|
echo "WARNING: Swap is growing. Restarting LLMs."
|
||||||
restart_llms
|
restart_llms
|
||||||
|
echo -e "Done, setting last swap to 100 and continuing.\n"
|
||||||
|
last_swap_pct=100
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user