4

When I use htop, I found that an identical program occupies multiple lines: screenshot

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?

  • 3
    These look like multiple threads of the same process. Normal behavior for multi-threaded applications. – Prateek Dewan Mar 12 at 9:23
12

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:

  • 4
    Confirmed. Press SHIFT + h to toggle "display threads" or "hide threads". – gmt42 Mar 12 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.