Help - Search - Members - Calendar
Full Version: Killing
Linuxhelp > In The Community > General Discussion
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?
killall mplayer

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

then kill ID

TNX! i made it. finally I wrote "kill" and process ID, and it worked.
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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.