
Show HN: Htop 2.0 released, now cross-platform - hisham_hm
http://hisham.hm/htop/
======
_ao789
128 Cores - nice:
[http://hisham.hm/htop/128.png](http://hisham.hm/htop/128.png)

~~~
Radiant
That version of Ubuntu looks very, very old.

~~~
flz
Looks like 8.04 hardy heron, no ?

~~~
Radiant
Yes, seems like it's 8.04!

------
gramakri
[http://drunken-security.at/is-it-a-good-idea-to-show-
everybo...](http://drunken-security.at/is-it-a-good-idea-to-show-everybody-
what-your-server-is-doing/?q=/archives/41) has a live htop background :-)

~~~
CatCookie
We are pleased that you "stole" our idea :)

Is it ok to steal back the gif? Because i think the server load is a bit to
much with so many background reloads.

~~~
hisham_hm
sure! that's the spirit of free software :)

------
melted
I was just installing an older version the other day on FreeBSD, and having to
mount (unmaintained) procfs was quite annoying. So after seeing this link I
specifically went to their site to check what they mean by "cross platform".
They say procfs won't be needed anymore.

Speaking of which, does anyone know why OpenJDK wants procfs on FreeBSD? Is
this a Java thing or a problem with libraries people write using Java?

~~~
StreamBright
I think it is OpenJDK that want's procfs and fdescfs.

------
kinow
I think htop and lua are probably the two main Brazilian contributions to the
open source community.

~~~
pbhjpbhj
Apropos of nothing: does country of origin (or is it residence; or residence
of the main contributors) tell us anything that is at all useful?

It seems like information - the sort people go 'oh really, how fascinating' to
- but I can't really see how it's relevant.

Anyone want to chip in and make a stand for national identity or anything?

To me it's kinda like you said 'find and grep are the two main contributions
to OSS from the flan-eating community'.

Yes, I should probably just keep such thoughts to myself ...

Oh and htop is awesome! Only used Lua on a Minecraft mod (and an not a
programmer/CS) so can't really comment on it.

~~~
davidbanham
It's just a little point of interest. I don't often think about my life
intersecting with the nation off of Brazil, yet I use htop every day. Now I'll
probably cast my mind to a Brazilian rainforest when I do. Just makes the
world a slightly more interesting place.

~~~
hisham_hm
Thanks! Always nice when we help to make people's perceptions of places less
unidimensional. Brazil is not only a place with rainforests, we also have
coders! :)

(Though, even though I'm a (Southern) Brazilian myself, I used to think the
whole "monkeys in the streets" here was a hoax until I moved to Rio de Janeiro
and I realized they have tiny squirrel-sized monkeys running atop the power
lines there!)

~~~
davidbanham
I feel the unidimensional thing. Australians don't actually ride kangaroos to
work! There is, if I'm honest, a wallaby living in the bush that abuts my
property, though.

You'll excuse me, however, for continuing to cast my mind to a tranquil
rainforest rather than a Brazilian coder at a keyboard. I understand they both
exist, but one is far more relaxing to contemplate than the other! :)

------
ketralnis
I really enjoyed this talk[1] by Bryan Cantrill, part of which is about what
it took to emulate Linux's syscalls from within SmartOS. It's lengthy, but
enjoyable.

One of the applications that they tried to port directly to before the
emulation layer was htop, and he has a good rant about what that took because
of its use of /proc and how that made porting it very difficult.

Given that, I'm sure this wasn't easy. Kudos!

[1]
[https://www.youtube.com/watch?v=TrfD3pC0VSs](https://www.youtube.com/watch?v=TrfD3pC0VSs)

~~~
digi_owl
Cantrill loves to rant, don't he?

~~~
luckydude
He does and he's good at it. It's usually pretty entertaining.

------
lqdc13
I used to use htop, but switched to glances at some point, because of a
quicker-to-find-the-info-you-want interface.

~~~
rdtsc
I use htop. I tried glances as I heard good things about it. It is nice, I
like how it has more stuff -- disk, network. However it installed matplotlib,
fonts-lyx, tk8.6, libjs-jquery-ui, python3-bottle, and a slew of other
dependencies, not a big deal but something to watch for.

~~~
lqdc13
Were you adding it through apt-get or pip? With apt-get it's fairly painless.

    
    
        apt-cache depends glances
    
      Depends: python-psutil
      Depends: <python:any>
        python:i386
        python
      Depends: <python:any>
        python:i386
        python
      Depends: python
      Depends: python-pkg-resources
      Depends: adduser
      Depends: lsb-base
      Recommends: python-jinja2

~~~
rdtsc
apt-get. It was painless, and I have the diskspace so not a big deal. Looking
at package properties I see it recommends a bunch of packages, so it installed
those and their deps (this is Ubuntu 15.10):

    
    
        hddtemp, lm-sensors, python3-docker,
        python3-bottle, python3-pysnmp4, 
        python3-influxdb ...

~~~
kbar13
optional dependencies are optional for a reason, no real reason to bring it up
as a con.

~~~
rdtsc
I just described by experience of installing it. It wasn't a huge issue, I
installed them anyway after all.

------
pcx
Awesome! Installing htop is the first thing I do on my *nix systems. The
update is still not up on Homebrew, shouldn't take long though.

~~~
sublimino
Perhaps you're referring to Linuxbrew - "a fork of Homebrew, the Mac OS
package manager, for Linux."

It exposes the same repository as its OSX counterpart, with linux-flavoured
customisations where necessary.

From feature list at [http://linuxbrew.sh/](http://linuxbrew.sh/)

\- Can install software to a home directory and so does not require sudo

\- Install software not packaged by the native distribution

\- Install up-to-date versions of software when the native distribution is old

\- Use the same package manager to manage both your Mac and Linux machines

~~~
pcx
Nope, I am talking about Homebrew, it provides the best way to install htop on
OSX.

~~~
Chris911
The htop package on Homebrew is a fork of the original for OS X called htop-
osx.

[https://github.com/AndyA/htop-osx](https://github.com/AndyA/htop-osx)

~~~
pcx
Didn't know that! Thanks for sharing.

I hope the fork will be deprecated now for the official one. There's already a
related issue on the repo.

------
fuhrysteve
I wonder if this can get into Ubuntu 16.04 before feature freeze in a week or
so..

~~~
rhinoceraptor
It's not a default package, right? If so it can be updated in the repos.

------
mperham
htop is an amazing upgrade to plain old top. Thank you for your work on this!

~~~
grubles
Agreed. And it's fun running it on a box with 32+ cores.

~~~
NickSharp
Is there a quick way to avoid having all those cores take up the top 32 lines
of the screen?

Checking my 40 core machine in a typical terminal window, I can't see any of
the processes, just 40 lines of CPU! Thanks.

~~~
NocturnalWaffle
If you press F2 you can change the setup for the top meters and switch it out
with CPU average or other combinations of cores.

~~~
Piskvorrr
...or if you're not the interactive type (or deploy untold millions of
images), edit .htoprc .

Hm. Given the opacity of that config file, I went the way "configure
interactively, then roll out the new .htoprc"

------
spirit555
I love htop! I hope homebrew gets it soon. Mine only says version 0.8.2.8? I
donated $5 to the developer. Thanks for htop

~~~
brndn
For others interested in donating:
[http://hisham.hm/htop/index.php?page=donate](http://hisham.hm/htop/index.php?page=donate)

------
nodesocket
Huge htop fan. Honestly probably my favorite unix utility.

Just did `brew update && brew upgrade` but not seeing an htop update. I am
still running htop 0.8.2.8 via brew.

Also tried on an AWS server running Ubuntu, same thing `apt-get update && apt-
get upgrade` no new htop version available. Running htop 1.0.2.

~~~
wrigby
I hit the same thing, so I figured I would try compiling from source.

I built ncurses 6.0 from source (installed to $HOME/local) and then htop 2.0
(also to $HOME/local) and it worked a charm. This was on a clean (took it out
of the box today) 10.11 system.

~~~
nodesocket
Ehhhhhhhhhhhh, really want to stick with using native package managers (brew,
apt). Did you just add htop to the apt exclude?

~~~
alphonse23
I too would like to know how to install via brew.

~~~
brianxq3
I quickly and hackily did `brew edit htop` and made these changes to install
htop 2.0:
[https://gist.github.com/bmorton/231bc3d6b3aa6fbefd48](https://gist.github.com/bmorton/231bc3d6b3aa6fbefd48)

I've got it on my list to fully fix it up and submit a PR, but feel free to
flesh out my changes and submit instead :D

------
gourneau
woohoo! ProTip: Even older versions of htop have mouse support. You can click
on columns the change sorting for example.

------
Florin_Andrei
My favorite top replacement. Keep up the good work!

------
nograpes
Has anyone got mouse wheel support working on a PuTTy terminal? I've compiled
htop from source against ncurses 6 on Ubuntu, but no luck.

I know it sounds like I'm asking a lot for a PuTTy window... but mouse clicks
have (amazingly) worked even on a very old version of htop. Just wondering if
anyone has done it before pursuing it further.

------
AnkhMorporkian
I don't suppose this finally allows sorting in tree view, does it? That's been
a feature I've been wanting forever.

~~~
hisham_hm
Tree view is sorted by pid only, sorry. I'm afraid moving entire subtrees
based on other criteria (such as CPU%) would make the screen unbearably jumpy.

~~~
ino
Is there a way to combine all the processes with the same command name?

I have a ton of mariadb processes (I don't even know if this is normal, but it
seems to be working just fine) and it gets tiring having to scroll them just
to glance the numbers on other processes.

[https://www.dropbox.com/s/ghwsh6ye1gt32k1/Screenshot%202016-...](https://www.dropbox.com/s/ghwsh6ye1gt32k1/Screenshot%202016-02-11%2011.06.44.PNG?dl=0)

~~~
andreasvc
Those might be threads. It's best to disable showing threads (F2 - Display
options - Hide kernel/userland threads) because they give little information
over just the process.

~~~
ino
Thank you so much.

------
GreaterFool
Wouldn't braille characters also make nicer progress bars? I think they look
more dense then a bunch of ||||

~~~
executesorder66
Braille characters, or just colons and full stops?

    
    
      [::::::::....        ]
      [::::::::::......    ]
    

Could you give an example of the braille characters being used in this way?

~~~
GreaterFool
I was just thinking that using braille characters would fill more area on the
screen. In particular, | characters look very thin. A bunch of widely spaced
green bars |||| is functional but not very appealing.

------
macint0sh
Yep! Perfect! Now I don't need to do some kind of magic :) when installing on
my FreeBSD servers. Congrats!

------
crazysim
That slide design is really great.

~~~
hisham_hm
Thanks! :D

------
spirit555
Ok so I know of and have tried top, atop, htop, ntop. What else is out there??

~~~
joejoebob
Glances:
[https://nicolargo.github.io/glances/](https://nicolargo.github.io/glances/)

------
wrigby
This is really timely... I just got my new MBP today, so I've been installing
all of my standard tools. Luckily I saw this before I used Homebrew to install
htop!

------
zobzu
Oh the vtop inspired bar is def cool!

regular top has been catching up though and while htop is different and
perhaps still better, regular top does the job for me in most cases.

~~~
riffraff
It might depend on which top (BSD,GNU,?)

~~~
zobzu
gnu of course ;)

------
mixmastamyk
Were they able to improve the conf file and color selection? I remember that
was one area that needed work. 256 colors would be nice also ;)

------
sashk
When I gave up to get it working properly on FreeBSD, I see this news. Great
news.

~~~
jrapdx3
Just now downloaded and compiled it on FreeBSD. Works as expected. Haven't
used htop 1.x on FBSD so can't offer a comparison.

------
mayhew
This is one of the first things I install on any new Linux system. Amazing
tool.

------
sina
My biggest feature request is better search workflow (perhaps like Vim,
instead of having to press F3) and ability to filtering/grep the list of
processes when searching.

I am installing version 2.0 on my laptop to see if search has changed.

------
ssatta
Does that mean that it now works on OSX without root?

~~~
oneeyedpigeon
Works for me. Had to build from source (couldn't find an OSX binary), but it
compiled without a single warning, which is probably a record for something
not OSX-specific. make install still requires root, of course, but it runs
fine from the build directory.

------
BilalBudhani
htop has always been in my list of tools to install on server. Thanks for this
great upgrade.

------
chrstphrhrt
Woohoo! This is great.

------
xyproto
<3 happy top

------
j2432984
still no vi keybindings?

------
niutech
Still no Windows though.

~~~
gaius
Haha everyone used to mock MS because cross platform to them meant Win16 AND
Win32. Now we use it to mean various flavours of Linux. Progress?

~~~
masklinn
> Now we use it to mean various flavours of Linux.

?

"Portable" htop 2.0 works on FreeBSD[0], OpenBSD[1] and OSX[2], not just
"various flavours of linux".

[0]
[https://github.com/hishamhm/htop/tree/master/freebsd](https://github.com/hishamhm/htop/tree/master/freebsd)

[1]
[https://github.com/hishamhm/htop/tree/master/openbsd](https://github.com/hishamhm/htop/tree/master/openbsd)

[2]
[https://github.com/hishamhm/htop/tree/master/darwin](https://github.com/hishamhm/htop/tree/master/darwin)

~~~
gaius
Back in the day it wasn't unusual for something to support 30-odd variations
on Unix, plus VMS and Windows. ./configure && make && make install. Those were
the days!

------
drvortex
To be fair, it is still only for POSIX-y systems. Not cross platform in the
conventional sense.

~~~
masklinn
Working on different unix-like OS is cross-platform in a completely
conventional sense.

------
ceasos
Great !! hisam_hm

you help me drop one of my alias function now :D

̶e̶n̶v̶o̶f̶ ̶(̶)̶ ̶{̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶s̶e̶d̶ ̶'̶s̶/̶\̶x̶0̶/̶\̶n̶/̶g̶'̶
̶/̶p̶r̶o̶c̶/̶$̶{̶1̶}̶/̶e̶n̶v̶i̶r̶o̶n̶ ̶}̶

------
freebasedgirl
If it did not try so hard to emulate nmon poorly, I'd use it more.

------
romanovcode
Wait, where are the Windows binaries?

Oh, I see. They trying to be smart and say "cross-platform" because now it
runs on more Linux distros. That's not smart, that's faulty marketing. And
AFAIK it already was running on 90% of Linux and also on MacOS.

~~~
kajecounterhack
No, it's accurate marketing. Asking for htop to be available on windows is
kinda silly if you recall that htop is "top++" and depends on having a unix
filesystem.

"Cross-platform" is a contextual term.

~~~
masklinn
> depends on having a unix filesystem.

It doesn't do that. Before the multiplatform changes it did depend on having
procfs (linux's I assume since BSDs had a non-identical procfs yet weren't
supported), aside from the OSX fork which ripped out all the /proc access and
replaced them with OSX API calls.

What it does depend on is ncurses.

~~~
kajecounterhack
Ah, thanks for the correction. I had no idea it wasn't using procfs anymore,
or that darwin was using something very different. TIL :)

~~~
masklinn
> I had no idea it wasn't using procfs anymore

It still uses procfs for Linux (since that's there by default), but not for
the other ports. Consider Platform_getLoadAverage for instance:

* linux uses /proc/loadavg[0]

* freebsd and openbsd use sysctl({CTL_VM, VM_LOADAVG})[1][2]

* OSX uses getloadavg(3)[3]

[0]
[https://github.com/hishamhm/htop/blob/master/linux/Platform....](https://github.com/hishamhm/htop/blob/master/linux/Platform.c#L143)

[1]
[https://github.com/hishamhm/htop/blob/master/freebsd/Platfor...](https://github.com/hishamhm/htop/blob/master/freebsd/Platform.c#L123)

[2]
[https://github.com/hishamhm/htop/blob/master/openbsd/Platfor...](https://github.com/hishamhm/htop/blob/master/openbsd/Platform.c#L181)

[3]
[https://github.com/hishamhm/htop/blob/master/darwin/Platform...](https://github.com/hishamhm/htop/blob/master/darwin/Platform.c#L144)

