Skip to content

Instantly share code, notes, and snippets.

@thejevans
Created September 22, 2022 17:27
Show Gist options
  • Save thejevans/9756c86312aa373c4688321513d8bcec to your computer and use it in GitHub Desktop.
Save thejevans/9756c86312aa373c4688321513d8bcec to your computer and use it in GitHub Desktop.
Simple script to monitor multiple dags
#!/bin/bash
# best used with watch
# example:
# watch -n 30 "./dag_watch.sh dag1.dag dag2.dag dag3.dag"
TOWATCH=("$@")
for DAG in "${TOWATCH[@]}"; do
echo "${DAG}:"
DAGOUT="${DAG}.dagman.out"
echo "$(tac $DAGOUT | grep -m 1 -C 2 "===" | tac)"
echo ---
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment