#set -x export ECF_PORT=%ECF_PORT% # The server port number export ECF_NODE=%ECF_NODE% # The name of ecf host that issued this task export ECF_NAME=%ECF_NAME% # The name of this current task export ECF_PASS=%ECF_PASS% # A unique password export ECF_TRYNO=%ECF_TRYNO% # Current try number of the task export ECF_RID=$$ ecflow_client --init=$$ echo "RUNNING ON PROD ECFLOW SERVER: %ECF_LOGHOST%" echo echo "JOBS LATE OR STUCK IN SUBMIT" adminlog=/ecf/rundir/adminlog # # Get list of tasks that are flagged late # if [ "$(ecflow_client --group="get ; show state"|grep "flag:.*late")" ] then echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" echo ecflow_client --msg="${ECF_NAME}: LATE OR STUCK IN SUBMIT" echo `date -u` "JOBS ARE LATE in production!!" >> $adminlog for suite in $(ecflow_client --suites|grep -v -E 'dev|test|para') nwps_para do if [ "$(ecflow_client --group="get /${suite}; show state"|grep "flag:.*late")" ] then echo "${suite^^}:" ecflow_client --group="get /$suite; show state"|grep "flag:.*late" | \ while read line do job=$(echo $line|awk '{print $2}') python /ecf/ecfnets/python/node_status.py |grep ${suite}|grep ${job}|awk '{print $1}' done echo fi done #ecflow_client --complete ecflow_client --abort echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" else ecflow_client --msg="${ECF_NAME}: JOBS SUBMITTING AND COMPLETING ON TIME" echo "NO LATE OR LONG SUBMITTING JOBS" >> $adminlog ecflow_client --complete fi %manual ###################################################################### # Purpose: # Capture late tasks. # ###################################################################### ###################################################################### # Job specific troubleshooting instructions: # see generic troubleshoot manual page # ###################################################################### # include manual page below %end