Use btop instead of htop?


htop seems to have some issues with showing multiple processes of the same process. This does not help the visibility.

A friend of mine recommended btop and i have to say, wow. That looks way cleaner IMHO.

So what is your opinion? Do you like htop? or is ist just the easiest way to go because it’s most famous and preinstalled?
Are there any caveats for btop that i’m missing?

Here is a screenshot of Top, Htop and Btop.

I could see a potential use-case for btop as an addition to htop, but definitely not as a replacement. Seeing as TrueNAS is an enterprise appliance, you probably don’t want to go upsetting a lot of sysadmins by removing a well-known tool for a lesser known one that they probably will not know how to use.

If you want to use it yourself there’s no reason why you can’t grab the latest release from their github and call the binary directly.

(ideally you should put binaries/scripts on your pool, I’m lazy and am going to delete this after so I’m just putting it in /root)

root@truenas[~]# wget -nv
2024-05-17 00:55:56 URL: [1015973/1015973] -> "btop-x86_64-linux-musl.tbz" [1]
root@truenas[~]# tar -xjf btop-x86_64-linux-musl.tbz                                                              
root@truenas[~]# ls btop/bin/
root@truenas[~]# chmod +x btop/bin/btop 
root@truenas[~]# btop/bin/btop

For what its worth, I just pushed some new defaults to htop that will land in 24.04.1.

You will need to remove your users .config/htop/htoprc to pick them up if you’ve already been using htop, but the new default view will look like this:


Htop defaults to showing every PID so in your case you have 6 k3s Server that use 612mb RAM.
If you sort by ram usage that gets flooded by unnecessary info.
Is there a way to group them together?
And if Yes. Why is that not the default when you sort by Memory Usage?

Oh… Yeah. I overlooked the most obvious concern.
Replacing something working well is always a bad idea.
And adding another tool on top just increases the maintenance effort and file size.
Though that’s exactly what happened with top and htop ^^

I’ve put it in my home folder and added it to Path.
Might have some security concerns?
But should survive and update, or not?

there’s also the fact that btop won’t work on the console due to it using utf-8 (you can try, but you get a lot of scrambled looking nonsense instead.)

That’s fine, though I prefer to keep these things off the boot-pool so if I need to replace it for whatever reason I won’t need to set binaries back up. I’m forcing myself to use btop for a bit, always good to learn new things.

root@truenas[~]# ls /mnt/data/bin | grep btop
root@truenas[~]# cat .zshrc | grep PATH
export PATH="$PATH:/mnt/data/bin"

I know /root/ survives upgrades, so I assume /home/ should.

I like btop. I like how it shows me my disk usage and io but don’t expect that part to work on zfs. Does not seem to on either my ubuntu or proxmox root zfs installs. So reason right there not to include it.