Files
runpod/scripts/status.sh

48 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/bash
#
# Check AI Services Status
# Shows status of all services managed by Supervisor
#
WORKSPACE_DIR="${WORKSPACE_DIR:-/workspace}"
SUPERVISORD_CONF="${WORKSPACE_DIR}/supervisord.conf"
echo "========================================="
echo " AI Services Status"
echo "========================================="
echo ""
# Check if supervisord is running
if [ ! -f "${WORKSPACE_DIR}/supervisord.pid" ]; then
echo "❌ Supervisor is not running"
echo ""
echo "To start services, run:"
echo " bash scripts/start-all.sh"
exit 1
fi
PID=$(cat "${WORKSPACE_DIR}/supervisord.pid")
if ! ps -p "$PID" > /dev/null 2>&1; then
echo "❌ Supervisor PID file exists but process is not running"
echo ""
echo "To start services, run:"
echo " bash scripts/start-all.sh"
exit 1
fi
echo "✅ Supervisor is running (PID: $PID)"
echo ""
# Show service status
echo "Service Status:"
echo "---------------"
supervisorctl -c "${SUPERVISORD_CONF}" status
echo ""
echo "Useful commands:"
echo " supervisorctl start orchestrator - Start orchestrator"
echo " supervisorctl restart comfyui - Restart ComfyUI"
echo " supervisorctl stop all - Stop all services"
echo " supervisorctl tail -f comfyui - Follow ComfyUI logs"
echo ""