Open giannakopoulosj opened 3 years ago
Hello @BenBE could this be requested as new feature?
As far as I see it (code-wise) there's probably at least two distinct issues here at play. The first one is, that certain structures are sized only at the start, thus additional CPUs aren't necessarily noticed at runtime. The second issue is that the resizing of meters is currently hardly implemented, thus even if we had the additional information in the meter, there might still lay some issues ahead resizing the CPU meters to actually display them.
Regarding the draw issue.
In ppc64le Linux the potential range of CPUs could be get from /sys/.../cpu/possible
This could define the max CPU draw area and the max CPU depiction on cpu section of htop (draw all online and offline CPUs) Since this is the higher value that the system may get. To get higher shutdown is needed and lpar profile change must be done before bootup.
The offline CPUs instead of absent could note offline. Any dynamic change will bring the usage in depiction as per current functionality when absent CPUs are repopulated.
I don't know if the above make more trouble ... :/
[root@rhel8poc htop-master]# cat /sys/devices/system/cpu/online
0-23
[root@rhel8poc htop-master]# cat /sys/devices/system/cpu/offline
24-31
[root@rhel8poc htop-master]# cat /sys/devices/system/cpu/possible
0-31
Issue: Can the dynamic addition of CPUs be depicted without closing and opening htop??
Steps to depict the issue:
Platform Redhat8 ppc64le, the Virtual Processors configuration of the node is 3. this will show 24 CPUs in htop as per screenshot. By dynamically increasing it from HMC to 4 Virtual Processors, in order to have the correct view i have to close and reopen htop. In the following screenshot is the htop on the same machine after the addition of 1 VP and opened it in new window
In contrast when i have 4, and i substract 1 Virtual Processor i get correct view.
Even if i give back the 1 Virtual Processor i will get the correct view and CPUs that are absense will be repopulate.