-
Notifications
You must be signed in to change notification settings - Fork 0
Shane's shell tips
Shane Neph edited this page Nov 7, 2023
·
13 revisions
sc() {
params=""
if (( $# != 0 )); then
params="$@"
fi
squeue $params -o '%.8u %.2t %.6C %R' --noheader --array | awk -v me=`whoami` 'BEGIN {mecntr=0;waitcntr=0;allwaitcntr=0;smartcntr=0;neversatisfiedcntr=0;allsmartcntr=0;allneversatisfiedcntr=0;allnum=0} {num=$3; allnum+=num; if ($2~/R/) { } if ($2 ~/PD/) {allwaitcntr+=num; if ($4~/Dependency/ || $4~/JobHeld/) allsmartcntr+=num; if ($4~/DependencyNeverSatisfied/) allneversatisfiedcntr+=num; } if ($1 == me) { mecntr+=num; if ($2~/PD/) {waitcntr+=num; if ($4~/Dependency/ || $4~/JobHeldUser/) smartcntr+=num; if ($4~/DependencyNeverSatisfied/) neversatisfiedcntr+=num; } } } END { print " All Jobs: " allnum; print " Running: " allnum-allwaitcntr; print " Waiting: " allwaitcntr; print " Resource: " allwaitcntr-allsmartcntr; print " Designed: " allsmartcntr; print " Orphaned: " allneversatisfiedcntr; print " My Jobs: " mecntr; print " Running: " mecntr-waitcntr; print " Waiting: " waitcntr; print " Resource: " waitcntr-smartcntr; print " Designed: " smartcntr; print " Orphaned: " neversatisfiedcntr; }' && date;
}
sc0() { sc -p compute -A stergachislab; }
sc1() { sc -p ckpt; }
> sc1

> sc0
