Page 1 of 1

Tasks # shown by top vs htop

PostPosted: February 28th, 2018, 5:06 pm
by J-Reis
This is probably just a stupid, newbie failure to grasp some simple concept. But searching here, on and the web generally didn't provide an explanation. So, in the interest of learning:

On my system (Debian Stable 9.3) the utilities, top and htop show a different number of Tasks. This is consistently the case for me. I have unchecked both the "hide threads" options in htop for good measure, though these do not affect the displayed number of tasks.


Presently top reports: Tasks: 256 total, 1 running, 255 sleeping, 0 stopped, 0 zombie
htop reports: Tasks: 119, 644 thr; 137 kthr; 1 running
More: show

'ps -e | wc -l' shows 255 which matches the output from top, minus top's own process of course.

If someone more knowledgeable would be willing to explain exactly what htop is showing, so I can understand why it is different than the counts from other tools I'd be very grateful.