diff options
| -rwxr-xr-x | Omni/Agent/monitor.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Omni/Agent/monitor.sh b/Omni/Agent/monitor.sh new file mode 100755 index 0000000..1626354 --- /dev/null +++ b/Omni/Agent/monitor.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# Omni/Agent/monitor.sh +# Monitor the logs of a worker agent +# Usage: ./Omni/Agent/monitor.sh [worker-name] + +WORKER="${1:-omni-worker-1}" +REPO_ROOT="$(git rev-parse --show-toplevel)" +WORKER_DIR="$REPO_ROOT/../$WORKER" + +if [ ! -d "$WORKER_DIR" ]; then + echo "Error: Worker directory '$WORKER_DIR' not found." + echo "Usage: $0 [worker-name]" + exit 1 +fi + +LOG_FILE="$WORKER_DIR/_/llm/amp.log" + +echo "Monitoring worker: $WORKER" +echo "Watching log: $LOG_FILE" +echo "---------------------------------------------------" + +# Wait for log file to appear +while [ ! -f "$LOG_FILE" ]; do + echo "Waiting for log file to be created..." + sleep 2 +done + +# Tail the log file +tail -f "$LOG_FILE" |
