Htop 显示多个具有不同 pid 的 java 进程

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11017597/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 03:26:35  来源:igfitidea点击:

Htop showing multiple java processes with different pids

javaprocessjvmhtop

提问by b.buchhold

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).

启动一个 Java 程序/JVM 后,我的 linux 机器上的 Htop 显示许多“进程”。我确实理解 JVM 运行多个线程(对于实际程序、垃圾收集等)。

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

但是 htop 如何将它们列为具有不同 pid 的多个进程。这些过程究竟是什么?

回答by Jer

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

实际上,只是默认情况下 htop 将每个线程显示为一个单独的进程。您可以将该行添加hide_userland_threads=1~/.config/htop/htoprc文件中以仅显示一行。

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

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