6

My server is running on debian Wheezy and htop 1.0.1 but it does not display any values on the meters bar except the 100.0% value of CPUs.

Is it possible to show always the values of a meter?

This is the current display of htop on my server: current

But I want to have the numbers always on my meters like on this screenshot from https://hisham.hm/htop/index.php?page=screenshots: expected

My htoprc is located in ~/.config/htop/htoprc and contains the following data:

# 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=1
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=LeftCPUs2 CPU Memory Swap
left_meter_modes=1 1 1 1
right_meters=RightCPUs2 Tasks LoadAverage Uptime
right_meter_modes=1 2 2 2

2 Answers 2

9

The problem for me wasn't in ~/.config/htop/htoprc but in the color scheme of the terminal.

I had this problem with One Dark theme in Konsole using the default color schema of htop.

There are two solution:

  • Change your terminal color schema
  • Change htop color schema: F2 → Colors → [x] Something different that you like!

I changed and I can see the numbers now.

7

Well, you create a htoprc file, mine is located in ~/config/htop/htoprc, I don't know how it is under Ubuntu, but that should work too.

inside you just have to put:

left_meters=AllCPUs Memory Swap 
left_meter_modes=1 1 1

That should give you the output you want.

You can also change the number of the color_scheme. Maybe the background is the same color as the numbers.

5
  • 1
    It does already contain exactly these two lines with your values. So this does not work.
    – lszrh
    Commented Apr 23, 2014 at 15:04
  • Hmm actually you don't have exactly the same lines. Can you try commenting the 4 last lines and adding those 4 instead ? left_meters=AllCPUs Memory Swap left_meter_modes=1 1 1 right_meters=Tasks LoadAverage Uptime right_meter_modes=2 2 2 Also if this doesn't work, are you sure the percentage are not in the same color as your terminal background ? Because I can see the 100% on the CPU number 3. You can try changing the color_scheme line with another number maybe
    – pat
    Commented Apr 24, 2014 at 7:24
  • Changing the color scheme is the answer! The numbers had the same color as the background and weren't visible therefor. Can you post this as an answer please? So I can mark this question as solved.
    – lszrh
    Commented Apr 26, 2014 at 6:55
  • I've updated my initial answer
    – pat
    Commented Apr 27, 2014 at 16:36
  • 3
    The color scheme was the exact same problem also for me. The most straight forward solution for me was to choose color scheme "Broken Gray" under Setup (F2) > Colors > Broken Gray which is the same as in htoprc color_scheme=6 (for htop 2.0.1).
    – sema
    Commented May 31, 2019 at 12:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .