LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Killing/Ending a process (https://www.linuxquestions.org/questions/linux-newbie-8/killing-ending-a-process-117289/)

james_cwy 11-17-2003 11:38 PM

Killing/Ending a process
 
What is the difference between killing and ending a process?
Which is advised?

Lets say I ran p0f. After say 1 hour, I want it to stop running cos I already have the necessary data that I want. I know that p0f will appear in the system monitro under bash->shell->p0f. By right clicking, I can kill it because I know that it is p0f.
But, how can I kill this process using the shell prompt?
I have read the man but still unsure. I have tried some parameters and all but to no avail.

Thanks
James

Scruff 11-18-2003 12:13 AM

# kill PID
where PID is the process ID# which can be found by typing: ps ax

J.W. 11-18-2003 12:31 AM

Similarly, you can run: top which lists the processes that are consuming the most resources. Either way, the kill command will stop it (you may need to be root to kill it) -- J.W.

dex7er 11-18-2003 01:53 AM

Another option to kill prosseses from the command line is killall. It operates in a simalar way to kill, though it also allows you to use the name of the prosses instead of merely the PID. For example, you want to kill httpd (apache), you would type:
killall httpd
it can also be used to send other signals, such as the HUP (hangup) signal through killall -HUP, that often restarts programs that function as servers, or killall -9, which tells the program to die imedately.

james_cwy 12-16-2003 09:23 PM

Using killall
 
First I ran p0f at prompt, OK.
THen I stopped it, using ctrl-C.

I want to kill this process by its name and not its PID.
Using ps aux I see p0f is still running even though I had stopped it
I tried using killall p0f and killall -15 p0f but still when I run ps aux, it is still there.

How can I solve this?
THanks

Tinkster 12-16-2003 09:40 PM

skill -9 name


Cheers,
Tink

james_cwy 12-16-2003 09:45 PM

It works
 
THanks it works


All times are GMT -5. The time now is 01:07 AM.