Why doesn't htop display the same processes as top?

Solution 1:

Why doesn't htop display the same processes than top?

Because htop hides kernel threads by default, while top doesn't. You can switch this option off in F2-settings in htop.

  1. Before:

    enter image description here

  2. Uncheck the Hide kernel threads setting, press Esc to leave screen instead of F10.

    enter image description here

  3. Notice the new number of kthr (kthreads) at the cursor, and all the new k... processes that have shown up. You can sort these by CPU, etc. as usual. Apart from the name (begins with a k, has a / towards the end), you can also identify kernel threads by their very low PIDs (notice the 1, 2, 3...17 in the screenshot?)

    enter image description here