10

How to display meminfo in megabytes in top? discusses how to change the units of memory (e.g. megabytes, gigabytes, etc.) when using top. Is there a way to do this in htop as well? man htop doesn't address this, neither does it seem evident from the info displayed via F1 when running the program.

Alternatively, if there were at least a way to change the threshold at which htop automatically switches from one unit to another, that would work. E.g. right now, it will display memory in terms of 4406M which I find quite difficult to read at a glance in a long line of processes. So, if I could just get it to not go above hundreds of units, and thus automatically switch this to, e.g. 4.4G, when it goes above 999M then that would work too.

1
  • For those wondering what the units are in htop when there is no M/G suffix (just a plain number) the default is KiB though this is not documented (see github.com/htop-dev/htop/issues/1340) Commented Nov 28, 2023 at 16:35

1 Answer 1

2

I don't think it is possible, but, if you are up for building your own htop, not impossible. The code is at github and if you look at Meter.c you will see the logic they use to decide what to display.

2
  • 2
    but why not? isnt htop a kind of improved top? Commented Aug 28, 2018 at 23:32
  • Looks like it is in the works by the new htop team: github.com/htop-dev/htop/issues/224 Commented Feb 25, 2021 at 15:18

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.