LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-18-2003, 12:38 AM   #1
james_cwy
Member
 
Registered: Nov 2003
Posts: 52

Rep: Reputation: 15
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
 
Old 11-18-2003, 01:13 AM   #2
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Rep: Reputation: 30
# kill PID
where PID is the process ID# which can be found by typing: ps ax
 
Old 11-18-2003, 01:31 AM   #3
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 83
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.
 
Old 11-18-2003, 02:53 AM   #4
dex7er
LQ Newbie
 
Registered: Aug 2003
Location: California
Distribution: Slackware
Posts: 2

Rep: Reputation: 0
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.
 
Old 12-16-2003, 10:23 PM   #5
james_cwy
Member
 
Registered: Nov 2003
Posts: 52

Original Poster
Rep: Reputation: 15
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
 
Old 12-16-2003, 10:40 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
skill -9 name


Cheers,
Tink
 
Old 12-16-2003, 10:45 PM   #7
james_cwy
Member
 
Registered: Nov 2003
Posts: 52

Original Poster
Rep: Reputation: 15
It works

THanks it works
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Killing a process fails. Have tried all I know. Racy Linux - Software 6 09-18-2005 01:57 PM
Killing a process by its name rabeea Linux - Networking 3 03-17-2005 06:30 AM
Never ending process in Fedora 3 gharvey Fedora 6 12-21-2004 06:40 PM
Killing child process coolfrog Programming 3 09-28-2004 03:58 PM
Really Killing a Process! lazlow69 Linux - Newbie 14 05-10-2003 11:31 PM


All times are GMT -5. The time now is 08:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration