2

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

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.

  • but why not? isnt htop a kind of improved top? – Blauhirn Aug 28 '18 at 23:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.