LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-11-2010, 12:50 PM   #1
Squall90
Member
 
Registered: Oct 2009
Distribution: Currently several distros :S
Posts: 148

Rep: Reputation: 29
Not able to kill java process with average 90% cpu usage


Hi,

I have a java process running in background. I have no java dependent program opened and even if I had, this program should be killed if I kill the Java process.

“top” shows that Java causes almost 90% cpu usage.
Code:
christian@tux:~$ ps x|grep java
 3409 pts/0    S+     0:00 grep java
10184 tty1     Sl   1123:29 /usr/lib/java/jre/bin/java -D__jvm_launched=32562616674 -Xbootclasspath/a:/usr/lib/java/jre/lib/deploy.jar:/usr/lib/java/jre/lib/javaws.jar:/usr/lib/java/jre/lib/plugin.jar -Djava.class.path=/usr/lib/java/jre/classes sun.plugin2.main.client.PluginMain write_pipe_name=/tmp/.com.sun.deploy.net.socket.7907.3155126540883352253.AF_UNIX
I already tried to kill it by $ kill 10184 but I didn't work. Same with killall java, as user and as root.

The only way I can imagine is to restart, but this might happen again. Any clues to solve this?

Thanks
 
Old 05-11-2010, 12:53 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
kill -9 10184

man kill
 
1 members found this post helpful.
Old 05-11-2010, 02:48 PM   #3
Squall90
Member
 
Registered: Oct 2009
Distribution: Currently several distros :S
Posts: 148

Original Poster
Rep: Reputation: 29
Wow, very powerful!^^ Thank you.

But the “-9” parameter is not mentioned in my local man pages.
 
Old 05-11-2010, 03:14 PM   #4
kingbeowulf
Senior Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware
Posts: 1,266
Blog Entries: 11

Rep: Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744
The parameter is "-n" where "n" is any numerical digit larger than "1"
 
Old 05-11-2010, 03:23 PM   #5
kingbeowulf
Senior Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware
Posts: 1,266
Blog Entries: 11

Rep: Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744
Oops, hit post too soon. The "-n" parameter is the numerical signal identifier, see "man 7 signal" and for a short list enter "kill -l"
 
Old 05-11-2010, 04:03 PM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
the signal explanation is in my "man kill" :
Code:
SYNOPSIS
       kill [ -signal | -s signal ] pid ...
       kill [ -L | -V, --version ]
       kill -l  [ signal ]

DESCRIPTION
       The default signal for kill is TERM. Use -l or -L to list available signals.  Particularly
       useful signals include HUP, INT, KILL, STOP, CONT, and 0.  Alternate signals may be speci‐
       fied  in  three  ways: -9 -SIGKILL -KILL.  Negative PID values may be used to choose whole
       process groups; see the PGID column in ps command output. A PID of -1 is special; it indi‐
       cates all processes except the kill process itself and init.

SIGNALS
       The signals listed below may be available for use with kill.  When known constant, numbers
       and default behavior are shown.

       Name     Num   Action    Description
       0          0   n/a       exit code indicates if a signal may be sent
       ALRM      14   exit
       HUP        1   exit
       INT        2   exit
       KILL       9   exit      cannot be blocked
 
Old 05-11-2010, 04:22 PM   #7
Squall90
Member
 
Registered: Oct 2009
Distribution: Currently several distros :S
Posts: 148

Original Poster
Rep: Reputation: 29
Ah, I see. Thank you.
 
Old 05-11-2010, 04:29 PM   #8
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Well although I already knew of the kill -9 call I just checked my man page and found this :
Code:
KILL(1)                                                                          Linux Programmer's Manual                                                                         KILL(1)

NAME
       kill - terminate a process

SYNOPSIS
       kill [ -s signal | -p ] [ -a ] [ -- ] pid ...
       kill -l [ signal ]
- which is different to the one posted by AlucardZero. Note it doesn't mention "kill -signal" but has "kill -s signal".
 
Old 05-11-2010, 04:37 PM   #9
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
-9 can be used instead of -s 9
 
Old 05-11-2010, 04:52 PM   #10
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
-9 can be used instead of -s 9
Yes - I know this but my point is the OP was right - the man page doesn't mention this. Although the post from AlucardZero's man page does. Maybe as AlucardZero used another distro.
 
Old 05-11-2010, 05:05 PM   #11
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by Squall90 View Post
Hi,

I have a java process running in background. I have no java dependent program opened and even if I had, this program should be killed if I kill the Java process.

“top” shows that Java causes almost 90% cpu usage.
Code:
christian@tux:~$ ps x|grep java
 3409 pts/0    S+     0:00 grep java
10184 tty1     Sl   1123:29 /usr/lib/java/jre/bin/java -D__jvm_launched=32562616674 -Xbootclasspath/a:/usr/lib/java/jre/lib/deploy.jar:/usr/lib/java/jre/lib/javaws.jar:/usr/lib/java/jre/lib/plugin.jar -Djava.class.path=/usr/lib/java/jre/classes sun.plugin2.main.client.PluginMain write_pipe_name=/tmp/.com.sun.deploy.net.socket.7907.3155126540883352253.AF_UNIX
I already tried to kill it by $ kill 10184 but I didn't work. Same with killall java, as user and as root.

The only way I can imagine is to restart, but this might happen again. Any clues to solve this?

Thanks
The "javaws" bit indicates that you opened a web site that wanted you to download and execute some java executable.
 
Old 05-11-2010, 05:29 PM   #12
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Yeah, mine was Debian. I come here from the Zero Reply Thread page and don't always know what subforum I'm in
 
Old 05-12-2010, 04:30 AM   #13
Squall90
Member
 
Registered: Oct 2009
Distribution: Currently several distros :S
Posts: 148

Original Poster
Rep: Reputation: 29
Quote:
Originally Posted by Richard Cranium View Post
The "javaws" bit indicates that you opened a web site that wanted you to download and execute some java executable.
Yes, a Java (FX) applet that I wrote and tested. ^^
 
Old 05-12-2010, 03:02 PM   #14
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by Squall90 View Post
Yes, a Java (FX) applet that I wrote and tested. ^^
Ah. One would have thought that you didn't know what launched the program from your original post...
Quote:
I have no java dependent program opened
...so never mind.
 
  


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
kill process upon reaching 85% cpu usage samanp Linux - Server 1 03-13-2010 02:36 PM
Kill process with high CPU usage after X time? touser Linux - Newbie 4 12-27-2009 09:52 PM
load average and cpu usage too high, why could i do? v_fone Linux - Newbie 5 07-02-2009 03:17 AM
high load average, low cpu usage ! jimmyjiang Red Hat 8 02-08-2008 12:28 AM
Load average stuck at 7.00, CPU usage ~ 0.1%, what gives? BrianK Linux - General 4 02-16-2004 08:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:59 PM.

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