How to compress or hide the processors at top of htop on large machines?

I like to use htop to show me how the server is being used.

Unfortunately with modern servers, the machine might have 48 or even 120 cores. This means that I can only see the first few lines of htop and never the second half of the htop display that shows which processes are using the machine.

How can I hide all of the core-usage lines or even better aggregate them for some sort of statistic?


Open the setup screen using F2 or ShiftS. The first page of that screen is dedicated to configuring header meters, so you can remove "CPUs" and add "CPU average".

In recent htop versions, there also are "CPUs (1&2/4)" and "CPUs (3&4/4)" meters showing two cores per line, though this is more of use on 8–32 core systems.

To save two more lines, open the "Display options" page and turn off "Leave a margin around header".


Based on grawity's answer, you can create a configuration that you like on a different machine and then copy it to the machine where the problem occurs.

The configuration is saved (under Debian) under ~/.config/htop/htoprc.

  1. On a machine where you can see past the header:
  2. Press F2 to get into the configuration.
  3. Move left to the "Left Column"
  4. Move down to select "CPU" and press F9 to delete it.
  5. From the right most column select "CPU Average" and press F5 to insert it instead.
  6. F10 let's you leave the menu.
  7. copy ~/.config/htop/htoprc to the larger machine.

In my case (120 cores) a configuration with "CPUs (1&2/4)" on the left side of the header, and "CPUs (3&4/4)" on the right side of the header looks good. As a result, the header takes up about half the screen and the other half lists the processes. Each line in the header shows four CPUs which is fine for me.

Sample configuration:

# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1 
sort_key=46
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
show_thread_names=0
highlight_base_name=0
highlight_megabytes=1
highlight_threads=0
tree_view=0
header_margin=1
detailed_cpu_time=0
cpu_count_from_zero=0
color_scheme=0
delay=15
left_meters=Memory Swap CPU Load LoadAverage 
left_meter_modes=1 1 1 1 1 
right_meters=Tasks LoadAverage Uptime 
right_meter_modes=2 2 2 

#Alternative (Blind navigation) Press F2, left, F9. (If CPUs are the items in the header.) After this you can see what is going on and would continue by pressing F10 to quit the configuration.

Blind Navigation v2 (2020-07)

Thanks to islandman93:

New blind navigation: F2, right, delete, right, delete. Then you probably want to add cpu average to the left column