[torqueusers] Prologue/Epilogue script
Adam Emerich
aemerich at us.ibm.com
Mon Apr 23 09:05:16 MDT 2007
Jeff,
Here is what we use:
#!/bin/ksh
if [ "$1" = "root" ]
then
echo "$0: cannot kill root!"
exit 1
fi
if [ -z "$1" ]
then
echo "$0: kill who?"
exit 1
fi
HN=$(hostname)
for i in $(ps aux | grep "^$1 " | grep -v grep | awk '{print $2}')
do
if ps -p $i >/dev/null 2>&1
then
echo "killing $HN $i"
kill $i 2>&1
fi
if ps -p $i >/dev/null 2>&1
then
echo "KILLING $HN $i"
kill -9 $i 2>&1
fi
done
Hope that helps.
Adam Emerich
"Insanity: doing the same thing over and over again and expecting different
results." -Albert Einstein
"Jeffrey B.
Layton"
<laytonjb at charter To
.net> Adam Emerich/Rochester/IBM at IBMUS
cc
04/23/2007 08:36 torqueusers-bounces at supercluster.or
AM g, torqueusers at supercluster.org
Subject
Re: [torqueusers] Prologue/Epilogue
Please respond to script
laytonjb at charter.
net
Adam Emerich wrote:
> Jeff,
>
> We have scripts that kill all the user's processes as the job exits.
This
> is how we ensure that only the user who currently has the node scheduled
to
> him is running on the node. As for killing jobs in the prologue, unless
> you do not have the ability to have multiple users on a node, this would
> seem like it could cause problems.
>
I'm assuming that even if you get only 1 core on the node, you "own" the
node
(you may need the memory per core for a code).
> Let me know if you are interested in the 'killuser' script.
>
You bet!
Thanks!
Jeff
More information about the torqueusers
mailing list