PDA

View Full Version : Closing all apps.



Benox
04-21-2004, 12:04 PM
I have a question...

If I try to work to fast on Knoppix sometimes an application will freeze up. Then I have to restart my computer and start knoppix again to get rid of it. Is there an easier way to just like completely clear all applications running?

Markus
04-21-2004, 05:00 PM
You can use xkill to kill an application, or type in a konsole "ps fax" without the quotes to get the PID for the stopped app and do "kill pidnumber" or "killall application-name". If kill doesn't work try "kill -HUP pidnumber".

OErjan
04-21-2004, 06:40 PM
why kill them all?
Go to a vt (lets say: ttyS2, to do that, hitt ctrl+alt+F2, to get back to KDE and X hit, ctrl+alt+f5, could be F1, F3, F4... be patient it might take a few seconds for the screen to wake) and type ps -A look for the name of what is bothering you.

if i had a frozen centericq i would do

ps -A
output would be a looooong list (i have some 6 xterms), here is a part of that output.


652 ? 00:00:00 fvwm95
686 ? 00:00:40 gkrellm
687 ? 00:00:00 FvwmTaskBar
688 ? 00:00:00 FvwmButtons
692 ? 00:00:00 xterm
702 pts/0 00:00:01 centericq


then a
kill 702 would do just that, kill the process with number 702. it might be that it won't die, hmmm, ok.

kill -9 702
that would work. if not, hmmm. ok lets pretend it did not work, check if something keeps it alive (is above it in the ps tree)
ps -aux then kill anythng assosiated with centericq, and ofcource centericq).
in this case Xterm.

oe 652 0.0 0.6 2808 1532 ? S 16:23 0:00 fvwm95
oe 686 0.3 2.5 10276 6112 ? S 16:23 0:41 gkrellm
oe 687 0.0 0.5 2532 1216 ? S 16:23 0:00 /usr/X11R6/lib/X1
oe 688 0.0 0.5 2520 1216 ? S 16:23 0:00 /usr/X11R6/lib/X1
oe 692 0.0 1.0 5036 2620 ? S 16:23 0:00 xterm -T centeric
oe 694 0.0 0.4 2092 1024 ? S 16:23 0:00 /bin/sh /usr/lib/
oe 702 0.0 1.8 7648 4380 pts/0 S 16:23 0:01 centericq

now do
kill -9 692 702

if it survives this it is a Zombie process (yes it is the actuall name) and canot be killed short of reboot.