File size: 2,057 Bytes
a7ae6b9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
# Elizabeth Training Monitoring Dashboard

echo "=== Elizabeth Training Monitoring Dashboard ==="
echo "Timestamp: $(date)"
echo ""

# Check training manager
echo "πŸ“Š Training Manager Status:"
if ps aux | grep -q "training_manager.py" | grep -v grep; then
    echo "  βœ… RUNNING - Training manager active"
    MANAGER_PID=$(ps aux | grep "training_manager.py" | grep -v grep | awk '{print $2}')
    echo "  PID: $MANAGER_PID"
else
    echo "  ❌ STOPPED - Training manager not running"
fi

echo ""

# Check Elizabeth processes
echo "πŸ€– Elizabeth Processes:"
ELIZABETH_PROCS=$(ps aux | grep "python3.*elizabeth" | grep -v grep)
if [ -n "$ELIZABETH_PROCS" ]; then
    echo "$ELIZABETH_PROCS" | while read line; do
        echo "  βœ… $line"
    done
    COUNT=$(echo "$ELIZABETH_PROCS" | wc -l)
    echo "  Total processes: $COUNT"
else
    echo "  ❌ No Elizabeth processes found"
fi

echo ""

# Check logs
echo "πŸ“‹ Log Files:"
LOG_FILES=$(ls -la /workspace/elizabeth_logs/ 2>/dev/null)
if [ -n "$LOG_FILES" ]; then
    echo "  Log directory: /workspace/elizabeth_logs/"
    echo "  Files:"
    ls -la /workspace/elizabeth_logs/ | tail -5 | while read line; do
        echo "    $line"
    done
else
    echo "  ❌ No log directory found"
fi

echo ""

# Check training history
echo "πŸ“ˆ Training History:"
if [ -f "/workspace/elizabeth_logs/training_history.json" ]; then
    SESSIONS=$(jq '.total_sessions' /workspace/elizabeth_logs/training_history.json 2>/dev/null)
    RESTARTS=$(jq '.total_restarts' /workspace/elizabeth_logs/training_history.json 2>/dev/null)
    echo "  Total sessions: ${SESSIONS:-0}"
    echo "  Total restarts: ${RESTARTS:-0}"
else
    echo "  No training history found"
fi

echo ""

# System status
echo "πŸ–₯️  System Status:"
CPU=$(top -bn1 | grep "Cpu(s)" | awk '{print $2}')
MEM=$(free -m | awk '/Mem:/ {printf "%.1f%%", $3/$2*100}')
echo "  CPU Usage: $CPU%"
echo "  Memory Usage: $MEM"

echo ""
echo "=== Dashboard Refresh: $(date) ==="
echo "Run this script periodically to monitor training status"