Clan x86

Technical (Development, Security, etc.) => Unix / Linux Discussion => Topic started by: rabbit on December 11, 2005, 11:54:40 PM

Title: tasklist? taskkill?
Post by: rabbit on December 11, 2005, 11:54:40 PM
Linux equivs?
Title: Re: tasklist? taskkill?
Post by: Sidoh on December 11, 2005, 11:57:44 PM
Quote from: rabbit on December 11, 2005, 11:54:40 PM
Linux equivs?

If you want a full list of processes running:

$ ps -A


If you want to search for a specific process running:

$ ps -aux | grep <proccess_name>


And if you want to kill a process the "unclean" way:

$ killall -9 <process_name>


That's how I know to do it, anyway.  Some of the more linux-literate people may know better ways. :)
Title: Re: tasklist? taskkill?
Post by: Ergot on December 12, 2005, 12:02:27 AM
ps - Lists processes
ps -aux - Lists all processes
kill - Kills process, you need to get the PID from ps.
kill - 9 - If kill fails, this is the "unclean" way like Sidoh said.
top - Lists processes and CPU/Mem usages in realtime

Front-ends(?)
Ksysguard - For KDE
System Monitor - For Gnome
Title: Re: tasklist? taskkill?
Post by: Sidoh on December 12, 2005, 12:09:06 AM
$ ps -aux lists all processes with a bunch of fancy information! :P

$ ps -A is a plain list of processes, but I guess that's not very useful. :)
Title: Re: tasklist? taskkill?
Post by: iago on December 12, 2005, 12:06:11 PM
Quote from: Ergot on December 12, 2005, 12:02:27 AM
ps - Lists processes
ps -aux - Lists all processes
kill - Kills process, you need to get the PID from ps.
kill - 9 - If kill fails, this is the "unclean" way like Sidoh said.
top - Lists processes and CPU/Mem usages in realtime

Front-ends(?)
Ksysguard - For KDE
System Monitor - For Gnome


Beautiful, you stole my answer! :P
Title: Re: tasklist? taskkill?
Post by: rabbit on December 12, 2005, 07:02:50 PM
Well I don't use Gnome so I don't care :P
Title: Re: tasklist? taskkill?
Post by: iago on December 12, 2005, 07:46:02 PM
"top" is probably what you're looking for
Title: Re: tasklist? taskkill?
Post by: Krazed on December 12, 2005, 07:48:50 PM
tasklist = top, or ps -aux (That's what I always did.)

kill PID (Process ID) would end a program while following the program's closing procedure, sends the "SIGTERM" signal.

kill -9 PID would end a program with the "SIGKILL" signal, which instantly kills it, without caring what the program has to say about it or wants to do before closing.
Title: Re: tasklist? taskkill?
Post by: iago on December 12, 2005, 07:54:48 PM
"top" can do all of those, and more.  And is easier to use.  But yes, those are also useful programs :P
Title: Re: tasklist? taskkill?
Post by: Ergot on December 12, 2005, 07:56:16 PM
Wow I never knew top could kill...
Title: Re: tasklist? taskkill?
Post by: Krazed on December 12, 2005, 09:10:02 PM
I've never used top, so eh.
Title: Re: tasklist? taskkill?
Post by: rabbit on December 12, 2005, 09:19:53 PM
Quote from: Krazed on December 12, 2005, 07:48:50 PM
tasklist = top, or ps -aux (That's what I always did.)

kill PID (Process ID) would end a program while following the program's closing procedure, sends the "SIGTERM" signal.

kill -9 PID would end a program with the "SIGKILL" signal, which instantly kills it, without caring what the program has to say about it or wants to do before closing.
Ah...I remember, I think it was Newby, who said "Windows is like 'please stop running now' but Linux is like 'DIE BITCH!'".  :P
Title: Re: tasklist? taskkill?
Post by: Sidoh on December 12, 2005, 09:24:01 PM
Quote from: rabbit on December 12, 2005, 09:19:53 PM
Ah...I remember, I think it was Newby, who said "Windows is like 'please stop running now' but Linux is like 'DIE BITCH!'".  :P

LMFAO
Title: Re: tasklist? taskkill?
Post by: iago on December 12, 2005, 09:56:36 PM
Quote from: rabbit on December 12, 2005, 09:19:53 PM
Quote from: Krazed on December 12, 2005, 07:48:50 PM
tasklist = top, or ps -aux (That's what I always did.)

kill PID (Process ID) would end a program while following the program's closing procedure, sends the "SIGTERM" signal.

kill -9 PID would end a program with the "SIGKILL" signal, which instantly kills it, without caring what the program has to say about it or wants to do before closing.
Ah...I remember, I think it was Newby, who said "Windows is like 'please stop running now' but Linux is like 'DIE BITCH!'".  :P

Haha, yeah, a non-root process can't catch/discard SIGKILL.  However, a process running as root can, and a process in kernel mode ignores it. 

If you're reading from a harddrive that crashes, so that it gets stuck in an infinite loop in kernel mode, you can't kill it either.