htop displays identical program in multiple lines
When I use htop, I found that an identical program occupies multiple lines:
Additionally the PID could not be traced:
me@host:~$ ps 16255 16256 16259 24772 16254
PID TTY STAT TIME COMMAND
How could such an obscure happening?
The duplicated lines are threads of a single process. You can recognize them by the different color in the command column (if you have configured that in Setup > Display options > Display threads in a different color) and by having the same amount of memory reported since memory is shared among threads of the same process.
If you don’t want to see threads of applications in htop
, use Setup > Display Options > Hide userland process threads.
See also:
- htop showing duplicate applications with very odd bizarre results upwards of 20,30,40 or more, see screen grab