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

2022-01-16 00:00:00 process jvm java htop

我的 linux 机器上的 Htop 在启动一个 java 程序/JVM 后显示了许多进程".我确实了解 JVM 运行多个线程(用于实际程序、垃圾收集等).

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

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

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

推荐答案

其实只是htop默认将每个线程显示为一个单独的进程.您可以将行 hide_userland_threads=1 添加到您的 ~/.config/htop/htoprc 文件中以仅显示一行.

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.

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

相关文章