Files
foxhunt/scripts/check_backtesting_health.sh
jgrusewski 8d89fe80ff chore: Second cleanup wave - organize root directory
- Archive: 85 agent .txt files → docs/archive/agents/legacy_txt/
- Scripts: Move 110 shell scripts → scripts/ (keep deploy.sh in root)
- Models: Move 18 .safetensors → ml/models/checkpoints/training_artifacts/
- Delete: 34 directories (~33GB freed) - target/, coverage_*, test artifacts
- Build: Clean 14 build artifacts (.rlib, .o, .pid, binaries)
- Tests: Move 14 .rs files → tests/standalone/
- SQL: Move 5 files → sql/ (keep init-db*.sql for Docker)
- Wave 153: Archive to docs/archive/historical/wave153/
- Docs: Archive 9 markdown files to wave_d/reports/ and historical/

Total impact: ~34GB freed (both waves), root directory cleaned from 583 to ~40 essential files
Directory count reduced from 65 to 31 (52% reduction)
All historical data preserved in organized archive structure
2025-10-30 01:26:02 +01:00

39 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
echo "=== Backtesting Service Health Check ==="
echo ""
# Check process
if ps -p 1739871 > /dev/null 2>&1; then
echo "✓ Process Status: RUNNING (PID: 1739871)"
echo " Uptime: $(ps -p 1739871 -o etime= | xargs)"
else
echo "✗ Process Status: NOT RUNNING"
exit 1
fi
# Check port
if ss -tlnp 2>/dev/null | grep -q ":50052.*1739871"; then
echo "✓ Port Status: LISTENING on 50052"
else
echo "✗ Port Status: NOT LISTENING"
exit 1
fi
# Check TLS handshake
if timeout 2 openssl s_client -connect localhost:50052 -CAfile /tmp/foxhunt/certs/ca.crt </dev/null 2>&1 | grep -q "Verify return code: 0"; then
echo "✓ TLS Status: HANDSHAKE OK"
elif timeout 2 openssl s_client -connect localhost:50052 </dev/null 2>&1 | grep -q "CONNECTED"; then
echo "⚠ TLS Status: CONNECTED (certificate validation pending)"
else
echo "✗ TLS Status: FAILED"
fi
# Check recent logs
echo ""
echo "=== Recent Log Entries ==="
tail -5 /home/jgrusewski/Work/foxhunt/logs/backtesting_service.log
echo ""
echo "✓ Backtesting service is operational"