Why htop shows multiple processes while top shows only one

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • !NoItAll
    Contributor
    • May 2006
    • 297

    Why htop shows multiple processes while top shows only one

    I have an application (written by a contractor for me) that shows as a single process when I run top, but when I run htop it shows from 19 (under light load) up to 76 processes when under heavy load. I am assuming they are processes because each one, under htop, shows a unique PID. Under top there is only one PID.
    Many of the "processes" being shown by htop show 0.0 in the CPU% column - so I am wondering if this is highlighting a resource leak.
    Could someone clue me in on what I am actually seeing here?
    Here's a pix...

    ...there are actually dozens more below what this picture shows...

    Thanks!
  • Luuk
    Recognized Expert Top Contributor
    • Mar 2012
    • 1043

    #2
    Is are kernel thread.

    From 'man htop':
    Code:
    K    Hide kernel threads: prevent the threads belonging the kernel to be displayed in the process list. (This is a toggle key.)
    
    H    Hide user threads: on systems that represent them differently than ordinary processes (such as recent NPTL-based systems), this can hide threads
                from userspace processes in the process list. (This is a toggle key.)
    so, pressing 'K' switches this off, (or on)...

    This difference is also visibla with ps.
    Look at difference if this:
    ps -ef | grep vstreamer
    and
    ps -eLf | grep vstreamer

    Comment

    Working...