LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 12:18 PM   #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, 12:20 PM   #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, 12:21 PM   #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, 12:22 PM   #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 12:23 PM.
 
Old 04-13-2005, 12:28 PM   #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, 01: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, 01: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, 03: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, 06: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, 07:00 PM   #10
Brian1
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: 61
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


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


All times are GMT -5. The time now is 04:42 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration