LSF Version 7.3 - Using Platform LSF HPC
foundPamPid="N"
for apid in $PIDS
do
if [ "$apid" = "$LSB_PAM_PID" ]; then
# pam is running
foundPamPid="Y"
break
fi
done
if [ "$foundPamPid" == "N" ]; then
break # pam has exited
fi
sleep 2
done
fi
# User other terminate signals if SIGTERM is
# caught and ignored by your application.
kill -TERM -$LSB_JOBRES_PID >>$JOB_CONTROL_LOG 2>&1
exit 0
Create a job control script named job_terminate_control.sh.
Make the script executable:
chmod +x job_terminate_control.sh
Edit the hpc_linux queue in lsb.queues to configure your
job_terminate_control.sh script as the TERMINATE action in the
JOB_CONTROLS parameter. For example:
Begin Queue
QUEUE_NAME = hpc_linux_tv
PRIORITY = 30
NICE = 20
# ...
JOB_CONTROLS = TERMINATE[kill -CONT -$LSB_JOBRES_PID; kill
-TERM -$LSB_JOBRES_PID]
JOB_CONTROLS = TERMINATE [/
path
/job_terminate_control.sh]
TERMINATE_WHEN = LOAD PREEMPT WINDOW
RERUNNABLE = NO
INTERACTIVE = NO
DESCRIPTION = Platform LSF TotalView Debug queue.
End Queue
Reconfigure your cluster to make the change take effect:
# badmin mbdrestart