How to interpret this htop output?

1

CPU is pinning on one of our app server (Java) machines. When I run the htop command on the machine and switch to Tree View I see:

|- java -Dcom.sun.management.jmxremote -Dfizz=buzz
|  |- java -Dcom.sun.management.jmxremote -Dfizz=buzz
|  |- java -Dcom.sun.management.jmxremote -Dfizz=buzz
|  |- java -Dcom.sun.management.jmxremote -Dfizz=buzz

etc...

...but not sure how to interpret this. Does this mean the JVM process is spawning multiple child processes, or is this tree view a history of all the same times the java executable has been invoked on the machine?

If it is the former, do these child processes represent different threads running or full blown child "copies" of the parent app? What could be causing this?

pnongrata

Posted 2014-08-13T18:48:49.363

Reputation: 2 212

Answers

2

This is because htop lists each thread of the process.

kmac

Posted 2014-08-13T18:48:49.363

Reputation: 441

1This can, of course, be disabled. Separately for user land and kernel threads, even. :) – Daniel B – 2014-08-13T18:53:38.537

Thanks @DanielB (+1) - how can this be disabled? – pnongrata – 2014-08-13T19:00:45.897

Thanks @kmac (+1) - please see my question to Daniel B - I have the same question for you! Also, can you point me to the documentation that states that Tree View displays each thread inside the process? – pnongrata – 2014-08-13T19:01:02.563

@pnongrata Press F2, go to Display options, select the appropriate option(s). ;) – Daniel B – 2014-08-13T19:02:04.780

@pnongrata on the man page, you will see Hide user threads: on systems that represent them differently than ordinary processes (such as recent NPTL-based systems), this can hide threads from userspace processes in the process list. (This is a toggle key.) Try pressing H and you will see the threads disappear. – kmac – 2014-08-13T19:10:42.540