Use btop instead of htop?

Hello,

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 https://github.com/aristocratos/btop/releases/download/v1.3.2/btop-x86_64-linux-musl.tbz
2024-05-17 00:55:56 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/365005377/21c060e8-c958-4d3f-bb74-a83623bcf9de?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240516%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240516T235534Z&X-Amz-Expires=300&X-Amz-Signature=c2e0a2e6ca1380e145f2b4d4206e9f7cffa95fda323b8cf6379a7bb9dcb38b3a&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=365005377&response-content-disposition=attachment%3B%20filename%3Dbtop-x86_64-linux-musl.tbz&response-content-type=application%2Foctet-stream [1015973/1015973] -> "btop-x86_64-linux-musl.tbz" [1]
root@truenas[~]# tar -xjf btop-x86_64-linux-musl.tbz                                                              
root@truenas[~]# ls btop/bin/
btop
root@truenas[~]# chmod +x btop/bin/btop 
root@truenas[~]# btop/bin/btop
2 Likes

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:

3 Likes

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
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.