[Rock-dev] Tool: "orokill"?
Martin Zenzes
martin.zenzes at dfki.de
Thu Jan 9 13:40:59 CET 2014
Hi,
it happens frequently (at least to me) that some Tasks are not stopped
(killed) correctly on ruby-script-end. This results in running manually
selecting the processes to kill.
There is "orops" which lists all processes in memory (whats the correct
lingo? They are not "started", as this is a state).
Wouldn't it be nice to have a native "orokill" which can stop certain
Tasks? This is what I'm doing with some bash-trickery:
{{{
function orokill {
if [ x"$1" = "x" ]; then
echo "argument to kill!"
return
done
# get rid of the "grep" see http://stackoverflow.com/a/9375940
local procs=`ps -eo pid,args|grep "Leg1"|grep -v grep`
for pr in $procs; do
echo "kill $pr?"
select answer in "Yes" "No"; do
case $answer in
Yes ) kill `echo "$pr" | sed -rn
's/[^[:digit:]]*([[:digit:]]+).+/\1/p'`;break;;
No ) echo "skipping";break;;
esac
done
done
}
}}}
Thoughts?
--
M.Sc. Martin Zenzes
Space Robotics
Hauptgeschäftsstelle Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany
Phone: +49 (0) 421 178 45 - 6658
Fax: +49 (0) 421 178 45 - 4150
E-Mail:martin.zenzes at dfki.de
Weitere Informationen:http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/673/0060/3
-----------------------------------------------------------------------
More information about the Rock-dev
mailing list