Created
June 15, 2012 13:59
-
-
Save jnhutchinson/2936607 to your computer and use it in GitHub Desktop.
lsf.wait.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wait.on.lsf() { ## wait on jobs{ | |
n=`bjobs -P $projectID | awk 'NR>1' | wc -l` | |
while [ $n -ne 0 ] | |
do | |
n=`bjobs -P $projectID | awk 'NR>1' | wc -l` | |
# number of running | |
echo "Running: "`bjobs -P $projectID | grep RUN | wc -l` | |
# number of pending | |
echo "Pending: "`bjobs -P $projectID | grep PEND | wc -l` | |
sleep 60 ##raising this to 120 will cause LSF to drop the script | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment