LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   task manager? (https://www.linuxquestions.org/questions/linux-newbie-8/task-manager-326988/)

willtell 05-25-2005 10:31 AM

task manager?
 
I am running suse 9.3 and wonder if there is a way to kill a running program that freezes. Something like windows task manager. I stumbled upon a kill command in the console, but i do not know how to kill a specific program. Thanks for your help.

csfalcon 05-25-2005 10:48 AM

use "ps -e | grep <program name>" get the pid, and "kill -9 <pid>".

the thing that's similar to task manager for listing processes is "top", use 'q' to quit it.

JimBass 05-25-2005 10:52 AM

I would do a few commands to see what is the problem, and then kill it.

Code:

(you@yours)$top
That will list the processes using the most memory and CPU time.

Code:

(you@yours)$ps -ef|grep (name of program you want to kill)
That will give you the numeric PID for the program in question.

Code:

(you@yours)$kill (PID from the last command)
As an example, if my firefox was hanging, I'd do top and see that firefox was eating resources. Then I'd do ps -ef|grep firefox, and I'd get a list of all the processes that had firefox in their name. Then I'd find the PID, which changes each time you use a program. If the main firefox shows a PID of 2254, then my last command would be kill 2254. If you don't have the permissions to kill the program, you may have to sudo or su to issue the kill command.

the htop program streamlines some of that, it is an enhanced top that allows you to kill process directly within it. You can find it at http://htop.sourceforge.net/
Peace,
JimBass

gerrit_daniels 05-25-2005 11:06 AM

If you are using kde and you prefer a gui app then you can also use ksysguard.

Hope this helps

willtell 05-25-2005 12:10 PM

Thanks for all the info! I appreciate it.

mohit dhawan 05-28-2005 07:09 AM

see
man top

Emerson 05-28-2005 07:14 AM

xkill is what you were looking for.

Edit: and this is more convenient than the TM under Windows.

Komakino 05-28-2005 08:15 AM

killall programname

or if that fails:

killall -9 programname


All times are GMT -5. The time now is 10:40 AM.