LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to stop runaway programs? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-stop-runaway-programs-134069/)

Delmarc 01-12-2004 02:26 PM

How to stop runaway programs?
 
Does anyone know how I would stop a runaway program, much like you would do alt+ctrl+del or alt+f4 in windows? I'm using Mandrake 9.2 if that helps.

gurdib 01-12-2004 02:29 PM

'ps auwx' to find your program (you need the PID). then: 'kill -9 <PID>'. This usually does the trick. What program is 'running away' on you, something you wrote or...?

G.

MartinN 01-12-2004 02:31 PM

Hi!

Type 'top' in a terminal window. Look at the 'PID' for the process you want to kill. Press the 'k' key and enter the PID. Just press enter when it asks what signal to kill it with.

If that doesn't work, then the process is completely wild. Repeat the above, but when it asks for a signal enter '9'. This should definitely pull the plug for the process.

Edit: Oh, and exit from top with 'q'. :rolleyes:

Regards
Martin

willand 01-12-2004 02:37 PM

if you are under X, you can use :
xkill.. and click on the window that you want to kill

you can so use in console mode :
killall
example :
killall kde
this command will close all processus that kde uses

Delmarc 01-12-2004 02:37 PM

Sorry, I was rather vague in my original post :p to be more specific, how do I stop something like Konqueror in KDE when it "hangs" and will not respond? Thanks

RolledOat 01-12-2004 02:41 PM

If there is a GUI that appears frozen, then 'start-->run command' and enter
xkill

The click the mouse, after placing the little bullseye on the window. Right click to cancel xkill.

R.O.

willand 01-12-2004 02:42 PM

example :
ps -le | grep konqueror
the system returns informations about the processus **** (**** is a number, PID, which is representing Konqueror)

so you can type :
kill -9 *****

RolledOat 01-12-2004 02:46 PM

Or, if it is mozilla, or konqueror, or whatever, you can attempt a plain language kill with
pkill mozilla
pkill konqueror

Just make sure that you use the full name.
pkill c
will kill all processes that have a 'c' in the name.

Usually, I try, in ascending order
pkill processname
xkill
kill -9 PID

R.O.

willand 01-12-2004 02:48 PM

pkill is an equivalent to killall ?

RolledOat 01-12-2004 02:55 PM

Quote:

Originally posted by willand
pkill is an equivalent to killall ?
certainly seems similar, although they have different flags for the same options based on the man pages. Hmmm, that is kill, xkill, pkill, killall. How many more ways to skin this cat. :)

R.O.

willand 01-12-2004 02:58 PM

thank you for your reply

chrisk5527 01-12-2004 04:56 PM

If process Terminal is running, you could also say:

# skill -9 terminal

(Just make sure you are root, unless its your process your killing)


All times are GMT -5. The time now is 11:05 AM.