areyoubusy(){ njobs=$(pbsnodes -x $1 | grep \<jobs\> | sed -e 's/.*<jobs>//;s/<\/jobs\>.*$//' \ | awk -F ',' 'END{print NF}') if [ $njobs -gt 0 ]; then echo "yes" else echo "no" fi } # usage: areyoubusy node1.local
Thursday, October 16, 2008
Are you busy to receive the submissions?
A bash local command that returns "no" when the node asked was absolutely not running any job, otherwise "yes".
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment