LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-13-2005, 11:18 AM   #1
bratch
Member
 
Registered: Nov 2004
Location: Jersey, British Isles
Distribution: Gentoo
Posts: 44

Rep: Reputation: 15
kill a process


I'm trying to kill the process called java, as shown here in gnome-system-monitor:

http://www.bratch.co.uk/coven/process.png

I've tried ending it with gnome-system-monitor, I'll tried doing "killall java", I've tried "pkill -kill java", I've tried "pkill java", and I've tried "kill <pid>".

Nothing will kill it, it just sits there using 49% of 1 CPU (the CPU has hyper-threading).

How can I kill it without rebooting?

(It was the java process that Azureus was using, and was left there for some reason when Azureus closed.)
 
Old 04-13-2005, 11:20 AM   #2
Thoreau
Senior Member
 
Registered: May 2003
Location: /var/log/cabin
Distribution: All
Posts: 1,167

Rep: Reputation: 45
killall -9 java
 
Old 04-13-2005, 11:21 AM   #3
bratch
Member
 
Registered: Nov 2004
Location: Jersey, British Isles
Distribution: Gentoo
Posts: 44

Original Poster
Rep: Reputation: 15
Nope, still there.
 
Old 04-13-2005, 11:22 AM   #4
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
On a command line as root:

kill -9 `ps auxw | grep -i java | awk '{print $2}'`

If that doesn't kill everything java related then you'll need to reboot.

B/c I'm not totally familiar with gentoo, if your ps doesn't support auxw as an option, then:

kill -9 `ps -elf | grep -i java | awk '{print $4}'`

Also, before you reboot, post the results from this:

ps auxw | grep -i java ( or the ps -elf )

Last edited by Technoslave; 04-13-2005 at 11:23 AM.
 
Old 04-13-2005, 11:28 AM   #5
bratch
Member
 
Registered: Nov 2004
Location: Jersey, British Isles
Distribution: Gentoo
Posts: 44

Original Poster
Rep: Reputation: 15
Code:
bash-2.05b$ su
Password: 
bash-2.05b# kill -9 `ps auxw | grep -i java | awk '{print $2}'`
bash: kill: (16859) - No such process
bash-2.05b# kill -9 `ps -elf | grep -i java | awk '{print $4}'`
bash: kill: (16870) - No such process
bash-2.05b# ps auxw | grep -i java
bratch   12153 98.2  0.0      0     0 ?        Zl   06:57 619:49 [java] <defunct>
root     16887  0.0  0.0   2616   716 pts/0    S+   17:28   0:00 grep -i java
bash-2.05b#
Wasn't a sucess, and that's what happened.
 
Old 04-13-2005, 12:04 PM   #6
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
Ah, defunct.

You can try this:

pstree 12153 to find the parent of the java and kill the parent, that may or may not work. If it doesn't work then you'll have to reboot.

If there's no parent or child left of the process then you're SOL and rebooting is the only way to fix it.
 
Old 04-13-2005, 12:10 PM   #7
bratch
Member
 
Registered: Nov 2004
Location: Jersey, British Isles
Distribution: Gentoo
Posts: 44

Original Poster
Rep: Reputation: 15
Code:
bash-2.05b$ pstree 12153
java
I assume there is no parent left over then.

It's disappointing when Linux does things like this that I have to reboot for
 
Old 04-13-2005, 02:05 PM   #8
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
Yeah, looks like it's hosed.

I know what you mean about zombie processes, you could do some lookups and the like on either defunct or zombie processes to find out why they happen, etc.

Other than that, reboot to get rid of it - sorry.
 
Old 04-13-2005, 05:29 PM   #9
twsnnva
Member
 
Registered: Oct 2003
Location: Newport News, Va
Distribution: Debian
Posts: 246

Rep: Reputation: 30
Perhaps "killall java -SIGKILL" will kill it?
 
Old 04-13-2005, 06:00 PM   #10
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Which version of java is it. Some releases have issues working on smp setups. There are a few patches and ideas floating around the net. I do not remember what it requires though. Look through google for smp and java.

One item I saw was add ' noexec=off to your grub.conf file for booting kernel.
Run a non smp kernel.
Looks like IBM java is working with redhat to fix the issue. Both IBM and Sun Java have the same issue.

I have a Quad Zeon system that once in while did the same. Have upgraded to the latest Java with SDK and haven't noticed it yet. But seldom mess with or visit java sites.

Brian1
" Google the Linux way @ http://www.google.com/linux "
 
  


Reply



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
Process won't kill mrsolo Linux - Software 5 08-03-2007 12:45 PM
cannot kill process (kill -9 does not work) mazer13a Linux - General 1 05-27-2005 02:32 PM
Cannot kill process Zeno McDohl Linux - General 13 04-14-2005 02:31 PM
kill a process for sure spuzzzzzzz Linux - General 1 06-05-2004 04:59 PM
Why can't I kill this process? solking Linux - General 5 10-29-2003 11:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:30 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
Open Source Consulting | Domain Registration