Htop showing multiple java processes with different pids

JavaProcessJvmHtop

Java Problem Overview


Htop on my linux machine shows many "processes" after launching one java program/JVM. I do understand that the JVM runs multiple threads (for the actual program, for garbage collection, etc).

But how come htop lists them as multiple processes with different pids. What exactly are those processes?

Java Solutions


Solution 1 - Java

Actually, it's just that htop by default shows each thread as a separate process. You can add the line hide_userland_threads=1 to your ~/.config/htop/htoprc file to show only one line.

See https://unix.stackexchange.com/questions/10362/why-does-htop-show-more-process-than-ps

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionb.buchholdView Question on Stackoverflow
Solution 1 - JavaJerView Answer on Stackoverflow