htop icon indicating copy to clipboard operation
htop copied to clipboard

htop shows 128 CPU Cores on every machine

Open fleaz opened this issue 1 year ago • 5 comments

Hey,

htop recently decided to show 128 CPU-Cores on all our CentOS Stream 9 machines, which would be cool, but is sadly not the case :D

Screenshot from 2024-09-13 14-40-56

I found some old issues where htop had a problem in LXC containers and showed the actual CPU count of the host machine, but I think that's not the same problem here, because our VMWare hosts have 20C/40T CPUs which doesn't match the 128 shown here.

Some more info about our affected systems:

# cat /proc/cpuinfo | grep "model name"
model name      : Intel(R) Xeon(R) Gold 6242R CPU @ 3.10GHz
model name      : Intel(R) Xeon(R) Gold 6242R CPU @ 3.10GHz
model name      : Intel(R) Xeon(R) Gold 6242R CPU @ 3.10GHz
model name      : Intel(R) Xeon(R) Gold 6242R CPU @ 3.10GHz

# uname -a
Linux 13-130-716-2059-1-263dd518 5.14.0-505.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 5 07:54:07 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

# cat /etc/os-release 
NAME="CentOS Stream"                                                                                                          
VERSION="9"                              
ID="centos"                          
ID_LIKE="rhel fedora"
VERSION_ID="9"                                                                                                                
PLATFORM_ID="platform:el9"
PRETTY_NAME="CentOS Stream 9"                                  
ANSI_COLOR="0;31"                                                                                                             
LOGO="fedora-logo-icon"                                                                                                                                                                                                                                     
CPE_NAME="cpe:/o:centos:centos:9"                                                                                                                                                                                                                           
HOME_URL="https://centos.org/"                                                                                                                                                                                                                              
BUG_REPORT_URL="https://issues.redhat.com/"                                                                                                                                                                                                                 
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 9"                                                                           
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"

Let me know if you need more info from me to further debug this.

Best, Felix

fleaz avatar Sep 13 '24 12:09 fleaz

What changed between htop did not do this and now htop does? Which version of htop do you run? Did you try to compile the latest commit from the repo?

fasterit avatar Sep 13 '24 17:09 fasterit

Also, can you post a copy of the generated htoprc?

BenBE avatar Sep 13 '24 22:09 BenBE

@fasterit Damnit, copy/paste fail from the terminal. This should have been in my first post. We are using 3.3.0 I will give current HEAD a shot later and report back.

@BenBE Here you go.

# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
htop_version=3.3.0
config_reader_min_version=3
fields=0 48 17 18 38 39 40 2 46 47 49 1
hide_kernel_threads=1
hide_userland_threads=0
hide_running_in_container=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_deleted_exe=1
shadow_distribution_path_prefix=0
highlight_megabytes=1
highlight_threads=1
highlight_changes=0
highlight_changes_delay_secs=5
find_comm_in_cmdline=1
strip_exe_from_cmdline=1
show_merged_command=0
header_margin=1
screen_tabs=1
detailed_cpu_time=0
cpu_count_from_one=0
show_cpu_usage=1
show_cpu_frequency=0
show_cpu_temperature=0
degree_fahrenheit=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
enable_mouse=1
delay=15
hide_function_bar=0
topology_affinity=0
header_layout=two_50_50
column_meters_0=LeftCPUs8 Memory Swap
column_meter_modes_0=1 1 1
column_meters_1=RightCPUs8 Tasks LoadAverage Uptime
column_meter_modes_1=1 2 2 2
tree_view=0
sort_key=46
tree_sort_key=0
sort_direction=-1
tree_sort_direction=1
tree_view_always_by_pid=0
all_branches_collapsed=0
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
.sort_key=PERCENT_CPU
.tree_sort_key=PID
.tree_view_always_by_pid=0
.tree_view=0
.sort_direction=-1
.tree_sort_direction=1
.all_branches_collapsed=0
screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command
.sort_key=IO_RATE
.tree_sort_key=PID
.tree_view_always_by_pid=0
.tree_view=0
.sort_direction=-1
.tree_sort_direction=1
.all_branches_collapsed=0

fleaz avatar Sep 16 '24 10:09 fleaz

Just tested the current HEAD of the master branch on one of our machines and it looks good again.

Screenshot from 2024-09-18 11-09-57

I build 171f8285d38a613edc9c94ab6a45f5a171f32b7e

Genereated htoprc:

# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
htop_version=3.4.0-dev-3.3.0-193-g171f828
config_reader_min_version=3
fields=0 48 17 18 38 39 40 2 46 47 49 1
hide_kernel_threads=1
hide_userland_threads=0
hide_running_in_container=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_deleted_exe=1
shadow_distribution_path_prefix=0
highlight_megabytes=1
highlight_threads=1
highlight_changes=0
highlight_changes_delay_secs=5
find_comm_in_cmdline=1
strip_exe_from_cmdline=1
show_merged_command=0
header_margin=1
screen_tabs=1
detailed_cpu_time=0
cpu_count_from_one=0
show_cpu_usage=1
show_cpu_frequency=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
enable_mouse=1
delay=15
hide_function_bar=0
header_layout=two_50_50
column_meters_0=AllCPUs Memory Swap
column_meter_modes_0=1 1 1
column_meters_1=Tasks LoadAverage Uptime
column_meter_modes_1=2 2 2
tree_view=0
sort_key=46
tree_sort_key=0
sort_direction=-1
tree_sort_direction=1
tree_view_always_by_pid=0
all_branches_collapsed=0
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
.sort_key=PERCENT_CPU
.tree_sort_key=PID
.tree_view_always_by_pid=0
.tree_view=0
.sort_direction=-1
.tree_sort_direction=1
.all_branches_collapsed=0
screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE Command
.sort_key=IO_RATE
.tree_sort_key=PID
.tree_view_always_by_pid=0
.tree_view=0
.sort_direction=-1
.tree_sort_direction=1
.all_branches_collapsed=0

fleaz avatar Sep 18 '24 09:09 fleaz

Funfact: All our machines look good again 😮

We had an unattended-reboot this night and got upgraded to kernel 5.14.0-508, so this probably fixed it.

fleaz avatar Sep 18 '24 12:09 fleaz