diff --git a/polaris/polaris_nodes_build.sh b/polaris/polaris_nodes_build.sh new file mode 100755 index 0000000000000000000000000000000000000000..de153f5b6e67a15e45f4d8bda54b347479ac574f --- /dev/null +++ b/polaris/polaris_nodes_build.sh @@ -0,0 +1,8 @@ +#! /bin/bash + +# goal: show state of build nodes excluded from prod queue +# include: nodes marked as (build and demand) +# exclude: nodes marked as debug +# output: hostname, state + +pbsnodes -a -F json | jq -r '.nodes[] | select( (.resources_available.demand=="True" and .resources_available.build=="True") and .resources_available.debug!="True") | [.resources_available.host,.state] | @tsv' diff --git a/polaris/polaris_nodes_debug.sh b/polaris/polaris_nodes_debug.sh index 3b72553d3aa7956cd49cdc2e0ae5c596ad17ff71..905f91c078e08cc415c29fc4f45be5e22d2668c9 100755 --- a/polaris/polaris_nodes_debug.sh +++ b/polaris/polaris_nodes_debug.sh @@ -2,6 +2,9 @@ # goal: show state of debug nodes excluded from prod queue # include: nodes marked as debug +# exclude: nodes marked as build, demand +# note: I think debug can run on any nodes other than build or demand, but +# this script only show status for exclusively debug nodes, eg. debug=True # output: hostname, state -pbsnodes -a -F json | jq -r '.nodes[] | select(.resources_available.debug=="True") | [.resources_available.host,.state] | @tsv' +pbsnodes -a -F json | jq -r '.nodes[] | select(.resources_available.debug=="True" and .resources_available.build!="True" and .resources_available.demand!="True") | [.resources_available.host,.state] | @tsv' diff --git a/polaris/polaris_nodes_demand.sh b/polaris/polaris_nodes_demand.sh index 9dd3b302b5bf3da1b46f58add58d8bdc0e6c4c55..0e560aa5dc02984af8de8aa3f69d121e95e76d3f 100755 --- a/polaris/polaris_nodes_demand.sh +++ b/polaris/polaris_nodes_demand.sh @@ -2,6 +2,7 @@ # goal: show state of demand nodes excluded from prod queue # include: nodes marked as demand +# exclude: nodes marked as build # output: hostname, state -pbsnodes -a -F json | jq -r '.nodes[] | select(.resources_available.demand=="True") | [.resources_available.host,.state] | @tsv' +pbsnodes -a -F json | jq -r '.nodes[] | select(.resources_available.demand=="True" and .resources_available.build!="True") | [.resources_available.host,.state] | @tsv' diff --git a/polaris/polaris_nodes_preemptable.sh b/polaris/polaris_nodes_preemptable.sh new file mode 100755 index 0000000000000000000000000000000000000000..c307c0425ab8adf3f12cd045b35ec84a5d5c0aa3 --- /dev/null +++ b/polaris/polaris_nodes_preemptable.sh @@ -0,0 +1,8 @@ +#! /bin/bash + +# goal: show state of preemptable nodes excluded from prod queue +# include: nodes marked as demand +# exclude: nodes marked as build, debug +# output: hostname, state + +pbsnodes -a -F json | jq -r '.nodes[] | select(.resources_available.demand=="True" and .resources_available.build!="True" and .resources_available.debug!="True") | [.resources_available.host,.state] | @tsv' diff --git a/polaris/polaris_nodes_prod.sh b/polaris/polaris_nodes_prod.sh index 3360ff419fe20d49e0da10f7a429ac87c6a9735e..9532bae0c4f45d4c2c878235585f1d20358b933c 100755 --- a/polaris/polaris_nodes_prod.sh +++ b/polaris/polaris_nodes_prod.sh @@ -3,8 +3,8 @@ # goal: determine the max job size that could run in prod queue in near future # example: ./polaris_nodes_prod.sh | wc -l # include: nodes in "free" or "job-exclusive" state -# exclude: nodes marked as "debug" or "demand" +# exclude: nodes marked as debug, demand, build # output: hostname, state # issues: unsure how state relates to reservations on polaris -pbsnodes -a -F json | jq -r '.nodes[] | select( (.state=="free" or .state=="job-exclusive") and .resources_available.debug!="True" and .resources_available.demand!="True") | [.resources_available.host,.state] | @tsv' +pbsnodes -a -F json | jq -r '.nodes[] | select( (.state=="free" or .state=="job-exclusive") and .resources_available.debug!="True" and .resources_available.demand!="True" and .resources_available.build!="True") | [.resources_available.host,.state] | @tsv'