-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathstatus.sh
More file actions
executable file
·50 lines (42 loc) · 1.53 KB
/
status.sh
File metadata and controls
executable file
·50 lines (42 loc) · 1.53 KB
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
#!/bin/bash
# TEE Project Status Script
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Resolve data directory (same logic as lib/config.py)
if [ -n "$TEE_DATA_DIR" ]; then
DATA_DIR="$TEE_DATA_DIR"
elif id tee >/dev/null 2>&1; then
DATA_DIR="/home/tee/data"
else
DATA_DIR="$HOME/data"
fi
echo "TEE Project Status"
echo "========================"
echo ""
# Git status
echo "Git Repository:"
echo " Branch: $(cd "$SCRIPT_DIR" && git branch --show-current 2>/dev/null || echo 'N/A')"
echo " Status: $(cd "$SCRIPT_DIR" && if git diff --quiet && git diff --cached --quiet; then echo 'Clean'; else echo 'Changes pending'; fi 2>/dev/null)"
echo ""
# Data directories
echo "Data ($DATA_DIR):"
if [ -d "$DATA_DIR" ]; then
echo " mosaics: $(du -sh "$DATA_DIR/mosaics" 2>/dev/null | cut -f1 || echo "not found")"
echo " embeddings: $(du -sh "$DATA_DIR/embeddings" 2>/dev/null | cut -f1 || echo "not found")"
echo " pyramids: $(du -sh "$DATA_DIR/pyramids" 2>/dev/null | cut -f1 || echo "not found")"
echo " vectors: $(du -sh "$DATA_DIR/vectors" 2>/dev/null | cut -f1 || echo "not found")"
else
echo " Data directory not found: $DATA_DIR"
fi
echo ""
# Disk space
echo "Disk Space:"
df -h "$DATA_DIR" 2>/dev/null | tail -1 | awk '{printf " Used: %s / %s (%s available)\n", $3, $2, $4}'
echo ""
# Services
echo "Services:"
if pgrep -f "python.*waitress.*tee_project\|python.*manage.py.*runserver" >/dev/null 2>&1; then
echo " Web server: running"
else
echo " Web server: stopped"
fi
echo ""