Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ General Discussion _ Killing

Posted by: edge_lv Nov 20 2005, 12:01 PM

help me please to kill some hanged up processes! it`s MPlayer, which I launched several times and I can not exit it any more. right now they are 6 down there...

i know there`s a comand that has to be written in Console, that kills the process. killall, i guess... but there must be some parameters, which i cann`t figure out. job ID for example. how can I figure it out?

Posted by: DS2K3 Nov 20 2005, 02:15 PM

killall mplayer

or, use ps -Al to find the processes and their IDs,

then kill ID


Posted by: edge_lv Nov 21 2005, 03:24 AM

TNX! i made it. finally I wrote "kill" and process ID, and it worked.

Posted by: Jim Nov 21 2005, 01:39 PM

Here is a useful little trick....

ps aux | grep keyword | grep -v grep | awk {'print $2'} | xargs kill

That will list out all the running processes, show only those with that specific keyword in it, remove the "grep keyword" line, make a list of all there IDs (make sure your formating is right, most machines will put the PID in the second column, if its not, then change the $#), then pass that to kill. Its handy when killall isn't finding the right processes.

Here is another tip. Now, you HAVE to be careful with this because you can screw up your system. If anything goes wrong its usually re-boot fixable, but not always, so make sure you are aware of the risk. If you have a processes that is really stuck, one where just kill wont fix it you can run kill -9 ######

The dash nine (affectionately know as the shotgun) will just kill the processes regardless of what it is waiting on. Usually when a process is hanging its because its waiting on some piece of memory, or of your system. If you shotgun a program, it may very well leave parts of itself in your memory, which wont free until reboot. Or, if that processes has crabbed onto something like sound, it may not release it correctly. So, use it sparingly.

Powered by Invision Power Board (
© Invision Power Services (