7

Why does the same version of htop have so different layout of the CPU meters? How to switch between the layouts?

Layout 1

htop --version htop 2.0.2 - (C) 2004-2018 Hisham Muhammad Released under the GNU GPL. Layout 1

Layout 2

htop --version htop 2.0.2 - (C) 2004-2017 Hisham Muhammad Released under the GNU GPL.

Layout 2

  • 1
    The F2 key configures display settings, and you may be able to change the output display format there. – Mukesh Sai Kumar Jan 13 '18 at 17:33
7

Ok, that was easy. Although it is not particularly well explained in the man page, after some tinkering in the setup I found an answer.

Press F2 and using Enter and arrows setup the following for Layout 1:, Layout 1

For Layout 2 setup this: Layout 2

  • it's also interesting to take a copy of ~/.config/htop/htoprc before playing with these and compare using diff afterwards. While the documentation (and the warning at the top of the RC file) are pretty useless, you can reverse-engineer it by playing around a lot. Or just copy one in with preferred settings, if it's from the same version of htop. – mike Feb 17 at 22:25
1

See ~/.config/htop/htoprc

To put All CPUs in a single column, with Tasks/Load/Uptime on right (1st example):

left_meters=AllCPUs Memory Swap
left_meter_modes=1 1 1
right_meters=Tasks LoadAverage Uptime
right_meter_modes=2 2 2

or, for 2nd with half the CPUs on Left, and half on the Right:

left_meters=LeftCPUs2 Memory Swap
left_meter_modes=1 1 1
right_meters=RightCPUs2 Tasks LoadAverage Uptime
right_meter_modes=1 2 2 2

Note that the meter modes cycle through bar, text, LED etc in a non-intuitive way.

  • I'm tried the first config to make my htop look like layout 1 but it still lists the processes. – dman Aug 3 at 5:21
  • @dman I don't understand. htop is supposed to list the processes. Do you want it to change between listing processes and threads? Or to show the process tree? Look at the F-keys (usually F4 Filter, F5 Tree, F6 Sort by) – mike Aug 5 at 22:42

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.