|
|
@ -11,12 +11,22 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function node_slot_stats_raw() |
|
|
|
function node_slot_stats_raw() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
qstat -f | _Process_node_slot_stats_raw |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function node_slot_stats_raw_f() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
_Process_node_slot_stats_raw "$1" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function _Process_node_slot_stats_raw() |
|
|
|
# Prints the node stats from `qstat -f' in raw format: |
|
|
|
# Prints the node stats from `qstat -f' in raw format: |
|
|
|
# - not printing disabled nodes |
|
|
|
# - not printing disabled nodes |
|
|
|
# - not showing the computational jobs that are running on these nodes |
|
|
|
# - not showing the computational jobs that are running on these nodes |
|
|
|
{ |
|
|
|
{ |
|
|
|
qstat -f \ |
|
|
|
gawk -v optShowDisabledNodes="$optShowDisabledNodes" \ |
|
|
|
| gawk -v optShowDisabledNodes="$optShowDisabledNodes" \ |
|
|
|
|
|
|
|
' |
|
|
|
' |
|
|
|
BEGIN { |
|
|
|
BEGIN { |
|
|
|
STDERR = "/dev/stderr" |
|
|
|
STDERR = "/dev/stderr" |
|
|
@ -27,7 +37,7 @@ FNR == 1 && $1 == "queuename" { print; next; } |
|
|
|
($0 ~ /^[A-Za-z]/) && (NF == 5 || NF == 6) && (optShowDisabledNodes!=0 || ($6 !~ /d/)) { |
|
|
|
($0 ~ /^[A-Za-z]/) && (NF == 5 || NF == 6) && (optShowDisabledNodes!=0 || ($6 !~ /d/)) { |
|
|
|
print |
|
|
|
print |
|
|
|
} |
|
|
|
} |
|
|
|
' |
|
|
|
' "$@" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -148,7 +158,11 @@ function node_slot_stats_per_machine_type_f() |
|
|
|
|
|
|
|
|
|
|
|
case "$1" in |
|
|
|
case "$1" in |
|
|
|
(--raw|raw) |
|
|
|
(--raw|raw) |
|
|
|
node_slot_stats_raw |
|
|
|
if [ "$2" ]; then |
|
|
|
|
|
|
|
node_slot_stats_raw_f "$2" |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
node_slot_stats_raw |
|
|
|
|
|
|
|
fi |
|
|
|
;; |
|
|
|
;; |
|
|
|
(--stats|stats|"") |
|
|
|
(--stats|stats|"") |
|
|
|
if [ "$2" ]; then |
|
|
|
if [ "$2" ]; then |
|
|
|