Macに入れたhtopがCPUとMemを表示してくれないので直した
タイトルが本文。
Mac OSのtopコマンドは腐ってて、top自身が一番CPU食うんじゃねえかっていうくらいの糞。
なのでhtopを使うのがセオリー
インストールはhomebrewから
brew install htop
だけどhtopもデフォルトではCPUやらMemの値を返してくれません
sudo をつけると返してくれるようになりませう
sudo htop
しかし毎回付けるのは面倒なもの。
実はhtopのインストール時にヒントが載ってるんですね。
htop-osx requires root privileges to correctly display all running processes. You can either run the program via `sudo` or set the setuid bit: sudo chown root:wheel /usr/local/Cellar/htop-osx/0.8.2.1/bin/htop sudo chmod u+s /usr/local/Cellar/htop-osx/0.8.2.1/bin/htop You should be certain that you trust any software you grant root privileges.
なのでこの通り、どっちか。
sudo chown root:wheel /usr/local/Cellar/htop-osx/0.8.2.1/bin/htop
sudo chmod u+s /usr/local/Cellar/htop-osx/0.8.2.1/bin/htop
すると
良いですね。