Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've encountered that the java-process is

  1. started without any reasing (while no java-application should be run) and
  2. after a while uses 100% of the CPU (AMD Phenom II X4)

I kill it with the gnome system monitor. After some seconds, the process appears again, using again 100% of CPU (status: sleep).

I'm also irritated about the fact, that

$ jobs

does not return anything. I'll tried

sudo jobs

for fun and got the message

sudo: jobs: command not found

but jobs of course is installed.

I have installed OpenJDK Java 6 Runtime via the Software Center.

How can I

  • find out if there is still a programm running which uses java
  • why the process takes that much CPU?
share|improve this question
up vote 2 down vote accepted

jobs only shows the processes owned by the current shell (it's a shell built-in function -- and that's why you can't run it with sudo, that runs only executable programs). It usually does not show anything unless you started it in background. See help jobs.

You can check if there are any other java processes running with:

ps aux | grep java

This searchs for any running process which has the string "java" on its command line execution, including grep. You can eliminate grep using ps aux | grep java | grep -v grep, if you want.

Also, when a process is eating a lot of CPU, you usually can spot it using the program top, pressing P to order by %CPU:

top showing a CPU intensive process

You can also use M to sort by memory usage, and use the keys < and > to change the current field used to sort.

Now, WHY a process is taking much CPU is a really hard question to answer in a generic way. It may be doing useful stuff or it may be just stuck on an infinite loop, usually only by reading the source code you could find out which. If you were to consider the Java JRE that runs the Java plugins in your browser, its CPU load is highly dependant on the nature of the program you are running.

share|improve this answer
Many thanks, somehow I mistaked jobs for top...It was freenet which, I didn't notice, started on systemstartup. I uninstalled it and now my processlist seems fine. – 32bitfloat Aug 1 '12 at 23:14
you're welcome, glad you solved your problem. – elias Aug 1 '12 at 23:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.