-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathissues.sh
More file actions
executable file
·55 lines (47 loc) · 1.35 KB
/
issues.sh
File metadata and controls
executable file
·55 lines (47 loc) · 1.35 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
51
52
53
54
55
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
OUT_DIR="$ROOT_DIR/runs/diagnostics"
mkdir -p "$OUT_DIR"
OUT_FILE="$OUT_DIR/issues_$(date +%Y%m%d_%H%M%S).txt"
{
echo "Mayari Diagnostics"
echo "Timestamp: $(date -u +%Y-%m-%dT%H:%M:%SZ)"
echo
echo "== System =="
uname -a || true
echo "Disk:"
df -h . || true
echo
echo "== Tool Versions =="
python3 --version || true
flutter --version | head -n 1 || true
echo
echo "== Ports =="
lsof -iTCP:8086 -sTCP:LISTEN -n -P || true
lsof -iTCP:8787 -sTCP:LISTEN -n -P || true
echo
echo "== Health Checks =="
echo "Mayari MCP /api/health:"
curl -s --connect-timeout 3 http://127.0.0.1:8086/api/health || echo "unreachable"
echo
echo "MCP tools/list:"
curl -s --connect-timeout 3 -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"tools/list","params":{},"id":1}' \
http://127.0.0.1:8086 || echo "unreachable"
echo
echo "== Recent Logs (.logs) =="
for f in "$ROOT_DIR/.logs"/*.log; do
[ -f "$f" ] || continue
echo "--- $f (last 50 lines) ---"
tail -n 50 "$f" || true
done
echo
echo "== Recent Logs (runs/logs) =="
for f in "$ROOT_DIR/runs/logs"/*.log; do
[ -f "$f" ] || continue
echo "--- $f (last 50 lines) ---"
tail -n 50 "$f" || true
done
} > "$OUT_FILE" 2>&1
echo "$OUT_FILE"