Files
tsllm_personalization_icl/utils/kill_ollamas.sh
2025-10-23 16:07:29 +09:00

17 lines
430 B
Bash
Executable File

#!/bin/bash
echo "Killing all tmux sessions starting with 'ollama'..."
# Get all tmux sessions starting with "ollama"
SESSIONS=$(tmux list-sessions -F '#S' | grep '^ollama')
if [ -z "$SESSIONS" ]; then
echo "No 'ollama' sessions found."
else
for SESSION in $SESSIONS; do
echo "Killing session: $SESSION"
tmux kill-session -t "$SESSION"
done
echo "All 'ollama' sessions have been terminated."
fi