From cbbb8e5cd54ef8b8dd3c269daba01f9ea49926ea Mon Sep 17 00:00:00 2001 From: Moritz Kowalski Date: Thu, 30 May 2024 16:58:37 +0200 Subject: [PATCH] Update scheduler pbs-generic Update pbs-generic so uginfo only displays jobs scheduled with ugsubmit and changes state from 'R to 'RUNNING' and 'Q' to 'PENDING' (necessary for ParameterEstimator) --- scripts/shell/schedulers/pbs-generic | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/scripts/shell/schedulers/pbs-generic b/scripts/shell/schedulers/pbs-generic index b8ec2d0e8..be01a5d86 100755 --- a/scripts/shell/schedulers/pbs-generic +++ b/scripts/shell/schedulers/pbs-generic @@ -98,8 +98,23 @@ function UJS_GetOptions function UJS_Info { echo "Using $UGSUBMIT_TYPE" - echo "qstat -u $USER -r" - qstat -u $USER + echo "qstat -u $USER" + + ( + echo "JOBID Username Queue Jobname SessID Elap-NDS TSK Memory Time Status Time" + # grep: get only jobs scheduled with ugsubmit + qstat -u $USER | grep -E "job\.[0-9]+\.[0-9]+ *" | awk ' + BEGIN { OFS = "\t" } + { + status = $10 + if (status == "R") { + status = "RUNNING" + } else if (status == "Q") { + status = "PENDING" + } + print $1, $2, $3, $4, $5, $6, $7, $8, $9, status, $11 + }' # change status to RUNNING or PENDING + ) | column -t # format output as table }