-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmonitor.sh
More file actions
executable file
·35 lines (30 loc) · 1.14 KB
/
monitor.sh
File metadata and controls
executable file
·35 lines (30 loc) · 1.14 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
#!/bin/bash
echo "🔍 LiteMIDgo Monitoring Script"
echo "================================"
echo "This script shows the status of your agent and server"
echo ""
# Check if server is running
echo "📡 Server Status:"
if lsof -i :8080 > /dev/null 2>&1; then
echo "✅ LiteMIDgo server is running on port 8080"
echo " Process: $(lsof -i :8080 | tail -n 1 | awk '{print $1}') (PID: $(lsof -i :8080 | tail -n 1 | awk '{print $2}'))"
else
echo "❌ LiteMIDgo server is not running"
fi
echo ""
# Check if agent is running
echo "🤖 Agent Status:"
AGENT_PID=$(pgrep -f "litemidgo-agent daemon")
if [ -n "$AGENT_PID" ]; then
echo "✅ LiteMIDgo agent is running (PID: $AGENT_PID)"
echo " Sending metrics every 10 seconds"
else
echo "❌ LiteMIDgo agent is not running"
fi
echo ""
echo "📊 Quick Commands:"
echo " Start agent: cd agent && ./litemidgo-agent daemon --interval 10"
echo " Stop agent: pkill -f 'litemidgo-agent daemon'"
echo " Test single send: cd agent && ./litemidgo-agent send"
echo " Test with debug: cd agent && ./litemidgo-agent send --debug"
echo " View metrics: cd agent && ./litemidgo-agent collect"