* Allow external qstat-f file for raw node status dump.
This commit is contained in:
@@ -11,12 +11,22 @@
|
||||
|
||||
|
||||
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:
|
||||
# - not printing disabled nodes
|
||||
# - not showing the computational jobs that are running on these nodes
|
||||
{
|
||||
qstat -f \
|
||||
| gawk -v optShowDisabledNodes="$optShowDisabledNodes" \
|
||||
gawk -v optShowDisabledNodes="$optShowDisabledNodes" \
|
||||
'
|
||||
BEGIN {
|
||||
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/)) {
|
||||
print
|
||||
}
|
||||
'
|
||||
' "$@"
|
||||
}
|
||||
|
||||
|
||||
@@ -148,7 +158,11 @@ function node_slot_stats_per_machine_type_f()
|
||||
|
||||
case "$1" in
|
||||
(--raw|raw)
|
||||
node_slot_stats_raw
|
||||
if [ "$2" ]; then
|
||||
node_slot_stats_raw_f "$2"
|
||||
else
|
||||
node_slot_stats_raw
|
||||
fi
|
||||
;;
|
||||
(--stats|stats|"")
|
||||
if [ "$2" ]; then
|
||||
|
||||
Reference in New Issue
Block a user