feat: implement server-wide management actions and enhance TUI dashboard

This commit is contained in:
2026-03-04 20:51:02 +00:00
parent 150f9d2990
commit ddec55871b
13 changed files with 621 additions and 52 deletions
+7
View File
@@ -26,6 +26,7 @@ while IFS='|' read -r id _version _enabled _desc _cfg; do
fi
pid="$(read_pid "$id")"
instance_count="$(count_instances "$id")"
((found++)) || true
# Uptime: calcular desde el inicio del proceso
@@ -78,6 +79,12 @@ while IFS='|' read -r id _version _enabled _desc _cfg; do
printf "%-22s ${GRN}%-8s${RST} %-12s %-10s %-8s %s\n" \
"$id" "$pid" "$uptime" "$mem" "${cpu_pct}%" "$log_size"
# Warn about duplicate instances
if [[ "$instance_count" -gt 1 ]]; then
printf " ${RED}⚠ WARNING: %d instances running!${RST} PIDs: %s\n" \
"$instance_count" "$(find_agent_pids "$id" | tr '\n' ' ')"
fi
done < <(list_agents_raw)
if [[ "$found" -eq 0 ]]; then