Skip to content

Commit

Permalink
slurm status queue equality test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ehb54 committed Feb 25, 2022
1 parent 7950576 commit e8303d6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions status/slurm
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
# line 2: running jobs for queue
# line 3: pending (queued) jobs for queue

if [[ $# -ne 1 ]] ; then
if [[ $# != 1 ]] ; then
>&2 echo $0: ERROR: not exactly one argument provided which should the be queue/partition name
exit -1
fi

QUEUE=$1
if [[ $QUEUE -eq "ALL" ]] ; then

if [[ $QUEUE == "ALL" ]] ; then
sinfo -s -a -o "%a" | tail -1 | sed 's/AVAIL/down/' \
&& squeue -h -a -t running | wc -l \
&& squeue -h -a -t pending | wc -l
Expand Down

0 comments on commit e8303d6

Please sign in to comment.