38 lines
1011 B
Bash
38 lines
1011 B
Bash
#!/bin/bash
|
|
|
|
echo "🧠 LLM Hub Status"
|
|
echo "================="
|
|
echo ""
|
|
|
|
# Container status
|
|
echo "📦 Containers:"
|
|
docker-compose ps --services --filter "status=running" 2>/dev/null | while read service; do
|
|
status=$(docker-compose ps -q "$service" | xargs docker inspect -f '{{.State.Status}}' 2>/dev/null)
|
|
echo " $service: $status"
|
|
done
|
|
|
|
echo ""
|
|
echo "🔍 Health Checks:"
|
|
|
|
# API health
|
|
if curl -s http://localhost:8080/health | grep -q "healthy"; then
|
|
echo " ✅ Agent Core: Healthy"
|
|
else
|
|
echo " ❌ Agent Core: Not responding"
|
|
fi
|
|
|
|
# LiteLLM
|
|
if curl -s http://localhost:4000/health/liveliness | grep -q "true"; then
|
|
echo " ✅ LiteLLM: Running"
|
|
else
|
|
echo " ❌ LiteLLM: Not responding"
|
|
fi
|
|
|
|
echo ""
|
|
echo "📊 Router Stats:"
|
|
curl -s http://localhost:8080/health 2>/dev/null | python3 -m json.tool 2>/dev/null || echo " Unable to fetch stats"
|
|
|
|
echo ""
|
|
echo "💾 Memory Usage:"
|
|
docker stats --no-stream --format "table {{.Name}}\t{{.MemUsage}}" | grep -E "(agent-|NAME)" || true
|