Newsgroups: comp.parallel.pvm
From: Stefan Hinker <hinker@informatik.uni-wuerzburg.de>
Subject: Re: How do you kill all those processes?
Organization: University of Wuerzburg, Germany
Date: 23 Nov 1995 10:11:02 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <491hbn$nu5@winx03.informatik.uni-wuerzburg.de>

Hi!

I am using just such a script, or rather two of them, which I "inherited" from
other people here.  They are called "killdaemons" and "killpvmd".  killdaemons
calls killpvmd on every machine it is told, and kills the daemons and removes
the pvm[dl]-files.  You can use a similar script to kill any unwanted
processes, too.

here comes:

killdaemons:
---------begin--------
#!/bin/csh

foreach alpha (derry cork galway mayo carlow)
        echo removing pvmd on $alpha
        rsh $alpha killpvmd
end
---------end----------

killpvmd:
--------begin---------
me=`whoami`
killnr=`ps -ef | grep pvm | grep $me | awk '{print $2}' | tr '\012' ' '`
echo killing $killnr
kill -9 $killnr
rmname=`ls -l /tmp | grep pvm | grep $me | awk '{print $9}' | tr '\012' ' '`
cd /tmp
echo deleting $rmname
/bin/rm $rmname
--------end--------

Hope this helps!

Greetings,
Stefan
-- 
===============================================================================
Stefan Hinker                         email: hinker@informatik.uni-wuerzburg.de
                Unix? Still working on it  :-))
===============================================================================


