AndyA / htop-osx

A port of htop to OSX
http://hexten.net/
GNU General Public License v2.0
180 stars 40 forks source link

htop-osx doesn't actually report on processes anymore. #16

Closed alanhoyle closed 9 years ago

alanhoyle commented 9 years ago

In an older version of htop and OSX, the htop output roughly paralleled that of the build-in OSX top, but now it doesn't seem to display any CPU usage on a per-process basis. Compare the screenshot of htop and top side-by-side. Both should be sorting by CPU usage, but htop doesn't show anything. Even when I search specifically for the process by process number, it's still showing zeros across the board. htop-vs-top

I'm on OSX 10.10.3 and I built htop-osx 0.8.2.2 using homebrew. I see the same results on three different macs.

Note that it does seem to be showing the overall system load the same, it's the individual processes that seem to be uncooperative.

diimdeep commented 9 years ago

@alanhoyle try to run with sudo

alanhoyle commented 9 years ago

sudo htop is an effective work-around, which makes me think I should use the suid bit.

I fixed this by running the following two commands:

[alanh@MyMac ~]$ sudo chown root /usr/local/Cellar/htop-osx/0.8.2.5/bin/htop
[alanh@MyMac ~]$ sudo chmod u+s /usr/local/Cellar/htop-osx/0.8.2.5/bin/htop
[alanh@MyMac ~]$ ls -l /usr/local/Cellar/htop-osx/0.8.2.5/bin/htop
 -r-sr-xr-x 1 root 112304 May  6 10:19 /usr/local/Cellar/htop-osx/0.8.2.5/bin/htop*

I guess that means I should register a bug with the homebrew folks.

Thanks for the help @diimdeep