14

How can I show the CPU usage side by side rather than a list?

I have this : enter image description here

but I want to show it like this: enter image description here

5 Answers 5

14

Go to settings (F2), under Meters, you select what is in the left column and what in the right column. Instead of CPUs (1/1) in the left column, select CPUs (1/2) for the left column and CPUs (2/2) for the right column. F10 to save the changes and it's done.

2
  • I needed to run htop as root to make the settings persistent.
    – Vara
    Jan 16, 2018 at 14:19
  • 3
    If your CPU list takes up the whole screen, going to settings does nothing since it's off the screen. The easiest way to fix this is to maximize your terminal window and decrease font size until you can see the settings.
    – thc
    May 13, 2019 at 18:36
6

As I answered to this more recent version of the same question, this problem can also occur when you use a version of htoprc that has been optimized for a computer with less CPUs. This is like to happen when you use LDAP or some other system to share your home folder between computers.

You can solve this by deleting .config/htop/htoprc and starting htop on the computer with the most cores of the one you use. This will write an htoprc file optimized for many cores (i.e. with four columns for CPUs).

For more details, visit my answer on the other question that I linked above.

1
  • Yes! This is totally true.
    – legel
    May 1, 2020 at 22:52
1

If you press the F2 key, you will be able to organize the meters between both columns.

1

Or if F2 doesn't help, use Shift-S which will bring you to Settings. You do not need to be root to achieve this.

3
  • Neither of these if setting wont display. I have 40 lines of CPU (out of 128). no settings...... Need to edit the rc file ; github.com/hishamhm/htop/issues/562
    – mckenzm
    Mar 19, 2019 at 3:57
  • 1
    @mckenzm Try deleteing .config/htop/htoprc and launch htop on the server with 128 cores. You are most certainly using an htoprc optimized for another computer. See my answer(s) for details.
    – m00am
    Nov 8, 2019 at 9:47
  • Indeed, rm is the great cleanser. You are correct, it is an aws instance.
    – mckenzm
    Nov 9, 2019 at 22:41
0

If you have upgraded CPU and dont care about losing your htop config, then easiest way is

mv ~/.config/htop/htoprc ~/.config/htop/htoprc.bak

It works because on first run htop automatically tries to arrange cpu monitors in best manner

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.