15 lines
907 B
Bash
Executable File
15 lines
907 B
Bash
Executable File
#!/bin/bash
|
|
echo "PORTS=$(ss -tlnp 2>/dev/null|grep -c LISTEN)"
|
|
echo "GIT_DIRTY=$(cd /var/www/html && git status --porcelain 2>/dev/null|wc -l)"
|
|
echo "DOCKER=$(docker ps -q 2>/dev/null|wc -l)"
|
|
echo "DISK=$(df -h / | tail -1 | awk '{print $5}')"
|
|
echo "WIKI=$(ls /opt/weval-l99/wiki/ 2>/dev/null|wc -l)"
|
|
echo "CRONS=$(crontab -l 2>/dev/null|grep -vc '^#')"
|
|
echo "NEW_PAGES=$(find /var/www/html -maxdepth 2 -name '*.html' -mtime -3 2>/dev/null|wc -l)"
|
|
# V104 fix: try 11435 (LiteLLM) first then 11434 (Ollama native)
|
|
OLLAMA_COUNT=$(curl -sf http://localhost:11435/api/tags 2>/dev/null|python3 -c 'import json,sys;print(len(json.load(sys.stdin).get("models",[])))' 2>/dev/null)
|
|
if [ -z "$OLLAMA_COUNT" ]; then
|
|
OLLAMA_COUNT=$(curl -sf http://localhost:11434/api/tags 2>/dev/null|python3 -c 'import json,sys;print(len(json.load(sys.stdin).get("models",[])))' 2>/dev/null)
|
|
fi
|
|
echo "OLLAMA=${OLLAMA_COUNT:-DOWN}"
|