initial import of currently used scripts
This commit is contained in:
parent
b2e20f7387
commit
28da7979a1
5
bin/qlogin_wrapper
Executable file
5
bin/qlogin_wrapper
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# $Id: qlogin_wrapper 175 2010-09-15 15:34:28Z kasper $
|
||||||
|
HOST=$1
|
||||||
|
PORT=$2
|
||||||
|
/usr/bin/ssh -XAq -p $PORT $USER@$HOST
|
25
bin/suspend.sh
Executable file
25
bin/suspend.sh
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/ksh
|
||||||
|
# $Id: suspend.sh 365 2013-11-18 09:58:17Z kasper $
|
||||||
|
# This script should be added as the SUSPEND_METHOD in the
|
||||||
|
# queue definition with a $job_pid, $job_id, and $job_owner arguments.
|
||||||
|
# e.g. script.sh $job_pid $job_id $job_owner
|
||||||
|
|
||||||
|
if [ -z "$3" ]
|
||||||
|
then
|
||||||
|
echo "Usage: $0 \$job_pid \$job_id \$job_owner"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
stat=`pgrep -g $1`
|
||||||
|
if [ ! -z "$stat" ]
|
||||||
|
then
|
||||||
|
#echo "Sending $sig to $1" >> ~$3/qdel_log.log
|
||||||
|
/usr/bin/pkill --signal SIGTSTP -g $1
|
||||||
|
else
|
||||||
|
echo "Process $1 not found for job $2" >> ~$3/qdel_log.log
|
||||||
|
echo "Unable to suspend." >> ~$3/qdel_log.log
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#uncomment the following for debugging
|
||||||
|
#echo "Suspending Job $2 " >> ~$3/qdel_log.log
|
30
bin/term.sh
Executable file
30
bin/term.sh
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
#!/usr/bin/ksh
|
||||||
|
# $Id: term.sh 364 2013-11-18 09:55:05Z kasper $
|
||||||
|
# This script should be added as the TERMINATE_METHOD in the
|
||||||
|
# queue definition with $job_pid, $job_id, $job_owner, and interval arguments.
|
||||||
|
# e.g. script.sh $job_pid $job_id $job_owner 90
|
||||||
|
|
||||||
|
if [ -z "$4" ]
|
||||||
|
then
|
||||||
|
echo "Usage: $0 \$job_pid \$job_id \$job_owner interval"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#echo "Term script Running on: $USER $1 $2 $3 $4" >> ~$3/qdel_log.log
|
||||||
|
#echo `pgrep -g $1` >> ~$3/qdel_log.log
|
||||||
|
|
||||||
|
for sig in 2 15 9
|
||||||
|
do
|
||||||
|
stat=`pgrep -g $1 -u $3`
|
||||||
|
if [ ! -z "$stat" ]
|
||||||
|
then
|
||||||
|
#echo "Sending $sig to $1" >> ~$3/qdel_log.log
|
||||||
|
/usr/bin/pkill --signal $sig -g $1
|
||||||
|
sleep $4
|
||||||
|
else
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
#uncomment the following for debugging
|
||||||
|
#echo "Job $2 killed." >> ~$3/qdel_log.log
|
11
epilog.d/99-rm_empty_logs.sh
Executable file
11
epilog.d/99-rm_empty_logs.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
# $Id: epilog 181 2010-09-17 15:55:28Z kasper $
|
||||||
|
|
||||||
|
## Delete the STDOUT and STDERR files (.o and .e) if they are empty
|
||||||
|
## ( we do not want to delete non-empty files, they may contain useful
|
||||||
|
## troubleshooting or debug information ... )
|
||||||
|
##
|
||||||
|
[ -r $SGE_STDOUT_PATH -a -f $SGE_STDOUT_PATH ] && [ ! -s $SGE_STDOUT_PATH ] && rm -f $SGE_STDOUT_PATH
|
||||||
|
[ -r $SGE_STDERR_PATH -a -f $SGE_STDERR_PATH ] && [ ! -s $SGE_STDERR_PATH ] && rm -f $SGE_STDERR_PATH
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue
Block a user