Useful scripts for listing and killing kde4 binaries
David Faure
faure at kde.org
Wed Jul 5 13:39:52 BST 2006
For linux developers not using a separate user to run kde4 programs:
Assuming that your kde4 prefix(es) have "kde4" in the name, you can use the scripts below
to list and to kill kde4 binaries.
cat list-kde4-binaries
#!/bin/sh
ls /proc/*/exe 2>/dev/null | while read f; do
link=`readlink $f`
if echo "$link" | grep -q kde4; then
pid=`echo $f | sed -e 's/[^0-9]//g'`
echo "$link, pid $pid"
fi
if echo "$link" | grep -q valgrind; then
echo "$link - WARNING, valgrind running"
fi
done
cat kill-kde4-binaries
#!/bin/sh
ls /proc/*/exe 2>/dev/null | while read f; do
link=`readlink $f`
if echo "$link" | grep -q kde4; then
pid=`echo $f | sed -e 's/[^0-9]//g'`
echo "Killing $link, pid $pid"
kill $pid
fi
done
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list